A control method and system for a PLC labeling machine based on cruise along fitting sites

Through the control method based on the lamination site cruise, the problems of label misalignment and poor bonding quality of the PLC labeling machine on the special-shaped surface are solved, and accurate labeling control is achieved, and the labeling quality of the special-shaped surface processed objects is improved.

CN119840926BActive Publication Date: 2025-06-10SHENZHEN LICHEN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510333713.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-06-10
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

When existing PLC labeling machines deal with special-shaped surfaces, the labels are prone to be misaligned, offset or overlap, and the bonding quality is poor, affecting production efficiency and product quality.

Method used

Using a control method based on the fitting site cruise, the continuous image data of the target processed object and the optimal fitting site array are obtained, and the optical flow movement is linearly tracked by preset sliding window neighborhoods, the operation transformation trajectory is obtained, and the position timing state variable is described in combination with the inertial measurement data to determine the ideal cruise position. If the cruise function mode of the PLC labeling machine is not compatible, it will be controlled through the cruise mapping distance matrix and the semi-variance Gaussian model; if the fit defect rate of the labeling head is high, the optimal fit site solution screening and control will be performed.

Benefits of technology

The precise label fit control of the PLC labeling machine on the special surface is realized, the labeling quality is improved, and the problem of inaccurate labeling fit is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119840926B_ABST
    Figure CN119840926B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of labeling equipment control, in particular to a PLC labeling machine control method and system based on cruise along the fitting site. Based on the pre-integration relativity of inertial measurement data to continuous image data, the pose time-series state variables corresponding to the tracking pose change of an industrial vision camera are described, and the ideal cruise pose for the labeling mechanism to cruise and fit along the best fitting site on the target workpiece is obtained. If the PLC labeling machine is not compatible with the automatic cruise planning for the special-shaped surface with the ideal cruise pose as the control premise, then based on the cruise mapping distance matrix in the space coordinate domain of the operation transformation trajectory for labeling to the specified labeling processing area in the ideal cruise pose, the control of the labeling mechanism is identified and solved according to the semi-variance Gaussian model of the cruise mapping distance matrix. The present invention can perform precise label fitting control on the PLC labeling machine based on the cruise along the fitting site of the special-shaped surface, thereby improving the labeling quality of the PLC labeling machine for workpieces with special-shaped surfaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of labeling equipment control, and particularly to a PLC labeling machine control method and system based on fitting site cruise. Background Art

[0002] With the continuous development of automation technology, labeling machines are widely used in various industries, especially playing a crucial role in the rapid identification and packaging of goods in production lines. The key function of a labeling machine is to accurately attach labels to the surface of objects, and with the changes in product types and production methods, the technical requirements for labeling machines are constantly increasing. Traditional labeling machines mainly rely on mechanical control, photoelectric induction, position sensing, etc. for labeling positioning. However, due to factors such as irregular product surfaces and different label shapes, especially the labeling requirements for special-shaped surfaces in special processing, phenomena such as label misalignment, deviation, and overlap are likely to occur, affecting production efficiency and product quality. At the same time, the existing labeling processing of special-shaped surfaces usually uses the rotation or movement of the product workpiece itself to wind and fit static labels to the specified area. However, for this kind of PLC labeling machine, the fitting of labels is prone to deviate from the specified labeling area during the dynamic movement of the product workpiece itself, resulting in the labels being unable to be accurately aligned and fitted to the specified labeling area, and there will also be a large number of fitting bubbles, fitting wrinkles, and insecure adhesion phenomena, greatly affecting the labeling quality of special-shaped surface workpieces. Therefore, it is necessary to develop a control method that can enable the PLC labeling machine to satisfy the autonomous site cruise fitting during the dynamic labeling process of special-shaped surfaces to solve the above problems. Summary of the Invention

[0003] The present invention overcomes the deficiencies of the prior art and provides a PLC labeling machine control method and system based on fitting site cruise.

[0004] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0005] In the first aspect of the present invention, a PLC labeling machine control method based on fitting site cruise is provided, including the following steps:

[0006] S102: Obtain continuous image data of the target workpiece during labeling transportation, define the optimal fitting site array of the target workpiece according to the specification parameter information of the labeling label and the curvature of the labeling area surface of the target workpiece, and linearly track the optical flow motion of the continuous image data based on the sliding window neighborhood preset in the optimal fitting site array to obtain the operation transformation trajectory of the optimal fitting site on the target workpiece within a preset time period;

[0007] S104: Obtain the tracking pose change of the industrial vision camera by tracking the operation transformation trajectory through the industrial vision camera, and obtain inertial measurement data. Based on the inertial measurement data, pre-integrate the relative description of the continuous image data to the pose time series state variables that track the pose change, and obtain the ideal cruising pose for the labeling mechanism to cruise and fit to the best fitting site on the target workpiece under the operation transformation trajectory;

[0008] S106: If the cruising function mode equipped by the PLC labeling machine is not compatible with the automatic cruising planning for the special-shaped surface corresponding to the operation transformation trajectory with the ideal cruising pose as the control premise, then based on the cruising mapping distance matrix in the mapping space coordinate domain of the operation transformation trajectory for labeling to the specified labeling processing area to reach the ideal cruising pose, identify and solve the control of the labeling mechanism according to the semi-variance Gaussian model of the cruising mapping distance matrix;

[0009] S108: If the fitting defective rate of the labeling head for the labeling label is higher than the lowest fitting defective rate, then extract the unreasonable sub-fitting site distribution area of the fitting label according to the criterion that the adhesion index exceeds the unqualified adhesion index, and perform the best fitting site solution screening on the unreasonable sub-fitting site distribution area through the expected fitting requirements of the labeling label to obtain the best fitting site matrix, and control the fitting of the labeling head according to the best fitting site matrix.

[0010] More specifically, the step S102 specifically includes the following steps:

[0011] Obtain the specified labeling processing area of the processing and transportation mechanism, and use the industrial vision camera mounted on the labeling mechanism to take pictures of the target workpiece that starts to enter the specified labeling processing area frame by frame within a preset time period to obtain the continuous image data during the labeling processing operation of the target workpiece;

[0012] Obtain the specification parameter information of the labeling label, synchronously obtain the labeling task of the target workpiece and the curvature of the labeling area surface, and define the fitting site planning based on the specification parameter information and the labeling task for the curvature of the labeling area surface to obtain the best fitting site array of the target workpiece;

[0013] Based on the matrix pattern expressed by the best fitting site array, preset a local sliding window neighborhood for the fitting site pixels, and introduce the Sobel operator to calculate the spatial gradient and temporal gradient of every two adjacent frames of images in the continuous image data;

[0014] Based on the number of best fitting sites, divide the local sliding window neighborhood into N sub-neighborhoods. For each sub-neighborhood, track and describe the linear dynamic motion of each sub-neighborhood through the optical flow components of the best fitting site pixels in the horizontal and vertical directions respectively, as well as the spatial gradient and temporal gradient, and generate the optical flow equation of each sub-neighborhood;

[0015] Solve the optical flow equation to obtain the optical flow solutions of each optimal fitting site pixel in each sub-neighborhood, and repeat the above steps of calculating the spatial gradient, temporal gradient, and tracking and solving the optical flow equation in the image frames until the iteration stops after each frame of the continuous image data is calculated;

[0016] After the iteration stops, output the optical flow solutions of all the optimal fitting sites in the continuous image data, and determine the operation transformation trajectory of the optimal fitting sites on the target workpiece within a preset time period according to the optical flow solutions of all the optimal fitting sites.

[0017] More specifically, the step S104 specifically includes the following steps:

[0018] Perform site tracking on the operation transformation trajectory of the optimal fitting sites on the target workpiece within the preset time period through an industrial vision camera to obtain the tracking pose changes of the industrial vision camera cruising at the optimal fitting sites on the surface curvature of the labeling area;

[0019] During the site tracking process, obtain the inertial measurement data collected by the inertial measurement unit carried on the labeling mechanism when the industrial vision camera runs the tracking pose changes; wherein, the inertial measurement data includes the angular velocity, linear acceleration, and non-linear acceleration of the gyroscope;

[0020] With the tracking pose changes as the constraint premise, perform pre-integration calculations of the acceleration and angular velocity on the continuous image data during the labeling processing operation of the target workpiece by using the inertial measurement data, obtain the pre-integration results of the relative pose changes, and perform time series state fusion of the tracking pose changes and the pre-integration results through Kalman filtering to obtain the pose time series state variable matrix;

[0021] Extract the pre-integration error values of the inertial measurement data through the pre-integration results, depict the pose nodes based on the pose time series state variable matrix, define the state variable error constraints between each pose node based on the pre-integration error values, and construct a pose time series state model diagram according to the pose nodes and the state variable error constraints between each pose node;

[0022] With the operation transformation trajectory as the target rule, preset a squared residual function according to the state variable error constraints, calculate the gradient of the squared residual function with respect to the target rule, and generate the current approximate Hessian matrix and the current gradient search direction of the pose time series state model diagram according to the gradient;

[0023] Preset an iteration depth threshold, and perform linearized iterative updates on the states of each pose node in the current Hessian matrix through the current gradient search direction until the squared residual function converges to the iteration depth threshold, and output the updated approximate Hessian matrix;

[0024] Based on the state variable estimation of the updated approximate Hessian matrix, determine the ideal cruising pose for the labeling mechanism to cruise and fit at the best fitting site on the target workpiece under the operating transformation trajectory.

[0025] More specifically, the step S106 specifically includes the following steps:

[0026] Obtain the function mode information of the PLC labeling machine, and judge whether the autonomous cruising function equipped by the PLC labeling machine is compatible with the automatic cruising planning for the special-shaped surface corresponding to the operating transformation trajectory with the ideal cruising pose as the control premise;

[0027] If the cruising function mode equipped by the PLC labeling machine is not compatible with the automatic cruising planning for the special-shaped surface corresponding to the operating transformation trajectory with the ideal cruising pose as the control premise, obtain the initial design drawing of the labeling mechanism;

[0028] Based on the initial design drawing, obtain the established degrees of freedom and the maximum spatial operating range of the labeling mechanism, assign values to the maximum spatial operating range as the boundary framework to construct the spatial coordinates of the established degrees of freedom, and generate the spatial coordinate domain of the labeling mechanism reaching the established degrees of freedom;

[0029] Obtain the discrete spatial coordinate array for the labeling mechanism to perform label fitting at the ideal cruising pose through the spatial coordinate domain, defined as the first discretized spatial coordinate array, and obtain the discrete spatial coordinate array when the target workpiece is located in the specified labeling processing area, defined as the second discretized spatial coordinate array;

[0030] Based on the preset mapping clue of the operating transformation trajectory, cruise and map the first discretized spatial coordinate array to the second discretized spatial coordinate array according to the mapping clue for the target reference. During the cruise mapping process, continuously calculate the Manhattan distance of each pair of discrete spatial coordinates one by one to obtain a cruise mapping distance matrix;

[0031] Construct a semi-variance Gaussian model for each pair of discrete spatial coordinates between the first discretized spatial coordinate array and the second discretized spatial coordinate array according to the cruise mapping distance matrix, solve the weighting coefficient of the corresponding interpolation point of each pair of discrete spatial coordinates through the spatial correlation index identified by the semi-variance Gaussian model, interpolate and draw a cruise operation contour map based on the weighting coefficient, and control the labeling mechanism according to the cruise operation contour map.

[0032] More specifically, for each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array constructed according to the cruise mapping distance matrix, a semi-variance Gaussian model is constructed. The weighted coefficient of the corresponding interpolation point for each discrete spatial coordinate pair is solved through the spatial correlation index identified by the semi-variance Gaussian model. Based on the weighted coefficients, an interpolation is performed to draw a contour map of the cruise operation. The labeling mechanism is controlled according to the contour map of the cruise operation, which specifically includes the following steps:

[0033] Determine the semi-variance of each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array according to the cruise mapping distance matrix, and obtain a number of semi-variance functions;

[0034] Introduce the maximum likelihood method to perform maximization calculation on exponential likelihood fitting of the number of semi-variance functions, obtain a series of semi-variance parameters, and construct a semi-variance Gaussian model according to the series of semi-variance parameters; wherein, the semi-variance model parameters include the range and effective distance of spatial correlation;

[0035] Based on the semi-variance function, identify in the semi-variance Gaussian model to determine the spatial correlation index of the first discretized spatial coordinate array reaching the second discretized spatial coordinate array according to the operation transformation trajectory under the premise of the ideal cruise pose;

[0036] Describe the cruise mapping interpolation equation set for the labeling mechanism to fit the target processed object with the labeling label according to the operation transformation trajectory under the premise criterion of the ideal cruise pose according to the spatial correlation index, and eliminate the elements of the cruise mapping interpolation equation and transform it into an augmented matrix for back substitution to solve, so as to obtain the weighted coefficient of the corresponding interpolation point for each discrete spatial coordinate pair;

[0037] Based on the established degrees of freedom, construct a contour interpolation map for controlling the labeling mechanism. By interpolating and calculating the weighted coefficients of the corresponding interpolation points for each discrete spatial coordinate pair one by one in the contour interpolation map, a contour map of the cruise operation of the labeling mechanism under the established degree of freedom constraint is generated, which is marked as the contour map of the cruise operation;

[0038] According to the contour map of the cruise operation, plan the cruise control decision for the best fitting site on the special-shaped surface of the target processed object by the labeling mechanism, obtain the cruise control strategy, and control the labeling mechanism to carry the labeling label and fit the target processed object according to the operation transformation trajectory under the premise criterion of the ideal cruise pose based on the cruise control strategy, so as to obtain the labeling control scheme.

[0039] More specifically, the step S108 specifically includes the following steps:

[0040] Obtain the label fitting log of the PLC labeling machine, extract the fitting defective rate of the labeling head for the labeling label through the label fitting log, and if the fitting defective rate is higher than the minimum fitting defective rate, obtain the specified fitting sites of the labeling label;

[0041] Obtain the model specification information of the labeling head, extract the basic grasping size of the grasping joint corresponding to each specified fitting site on the labeling head through the model specification information, and preset the marginal threshold of the fitting site area based on the basic grasping size;

[0042] Construct the fitting site area of the labeling label, divide the fitting site area into M sub-areas based on the number of specified fitting sites, and perform the inclusion planning of the fitting sites for each sub-area until the boundary constraint of the marginal threshold of the fitting site area is reached, obtaining each sub-fitting site distribution area;

[0043] Extract the adhesion index of each sub-fitting site distribution area of the labeling label under the fitting defective rate through the label fitting log, and if the adhesion index exceeds the unqualified adhesion index, extract the sub-fitting site distribution area corresponding to the adhesion index and mark it as an unreasonable sub-fitting site distribution area;

[0044] Obtain the expected fitting requirements of the labeling label, obtain the expected adhesion index of the labeling label according to the expected fitting requirements, calculate the deviation of the adhesion index of the unreasonable sub-fitting site distribution area compared with the expected adhesion index, and obtain the adhesion index deviation value;

[0045] Construct the solution space of the fitting site according to the unreasonable sub-fitting site distribution area, obtain several remaining fitting site solutions in the solution space excluding the specified fitting sites, evaluate each fitting site solution based on the adhesion index deviation value, obtain the solution evaluation value, and only extract the fitting site solution corresponding to the maximum solution evaluation value and mark it as the best fitting site solution;

[0046] Construct the best fitting site matrix by obtaining the best fitting site solutions of each unreasonable sub-fitting site distribution area, and control the grasping site and fitting force of the labeling head for the labeling label according to the best fitting site matrix to improve the poor adhesion phenomenon.

[0047] The second aspect of the present invention provides a PLC labeling machine control system based on fitting site cruise. The PLC labeling machine control system includes a memory and a processor. A PLC labeling machine control method program based on fitting site cruise is stored in the memory. When the PLC labeling machine control method program is executed by the processor, the steps of any of the PLC labeling machine control methods are implemented.

[0048] The present invention solves the technical defects in the background technology. The beneficial technical effects of the present invention are as follows:

[0049] Obtain the continuous image data of the target workpiece labeling transportation and the best fitting site array, linearly track the optical flow motion of the continuous image data based on the sliding window neighborhood preset by the best fitting site array, and obtain the operation transformation trajectory of the best fitting site on the target workpiece within a preset time period; track the operation transformation trajectory to obtain the tracking pose change of the industrial vision camera and the inertial measurement data, and based on the inertial measurement data, pre-integrate the relative description of the continuous image data to track the pose time series state variables of the pose change, and obtain the ideal cruise pose for the labeling mechanism to cruise and fit relative to the best fitting site on the target workpiece under the condition of the operation transformation trajectory; if the cruise function mode equipped by the PLC labeling machine is not compatible with the automatic cruise planning for the special-shaped surface corresponding to the operation transformation trajectory with the ideal cruise pose as the control premise, then based on the cruise mapping distance matrix in the operation transformation trajectory mapping space coordinate domain for labeling to the specified labeling processing area to reach the ideal cruise pose, identify and solve the control of the labeling mechanism according to the semi-variance Gaussian model of the cruise mapping distance matrix; if the fitting defective rate of the labeling head for the labeling label is higher than the lowest fitting defective rate, then perform the best fitting site solution screening on the unreasonable sub-fitting site distribution area through the expected fitting requirements of the labeling label to obtain the best fitting site matrix, and control the labeling head according to the best fitting site matrix. The present invention can accurately control the label fitting of the PLC labeling machine based on the cruise of the fitting site of the special-shaped surface, thereby improving the label fitting quality of the PLC labeling machine for workpieces with special-shaped surfaces and avoiding the problem of inaccurate label fitting of the existing PLC labeling machine when facing special-shaped surfaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0051] Figure 1 Shows a first method flow chart of a control method for a PLC labeling machine based on cruise of fitting sites;

[0052] Figure 2 Shows a second method flow chart of a control method for a PLC labeling machine based on cruise of fitting sites;

[0053] Figure 3 Shows a system framework diagram of a control system for a PLC labeling machine based on cruise of fitting sites. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0054] In order to more clearly understand the above-mentioned objects, features, and advantages of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.

[0055] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.

[0056] The first aspect of the present invention provides a control method for a PLC labeling machine based on cruise along the best-fitting sites, as Figure 1 shown, including the following steps:

[0057] S102: Obtain continuous image data of the target workpiece during labeling and transportation, define the best-fitting site array of the target workpiece according to the specification parameter information of the labeling label and the curvature of the labeling area surface of the target workpiece, and linearly track the optical flow motion of the continuous image data based on the sliding window neighborhood preset in the best-fitting site array to obtain the operation transformation trajectory of the best-fitting sites on the target workpiece within a preset time period;

[0058] S104: Track the operation transformation trajectory through the industrial vision camera to obtain the change in the tracking pose of the industrial vision camera, and obtain inertial measurement data. Based on the inertial measurement data, pre-integrate the relative description of the continuous image data to track the pose time-series state variables of the pose change, and obtain the ideal cruise pose for the labeling mechanism to cruise and fit relative to the best-fitting sites on the target workpiece under the operation transformation trajectory;

[0059] S106: If the cruise function mode equipped with the PLC labeling machine is not compatible with the automatic cruise planning for the special-shaped surface corresponding to the operation transformation trajectory with the ideal cruise pose as the control premise, then based on the cruise mapping distance matrix in the mapping space coordinate domain of the operation transformation trajectory for labeling to the specified labeling processing area to reach the ideal cruise pose, identify and solve the control of the labeling mechanism according to the semi-variance Gaussian model of the cruise mapping distance matrix;

[0060] S108: If the fitting defective rate of the labeling head for the labeling label is higher than the lowest fitting defective rate, then extract the unreasonable sub-fitting site distribution area of the fitting label according to the criterion that the adhesion index exceeds the unqualified adhesion index, and perform the best-fitting site solution screening on the unreasonable sub-fitting site distribution area through the expected fitting requirements of the labeling label to obtain the best-fitting site matrix, and control the fitting of the labeling head according to the best-fitting site matrix.

[0061] It should be noted that the PLC labeling machine of the present invention fixes the target workpiece through a clamping mechanism and realizes its own rotation or movement, and winds and adheres the continuously conveyed label paper during the dynamic operation process of its rotation or movement.

[0062] More specifically, in the step S102, as Figure 2 shown, it specifically includes the following steps:

[0063] S202: Obtain the specified labeling processing area of the processing and transportation mechanism, and use the industrial vision camera mounted on the labeling mechanism to take frame-by-frame pictures of the target workpiece that starts to enter the specified labeling processing area within a preset time period, so as to obtain the continuous image data during the labeling processing operation of the target workpiece;

[0064] S204: Obtain the specification parameter information of the labeling label, synchronously obtain the labeling task of the target workpiece and the curvature of the labeling area surface, and define the fitting site planning based on the specification parameter information and the labeling task for the curvature of the labeling area surface, so as to obtain the optimal fitting site array of the target workpiece;

[0065] S206: Preset a local sliding window neighborhood about the fitting site pixels based on the matrix pattern expressed by the optimal fitting site array, and introduce the Sobel operator to calculate the spatial gradient and temporal gradient of every two adjacent frames of images in the continuous image data;

[0066] S208: Divide the local sliding window neighborhood into N sub-neighborhoods based on the number of optimal fitting sites. For each sub-neighborhood, track and describe the linear dynamic motion of each sub-domain through the optical flow components of the optimal fitting site pixels in the horizontal and vertical directions respectively and the spatial gradient and temporal gradient, and generate the optical flow equation of each sub-neighborhood;

[0067] S210: Solve the optical flow equation to obtain the optical flow solutions of each optimal fitting site pixel in each sub-neighborhood, and repeat the above steps of calculating the spatial gradient and temporal gradient and the tracking and solution of the optical flow equation in the image frame until the iteration stops after each frame of the continuous image data is calculated;

[0068] S212: After the iteration stops, output the optical flow solutions of all the optimal fitting sites in the continuous image data, and determine the operation transformation trajectory of the optimal fitting sites on the target workpiece within a preset time period according to the optical flow solutions of all the optimal fitting sites.

[0069] It should be noted that some of the PLC labeling machines on the market mainly serve special-shaped labeling, such as the labeling requirements for cylindrical, elliptical or other irregular-shaped surfaces; however, since some of the PLC labeling machines for special-shaped surface labeling rotate or move the orientation of the labeling area of the workpiece to make the labeling mechanism move with it to cover the special-shaped fitting surface with the label, this may make the control of such PLC labeling machines unable to fit the special-shaped fitting surface of the target workpiece to the greatest extent, resulting in the phenomenon that the labeled label cannot be accurately fitted or has poor fitting quality. Therefore, the labeling mechanism can be accurately positioned and fitted by capturing the movement transformation trajectory of the fitting points on the special-shaped fitting surface of the target workpiece. Therefore, in this method, when the target workpiece enters the specified labeling processing area, continuous image data of its rotation or movement during processing in the area is captured; since there is a certain fitting curvature for different special-shaped surfaces, there are slight differences in the fitting points on different target workpieces. Therefore, then, according to the specification characteristics of the labeling label and the labeling task of the target workpiece, the curvature of the labeling area surface of the target workpiece is planned and defined for the fitting points, so as to limit its optimal fitting point array, making different label sizes fit more tightly on workpieces with different special-shaped surface curvatures and reducing the wrinkle or bubble rate. Then, with the optimal fitting points as the positioning target, pixel point capture and analysis are performed frame by frame in the collected continuous image data. In this method, a local sliding window neighborhood is set to track and capture the changes in the pixel point brightness in the horizontal direction, vertical direction and time dimension between two frames of images, that is, the optical flow components in the horizontal and vertical directions and the spatial gradient and time gradient are used to track and describe the linear dynamic movement of the pixel points, so as to reveal the optical flow changes of the optimal fitting point pixels in the linear dynamic movement in the time-sequence space, which can greatly improve the pixel capture accuracy of the object movement and is clearer and more reliable compared with the traditional time-sequence capture method of pixel points, meeting the cruise positioning accuracy requirements of the PLC labeling machine for the special-shaped surface fitting points at certain high-speed labeling production rates. Finally, the movement transformation trajectory of the optimal fitting points can be quickly obtained by iteratively solving the generated optical flow equation.

[0070] It should be noted that on the one hand, through this method, reasonable and optimal fitting points can be planned for different special-shaped surface curvatures according to the specification characteristics of the labeling label, so that the labeling label can be guaranteed to fit completely to the greatest extent on the special-shaped surface workpiece, improving the label fitting quality; on the other hand, it can quickly estimate the change trajectory of the optimal fitting points of the special-shaped surface target workpiece based on the optical flow change of the target pixel points in the time-sequence space of the image data, providing a reliable positioning basis for the subsequent PLC labeling machine to control the labeling mechanism to cruise to the optimal fitting points for label fitting, and greatly improving the accuracy of the special-shaped surface label fitting.

[0071] More specifically, the step S104 specifically includes the following steps:

[0072] The site tracking is performed on the operation transformation trajectory of the best fitting site on the target workpiece within the preset time period through an industrial vision camera, so as to obtain the tracking pose change of the industrial vision camera cruising on the surface curvature of the labeling area at the best fitting site;

[0073] During the site tracking process, the inertial measurement data of the industrial vision camera when running the tracking pose change is collected by the inertial measurement unit carried on the labeling mechanism; wherein, the inertial measurement data includes the angular velocity, linear acceleration and non-linear acceleration of the gyroscope;

[0074] Taking the tracking pose change as the constraint premise, the pre-integration calculation of the acceleration and angular velocity of the continuous image data during the labeling process of the target workpiece is performed by using the inertial measurement data, and the pre-integration result of the relative pose change is obtained, and the time series state fusion of the tracking pose change and the pre-integration result is performed through Kalman filtering to obtain the pose time series state variable matrix;

[0075] The pre-integration error value of the inertial measurement data is extracted through the pre-integration result, the pose nodes are depicted based on the pose time series state variable matrix, and the state variable error constraint between each pose node is defined based on the pre-integration error value. According to the pose nodes and the state variable error constraint between each pose node, a pose time series state model diagram is constructed;

[0076] Taking the operation transformation trajectory as the target rule, a squared residual function is preset according to the state variable error constraint, the gradient of the squared residual function with respect to the target rule is calculated, and the current approximate Hessian matrix and the current gradient search direction of the pose time series state model diagram are generated according to the gradient;

[0077] A preset iteration depth threshold is set, and the state of each pose node in the current Hessian matrix is linearly iteratively updated through the current gradient search direction until the squared residual function converges to the iteration depth threshold, and the updated approximate Hessian matrix is output;

[0078] According to the state variable estimation of the updated approximate Hessian matrix, the ideal cruising pose of the labeling mechanism relative to the best fitting site on the target workpiece during cruising fitting under the operation transformation trajectory is determined.

[0079] It should be noted that due to the particularity of the irregular surface and the fact that the PLC labeling machine needs to label target workpieces with different curvature differences according to different processing tasks, the existing labeling heads of the PLC labeling machine for irregular surfaces cannot adaptively deform according to different labeling curvatures to fully fit the irregular surface. In other words, the shape of the labeling head on the labeling mechanism is relatively fixed and it is difficult to adapt to the dynamic labeling of irregular surfaces with different curvatures. This results in the labeling mechanism being unable to fully attach the label to the area of the irregular surface that needs to be attached when the target workpiece is rotating for labeling, causing a large labeling error for workpieces with irregular surfaces. In response to this, this method uses the data collected by the industrial vision camera and inertial measurement unit commonly installed on the labeling mechanism for pose linkage analysis. First, the tracking pose change of the industrial vision camera's site tracking operation transformation trajectory is obtained. The tracking pose change reflects the global fitting trajectory of the labeled label on the irregular surface of the target workpiece, which is an interpretation of the shape of the irregular surface curvature. This tracking pose change is an important basis for controlling the cruise site fitting of the labeling mechanism. Then, the inertial measurement data during the site tracking process is synchronously obtained. That is, these inertial measurement data are some pose compensation data generated during the site tracking of the industrial vision camera to describe the irregular surface, and can reflect the labeling azimuth vector information that cannot be expressed by the visual data. Then, the movement between adjacent image frames is calculated by pre-integrating the inertial measurement data, that is, the pose change of the camera is estimated, and the pre-integration result of the relative pose change is obtained. Since the inertial measurement data can compensate for the pose expression error existing in the tracking pose change, this method depicts the pose time-sequence state variable of the pre-integration error through the pose time-sequence state variable matrix generated by fusing the tracking pose change and the pre-integration result in a time-sequence state. The pose nodes expressed by the tracking pose change and the state variable error constraints between each pose node reflected in the inertial measurement data are drawn as a constructed pose time-sequence state model diagram, which is convenient for eliminating and optimizing the pose expression error, making the subsequent control of the labeling mechanism's cruise tracking of the best fitting site's irregular surface fitting azimuth vector faster and more accurate, and enabling the labeling mechanism to fully fit according to the irregular surface curvature.

[0080] It should be noted that the pose time-sequence state model diagram is used to display the pose expression error condition of inertial measurement data compensation for tracking pose changes. Therefore, a second-order derivative matrix that follows the target rules, namely the approximate Hessian matrix (the Chinese name of the approximate Hessian matrix is the approximate Hessian matrix), is further constructed based on the state variable error constraints between pose nodes. The approximate Hessian matrix is continuously updated according to the current gradient search direction reflected by the pose time-sequence state model diagram, so as to minimize the pose error of inertial measurement data compensation for tracking pose changes, enabling the labeling pose control of the labeling mechanism to closely follow the operation transformation of the best fitting site on the special-shaped surface for label tracking and fitting, ensuring that the labeling pose tends to be ideal, thereby greatly improving the cruise accuracy of the fitting site of the labeling mechanism during the operation and labeling of the special-shaped surface processed object by the PLC labeling machine and the label fitting control accuracy based on the cruise of the fitting site.

[0081] More specifically, the step S106 specifically includes the following steps:

[0082] Obtain the function mode information of the PLC labeling machine, and judge whether the autonomous cruise function equipped by the PLC labeling machine is compatible with the automated cruise planning for the operation transformation trajectory corresponding to the special-shaped surface with the ideal cruise pose as the control premise;

[0083] If the cruise function mode equipped by the PLC labeling machine is not compatible with the automated cruise planning for the operation transformation trajectory corresponding to the special-shaped surface with the ideal cruise pose as the control premise, obtain the initial design drawing of the labeling mechanism;

[0084] Based on the initial design drawing, obtain the established degrees of freedom and the maximum spatial operating range of the labeling mechanism, assign values with the maximum spatial operating range as the boundary framework to construct the spatial coordinates of the established degrees of freedom, and generate the spatial coordinate domain of the labeling mechanism reaching the established degrees of freedom;

[0085] Obtain the discrete spatial coordinate array of the labeling mechanism reaching the ideal cruise pose for label fitting through the spatial coordinate domain, defined as the first discretized spatial coordinate array, and obtain the discrete spatial coordinate array when the target processed object is located in the specified labeling processing area, defined as the second discretized spatial coordinate array;

[0086] Based on the preset mapping clue of the operation transformation trajectory, cruise and map the first discretized spatial coordinate array to the second discretized spatial coordinate array for the target reference according to the mapping clue. During the cruise mapping process, continuously calculate the Manhattan distance of each pair of discrete spatial coordinates one by one to obtain a cruise mapping distance matrix;

[0087] Construct a semi-variance Gaussian model for each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array according to the cruise mapping distance matrix, solve the weighting coefficient of the corresponding interpolation point for each discrete spatial coordinate pair through the spatial correlation index identified by the semi-variance Gaussian model, interpolate and draw a contour map of the cruise operation based on the weighting coefficient, and control the labeling mechanism according to the contour map of the cruise operation.

[0088] It should be noted that existing PLC labeling machines are all equipped with an autonomous cruise function to meet the autonomous cruise labeling control of target workpieces. However, the autonomous cruise functions of most PLC labeling machines can only be adapted and compatible with the cruise decision-making for labeling target workpieces with planar shapes. The autonomous cruise for special-shaped surfaces still cannot be achieved, or there are problems such as poor adhesion, many adhesion bubbles, and adhesion wrinkles, and it is difficult to execute an automated cruise plan based on the ideal cruise pose and operation transformation trajectory. This results in poor production quality of labeling special-shaped surfaces of target workpieces, increasing the rework rate and labeling cost. Therefore, a labeling cruise control decision for special-shaped surfaces is needed to solve the above pain points. Therefore, this method defines the spatial coordinate domain of the labeling mechanism under the given degrees of freedom and the maximum spatial operation range. The movement of the label from the labeling mechanism cruising and adhering to the special-shaped surface target workpiece is actually a manifestation of the spatial dimension mapping movement. Therefore, the spatial coordinate domain can provide a series of spatial dimension mapping bases for the labeling mechanism to execute the operation transformation trajectory cruise under the premise of ideal cruise pose control, effectively improving the label adhesion alignment degree of the subsequent labeling mechanism cruising according to the best adhesion site. Among them, the discrete spatial coordinate array when the labeling mechanism reaches the ideal cruise pose to execute label adhesion is the coordinate set before the labeling mechanism adheres the label to the special-shaped surface in the form of the ideal cruise pose, that is, the first discretized spatial coordinate array; and the discrete spatial coordinate array when the target workpiece is located in the specified labeling processing area is the coordinate set where the label needs to be aligned and adhered to the specified labeling processing area on the special-shaped surface, that is, the second discretized spatial coordinate array.

[0089] It should be noted that, as can be seen from the above, accurately mapping the first discretized spatial coordinate array to the second discretized spatial coordinate can achieve the accurate alignment of the label on the irregular surface on the premise of controlling the ideal cruising pose. Therefore, in this method, the first discretized spatial coordinate array is cruised and mapped to the second discretized spatial coordinate array based on the mapping clue preset by the operation transformation trajectory. However, there is a mapping distance gap between the coordinate pairs at this time. These mapping distance gaps reflect the degree of spatial dependence required for label alignment and fitting, that is, the control amount required for alignment and fitting. Therefore, during the cruise mapping process, the Manhattan distance of each discrete spatial coordinate pair is continuously calculated one by one to generate a cruise mapping distance matrix to clarify the deviation after coordinate mapping, which is convenient for the alignment and optimization control of the labeling mechanism of the labeling machine. Then, the semi-variance Gaussian model constructed based on the cruise mapping distance matrix is used to analyze and calculate the alignment control of the labeling mechanism. Thus, based on the cruise of the best fitting site, the labeling mechanism can accurately align and fit the label to the irregular surface labeling area of the target workpiece. Through this method, the PLC labeling machine can achieve the alignment control of the irregular surface labeling based on the cruise of the fitting site, making the labeling control for the irregular surface more stable, firm and accurate, ensuring the labeling quality of the workpiece, and reducing the rework rate and cost output of the irregular surface labeling.

[0090] More specifically, for constructing the semi-variance Gaussian model of each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array according to the cruise mapping distance matrix, solving the weighted coefficient of the corresponding interpolation point of each discrete spatial coordinate pair through the spatial correlation index identified by the semi-variance Gaussian model, interpolating and drawing the cruise operation contour map based on the weighted coefficient, and controlling the labeling mechanism according to the cruise operation contour map, the specific steps are as follows:

[0091] Determine the semi-variance of each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array according to the cruise mapping distance matrix to obtain a number of semi-variance functions;

[0092] Introduce the maximum likelihood method to perform the maximization calculation of the exponential likelihood fitting of the number of semi-variance functions to obtain a series of semi-variance parameters, and construct a semi-variance Gaussian model according to the series of semi-variance parameters; among them, the semi-variance model parameters include the range and effective distance of spatial correlation;

[0093] Based on the recognition of the semi-variance function in the semi-variance Gaussian model, determine the spatial correlation index of the first discretized spatial coordinate array reaching the second discretized spatial coordinate array according to the operation transformation trajectory under the premise of the ideal cruising pose;

[0094] According to the precondition criteria for the labeling mechanism to be in the ideal cruising pose, describe the cruise mapping interpolation equation set for the labeling mechanism to carry the labeling label and fit the target processed object along the operation transformation trajectory, and eliminate the elements of the cruise mapping interpolation equation and transform it into an augmented matrix for back substitution to obtain the weighting coefficients of each discrete spatial coordinate pair corresponding to the interpolation points to be interpolated;

[0095] Based on the established degrees of freedom, construct an isometric interpolation map for the control of the labeling mechanism. By interpolating and calculating the weighting coefficients of each discrete spatial coordinate pair corresponding to the interpolation points to be interpolated in the isometric interpolation map one by one, generate an isometric contour map for the cruise operation of the labeling mechanism under the constraints of the established degrees of freedom, marked as the cruise operation isometric contour map;

[0096] According to the cruise operation isometric contour map, plan the cruise control decision for the best fitting site on the special-shaped surface of the target processed object by the labeling mechanism, obtain the cruise control strategy, and control the labeling mechanism to carry the labeling label and fit the target processed object along the operation transformation trajectory under the precondition criteria for the labeling mechanism to be in the ideal cruising pose, so as to obtain the labeling control scheme.

[0097] It should be noted that for the spatial mapping dependence of each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array in the cruise mapping distance matrix, this method is reflected by the semi-variance Gaussian model fitted by the semi-variance function, which reflects the spatial autocorrelation of the labeling mechanism carrying the label from the first discretized spatial coordinate array to the second discretized spatial coordinate array through cruise control, reveals the spatial control vector structure of the labeling mechanism cruising based on the fitting site, and provides an interpolation basis for the cruise mapping interpolation of subsequent alignment labeling. Identify the spatial correlation index of the labeling mechanism carrying the label from the first discretized spatial coordinate array to the second discretized spatial coordinate array through cruise control under the premise of the ideal cruising pose by the semi-variance Gaussian model. This spatial correlation index reflects the control quantity structure required for the labeling mechanism to cruise and fit the label onto the special-shaped surface, including the labeling control feed rate, labeling control angle, and labeling control scheduling, etc. This method uses this spatial correlation index to interpolate and visualize the cruise control of the labeling mechanism in the form of solving the cruise mapping interpolation equation set, and draws it as a cruise operation isometric contour map, so as to improve the accuracy of each control parameter when the labeling mechanism cruises and carries the label to fit the special-shaped surface of the target processed object, ensure the integrity and control rationality of the PLC labeling machine for the special-shaped surface label fitting, improve the labeling efficiency, optimize the labeling quality, and reduce phenomena such as wrinkles, bubbles or fitting misalignment during labeling.

[0098] More specifically, the step S108 specifically includes the following steps:

[0099] Obtain the label pasting log of the PLC label pasting machine, extract the defective rate of the label pasting of the label pasting head for the label to be pasted from the label pasting log. If the defective rate of the label pasting is higher than the minimum defective rate of the label pasting, obtain the specified pasting position of the label to be pasted;

[0100] Obtain the model specification information of the label pasting head, extract the basic grasping size of the grasping joint corresponding to each specified pasting position on the label pasting head from the model specification information, and preset the marginal threshold of the pasting position area based on the basic grasping size;

[0101] Construct the pasting position area of the label to be pasted, divide the pasting position area into M sub-areas based on the number of specified pasting positions, and perform the inclusion planning of the pasting positions for each sub-area until the boundary constraint of the marginal threshold of the pasting position area is reached, to obtain each sub-pasting position distribution area;

[0102] Extract the adhesion index of each sub-pasting position distribution area of the label to be pasted under the defective rate of the label pasting from the label pasting log. If the adhesion index exceeds the unqualified adhesion index, extract the sub-pasting position distribution area corresponding to the adhesion index and mark it as an unreasonable sub-pasting position distribution area;

[0103] Obtain the expected pasting requirement of the label to be pasted, obtain the expected adhesion index of the label to be pasted according to the expected pasting requirement, calculate the deviation of the adhesion index of the unreasonable sub-pasting position distribution area compared with the expected adhesion index, and obtain the adhesion index deviation value;

[0104] Construct the solution space of the pasting position according to the unreasonable sub-pasting position distribution area, obtain several remaining pasting position solutions in the solution space excluding the specified pasting positions, evaluate each pasting position solution based on the adhesion index deviation value, obtain the solution evaluation value, and only extract the pasting position solution corresponding to the maximum solution evaluation value and mark it as the best pasting position solution;

[0105] Construct the best pasting position matrix by obtaining the best pasting position solution of each unreasonable sub-pasting position distribution area, and control the grasping position and pasting force of the label pasting head for the label to be pasted according to the best pasting position matrix to improve the poor adhesion phenomenon.

[0106] It should be noted that most of the existing PLC labeling machines use a labeling head composed of multiple grasping joints to grasp the labeling labels. Multiple grasping joints can greatly improve the stability of the grasping, movement, and fitting of the labeling labels. However, if the grasping position and fitting force of the grasping joints on the labeling labels are not properly controlled, it may cause phenomena such as poor adhesion or looseness when the labeling labels are attached to the target workpiece, resulting in the labels falling off during transportation, which greatly affects the quality of label attachment. In this regard, through this method, the optimal fitting site can be screened based on the deviation required for the adhesion index of each local area of the labeling label to reach the expected adhesion index under the defective fitting rate, so that the grasping position and fitting force of the labeling head on the labeling label can be controlled more reasonably and accurately, improving the adhesion firmness of the label and reducing the defective fitting rate and scrap rate of the PLC labeling machine.

[0107] In addition, the control method of the PLC labeling machine based on fitting site cruise further includes the following steps:

[0108] Extract the fitting rework evaluation rate of the fitting head for the labeling label through the label fitting log of the PLC labeling machine. If the proportion of the fitting wrinkle rework rate in the fitting rework evaluation rate exceeds the preset proportion, then at this time, extract some samples from the target workpiece corresponding to the fitting wrinkle rework rate and define them as fitting abnormal samples;

[0109] Use the industrial vision camera installed on the PLC labeling machine to take pictures of the label fitting area on the fitting abnormal samples, obtain the image data of the label fitting area, introduce the gray level co-occurrence matrix algorithm to identify wrinkles in the image data, and obtain the actual fitting wrinkle characteristics of the label fitting area;

[0110] Based on the actual fitting wrinkle characteristics, construct the actual fitting wrinkle model diagram of the label fitting area, and obtain the preset control strategy of the PLC labeling machine through the label fitting log. Based on the preset control strategy, extract the actual fitting tension applied by each grasping joint of the labeling head when jointly grasping the labels in the label fitting area;

[0111] Obtain the mechanical mechanics knowledge graph through the big data network, and at the same time obtain the mechanical control principle and activity distribution pattern of each grasping joint on the labeling head. Based on the mechanical control principle, activity distribution pattern, and basic grasping size, identify the actual fitting tension in the mechanical mechanics knowledge graph to obtain the force application weights of each grasping joint when the labeling head jointly grasps to generate the actual fitting tension;

[0112] Introduce the K-means clustering algorithm, and perform clustering calculations on the actual fitting wrinkle model diagram associated with each grasping joint in the K-means clustering algorithm based on the force application weights to obtain the clustering result associated with the fitting tension;

[0113] Determine one or more gripping joints on the labeling head that cause actual fitting wrinkles in the label fitting by associating the clustering results of the fitting tension, and mark them as abnormal force-applying gripping joints. Perform force adjustment control on one or more of the abnormal force-applying gripping joints to eliminate the fitting wrinkles of the label by the fitting head.

[0114] It should be noted that the labeling head of the PLC labeling machine usually performs combined gripping control of multiple gripping joints to move and cruise to the label fitting area of the target workpiece for alignment. However, in some existing PLC labeling machines, the combined control error of multiple gripping joints on the labeling head is relatively large, resulting in improper fitting tension being applied when the multiple gripping joints grip the label. Both over-tight or over-loose fitting tension will cause fitting wrinkles in the label fitting area. The fitting wrinkles will cause the content on the label to be distorted and deformed, which is not conducive to reading and recognition during use, and reduces the reading and recognition performance and quality of the label itself. Therefore, through this method, it is possible to perform correlation traceability calculation on whether each gripping joint causes the actual fitting wrinkle feature based on the actual fitting tension applied during the combined gripping of the label in the label fitting area by the labeling head. According to the final clustering results, the gripping joints corresponding to the actual fitting wrinkle feature can be quickly obtained, and then the gripping force can be further adjusted to eliminate the fitting wrinkle phenomenon caused by improper combined gripping control of all gripping joints, improve the label fitting quality of the labeling head, avoid excessive fitting wrinkle defects, and reduce the label rework rate and label cost output.

[0115] The second aspect of the present invention provides a PLC labeling machine control system based on fitting site cruising, as Figure 3 shown. The PLC labeling machine control system includes a memory 31 and a processor 32. A PLC labeling machine control method program is stored in the memory 31. When the PLC labeling machine control method program is executed by the processor 32, the steps of any of the PLC labeling machine control methods are implemented.

[0116] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A PLC labeling machine control method based on fitting site cruising, characterized in that: The following steps are involved: S102: Acquire continuous image data of the labeling conveyance of the target object, define the best fitting position array of the target object according to the specification parameter information of the labeling label and the curvature of the labeling area surface of the target object, and linearly track the optical flow motion of the continuous image data based on the sliding window neighborhood preset in the best fitting position array to obtain the operation transformation trajectory of the best fitting position on the target object within a preset time period; S104: Acquire the tracking posture change of the industrial vision camera through the industrial vision camera position tracking the operation transformation trajectory, and acquire inertial measurement data, describe the posture time series state variables of the tracking posture change based on the pre-integration relativity of the inertial measurement data to the continuous image data, and obtain the ideal cruising posture of the labeling mechanism cruising and fitting relative to the best fitting position on the target workpiece under the operation transformation trajectory condition; S106: If the cruise function mode equipped with the PLC labeling machine is not compatible with the automatic cruise planning of the operation transformation trajectory corresponding to the profiled surface based on the ideal cruise posture as the control premise, then based on the cruise mapping distance matrix for labeling to the specified labeling processing area in the operation transformation trajectory mapping space coordinate domain, the labeling mechanism is controlled according to the semi-variance Gaussian model identification and solution of the cruise mapping distance matrix; S108: If the defective bonding rate of the labeling head for the labeling label is higher than the minimum defective bonding rate, the unreasonable sub-bonding site distribution field of the labeling label is extracted according to the criterion that the stickiness index exceeds the unqualified stickiness index, and the unreasonable sub-bonding site distribution field is screened for the best bonding site solution according to the expected bonding requirements of the labeling label to obtain the best bonding site matrix, and the bonding of the labeling head is controlled according to the best bonding site matrix; The step S102 specifically includes the following steps: Obtaining a specified labeling processing area of ​​the processing and transportation mechanism, and photographing the target processing object that begins to enter the specified labeling processing area within a preset time period frame by frame through an industrial vision camera mounted on the labeling mechanism, so as to obtain continuous image data of the target processing object during the labeling processing operation; Obtaining specification parameter information of the labeling label, synchronously obtaining the labeling task of the target object and the surface curvature of the labeling area, and planning and defining the fitting site of the surface curvature of the labeling area based on the specification parameter information and the labeling task to obtain the optimal fitting site array of the target object; A local sliding window neighborhood of pixels of the fitting sites is preset based on the matrix pattern expressed by the best fitting site array, and a Sobel operator is introduced to calculate the spatial gradient and the temporal gradient of every two adjacent frames of the continuous image data; The local sliding window area is divided into N sub-neighborhoods based on the number of best fitting sites, and for each sub-neighborhood, the linear dynamic motion of each sub-neighborhood is described by the optical flow components of the best fitting site pixels in the horizontal direction and the vertical direction, and the spatial gradient and the temporal gradient tracking, to generate an optical flow equation for each sub-neighborhood; Solve the optical flow equation to obtain the optical flow solution of each best fitting point pixel in each sub-neighborhood, repeat the above steps of calculating the spatial gradient and the temporal gradient and tracking and solving the optical flow equation in the image frame until each frame of the continuous image data is calculated and the iteration is stopped; After the iteration stops, the optical flow solutions of all the best fitting points in the continuous image data are output, and the operation transformation trajectory of the best fitting point on the target processing object within a preset time period is determined based on the optical flow solutions of all the best fitting points.

2. A PLC labeling machine control method based on fitting site cruising according to claim 1, characterized in that: The step S104 specifically includes the following steps: Tracking the operation transformation trajectory of the best fitting point on the target workpiece within the preset time period by an industrial vision camera to obtain the tracking posture change of the industrial vision camera cruising the best fitting point on the surface curvature of the labeling area; During the site tracking process, the inertial measurement unit carried on the labeling mechanism is used to collect inertial measurement data when the industrial visual camera runs the tracking posture change; wherein the inertial measurement data includes the angular velocity, linear acceleration and nonlinear acceleration of the gyroscope; Taking tracking posture changes as a constraint premise, the inertial measurement data is used to perform pre-integration calculations on the acceleration and angular velocity of the continuous image data during the labeling process of the target object to obtain a pre-integration result of the relative posture change, and the Kalman filter is used to perform a time-series state fusion of the tracking posture change and the pre-integration result to obtain a posture time-series state variable matrix; Extract the pre-integration error value of the inertial measurement data through the pre-integration result, depict the pose nodes based on the pose timing state variable matrix, define the state variable error constraints between each pose node based on the pre-integration error value, and construct the pose timing state model diagram according to the pose nodes and the state variable error constraints between each pose node; Taking the operation transformation trajectory as the target rule, presetting the square residual function according to the state variable error constraint, calculating the gradient of the square residual function with respect to the target rule, and generating the current approximate Hessian matrix of the posture timing state model diagram and the current gradient search direction according to the gradient; Preset the iteration depth threshold, perform linear iterative update on the state of each pose node in the current Hessian matrix through the current gradient search direction until the square residual function converges to the iteration depth threshold, and output the updated approximate Hessian matrix; The ideal cruising position of the labeling mechanism for cruising and fitting the best fitting position on the target object under the condition of the operation transformation trajectory is determined based on the state variable estimation of the updated approximate Hessian matrix.

3. A PLC labeling machine control method based on fitting site cruising according to claim 1, characterized in that: The step S106 specifically includes the following steps: Acquire functional mode information of the PLC labeling machine, and determine whether the autonomous cruise function equipped by the PLC labeling machine is compatible with the automated cruise planning of the corresponding operation change trajectory of the special-shaped surface based on the ideal cruise posture as the control premise according to the functional mode information; If the cruise function mode equipped with the PLC labeling machine is not compatible with the automatic cruise planning of the corresponding operation change trajectory of the special-shaped surface based on the ideal cruise posture as the control premise, then the initial design drawing of the labeling mechanism is obtained; Based on the initial design draft, the predetermined degrees of freedom and the maximum spatial operating range of the labeling mechanism are obtained, the spatial coordinates of the predetermined degrees of freedom are constructed by assigning the maximum spatial operating range as a boundary frame, and a spatial coordinate domain for the labeling mechanism to achieve the predetermined degrees of freedom is generated; Obtaining a discrete spatial coordinate array of the labeling mechanism to achieve an ideal cruising posture for labeling through a spatial coordinate domain, which is defined as a first discretized spatial coordinate array, and obtaining a discrete spatial coordinate array when the target object is located in a specified labeling processing area, which is defined as a second discretized spatial coordinate array; Based on the preset mapping clues of the operation transformation trajectory, the first discretized space coordinate array is cruise mapped to the second discretized space coordinate array according to the mapping clues as the target reference, and the Manhattan distance of each discrete space coordinate pair is continuously calculated one by one during the cruise mapping process to obtain a cruise mapping distance matrix; According to the cruise mapping distance matrix, a semi-variance Gaussian model of each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array is constructed, and the weighted coefficient of the corresponding interpolation point of each discrete spatial coordinate pair is solved by the spatial correlation index identified by the semi-variance Gaussian model. The cruise operation contour map is interpolated based on the weighted coefficient, and the labeling mechanism is controlled according to the cruise operation contour map.

4. A PLC labeling machine control method based on fitting site cruising according to claim 3, characterized in that: The method of constructing a semi-variance Gaussian model of each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array according to the cruise mapping distance matrix, solving the weighted coefficient of the corresponding interpolation point of each discrete spatial coordinate pair through the spatial correlation index identified by the semi-variance Gaussian model, drawing a cruise operation contour map based on the weighted coefficient interpolation, and controlling the labeling mechanism according to the cruise operation contour map specifically includes the following steps: Determine the semivariance of each discrete spatial coordinate pair between the first discretized spatial coordinate array and the second discretized spatial coordinate array according to the cruise mapping distance matrix, and obtain a plurality of semivariance functions; The maximum likelihood method is introduced to perform maximization calculation of exponential likelihood fitting on the several semivariance functions to obtain a series of semivariance parameters, and a semivariance Gaussian model is constructed according to the series of semivariance parameters; wherein the semivariance Gaussian model parameters include the range and effective distance of spatial association; Based on the semivariance function, identification is performed in the semivariance Gaussian model to determine the spatial correlation index of the first discretized space coordinate array reaching the second discretized space coordinate array according to the operation transformation trajectory under the premise of the ideal cruise posture; According to the spatial correlation index, the labeling mechanism is described in the premise that the labeling label is in an ideal cruise posture according to the operation transformation trajectory to carry the labeling label to fit the target processing object. The cruise mapping interpolation equations are transformed into an augmented matrix by elimination and back-substitution to solve, and the weight coefficient of each discrete space coordinate to the corresponding point to be interpolated is obtained; A contour interpolation map of the labeling mechanism control is constructed based on the given degrees of freedom, and a contour map of the labeling mechanism cruising under the given degrees of freedom constraints is generated by interpolating the weighted coefficients of each discrete spatial coordinate corresponding to the point to be interpolated in the contour interpolation map one by one, and marked as a cruising operation contour map; According to the cruise operation contour map, the cruise control decision of the labeling mechanism for the best fitting position on the special-shaped surface of the target processing object is planned to obtain a cruise control strategy. Based on the cruise control strategy, the labeling mechanism is controlled to fit the target processing object according to the operation transformation trajectory under the premise that the labeling mechanism is in an ideal cruise position, and a labeling control scheme is obtained.

5. The control method of a PLC labeling machine based on fitting site cruising according to claim 1 is characterized in that: The step S108 specifically includes the following steps: Obtain the label fitting log of the PLC labeling machine, extract the fitting defective rate of the labeling head for the labeling label through the label fitting log, and if the fitting defective rate is higher than the minimum fitting defective rate, obtain the specified fitting position of the labeling label; Obtain the model and specification information of the labeling head, extract the basic grasping size of the grasping joint corresponding to each specified fitting site on the labeling head through the model and specification information, and preset the fitting site area marginal threshold based on the basic grasping size; Constructing a fitting site field for labeling labels, dividing the fitting site field into M sub-fields based on the number of specified fitting sites, and performing fitting site inclusion planning for each sub-field until a boundary constraint of a fitting site region marginal threshold is reached, thereby obtaining each sub-fitting site distribution field; Extract the stickiness index of each sub-sticking site distribution area of ​​the labeled label under the defective sticking rate through the label sticking log; if the stickiness index exceeds the unqualified stickiness index, extract the sub-sticking site distribution area corresponding to the stickiness index and mark it as an unreasonable sub-sticking site distribution area; Obtaining an expected fitting requirement of the labeling label, obtaining an expected adhesion index of the labeling label according to the expected fitting requirement, calculating a deviation of the adhesion index of the unreasonable sub-fitting site distribution area compared to the expected adhesion index, and obtaining an adhesion index deviation value; According to the distribution field of unreasonable sub-fitting sites, a solution space of fitting sites is constructed, and several fitting site solutions remaining in the solution space excluding the specified fitting sites are obtained. Each fitting site solution is evaluated based on the stickiness index deviation value to obtain a solution evaluation value, and only the fitting site solution corresponding to the maximum solution evaluation value is extracted and marked as the best fitting site solution; The optimal fitting site matrix is ​​constructed by obtaining the optimal fitting site solution of each unreasonable sub-fitting site distribution field. The grabbing site and fitting force of the labeling head for the labeling label are controlled according to the optimal fitting site matrix to improve the poor adhesion phenomenon.

6. A PLC labeling machine control system based on fitting site cruising, characterized in that: The PLC labeling machine control system includes a memory and a processor. The memory stores a PLC labeling machine control method program based on fitting site cruising. When the PLC labeling machine control method program is executed by the processor, the PLC labeling machine control method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Labeling condition detection method based on machine vision and labeling system

    CN117602198A

  • Self-adaptive control method and device for clamping jaw for material taking and conveying of labeling machine

    CN118811238A