Packaging box production line-oriented printing quality online detection method and system

CN122956845APending Publication Date: 2026-10-23GUANGZHOU HENGHUI PACKAGING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611370044.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0005]本发明提供面向包装盒生产线的印刷质量在线检测方法及系统,以解决现有技术中柔性包装盒在高速输送检测过程中易发生表面形变和高频抖动,导致线阵成像模糊、模板比对误差增大及缺陷误报漏检的技术问题

Benefits of technology

[0012]进一步地,实时测量包装盒受控表面相对于基准形态的关键点三维位移,包括:分别获取包装盒顶面和侧面关键点在对应测量方向上的实时位移测量数据,并通过传送机构编码器同步获取包装盒沿输送方向的实时位置数据;基于各激光位移传感器的阵列安装坐标、对应测量方向上的实时位移测量数据以及包装盒沿输送方向的实时位置数据,构建各关键点的三维局部坐标向量,并通过坐标系转换矩阵将三维局部坐标向量统一至世界坐标系,得到各关键点的三维坐标;基于包装盒的实时输送位置或实时位姿,得到当前采样时刻对应的基准对齐三维坐标;将当前采样时刻各关键点的三维坐标与基准对齐三维坐标对应相减,得到剔除刚体输送位移后的各关键点三维位移偏差向量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122956845A_ABST
    Figure CN122956845A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of packaging box printing, and particularly relates to a printing quality online detection method and system for a packaging box production line, comprising: before the packaging box enters a high-speed conveying channel, a modal test and a three-dimensional geometric scan are performed on a packaging box sample, an electromechanical fusion model containing the characteristics of the flexible body of the packaging box sample and the interaction of the gripper is constructed through system recognition; based on a preset motion trajectory of a conveying mechanism, in combination with the electromechanical fusion model, a predictive calculation of a timing instruction of an active clamping force required to offset an expected motion disturbance is performed in a feedforward manner through an inverse model controller; during the clamping and conveying of the packaging box, the three-dimensional displacement of key points of the controlled surface of the packaging box relative to the reference shape is measured in real time through at least two groups of laser displacement sensor arrays arranged in a non-planar manner. The present application reduces the shaking, deformation and imaging blur caused by high-speed conveying, and improves the accuracy of printing defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of packaging box printing technology, specifically relating to an online printing quality inspection method and system for packaging box production lines. Background Technology

[0002] As the packaging and printing industry moves towards higher speeds and automation, packaging box production lines not only require higher inspection efficiency but also place greater demands on appearance consistency and printing quality stability. To ensure product quality and brand presentation, packaging box surfaces typically undergo machine vision defect inspection before leaving the factory. To match the high-speed production line pace, packaging boxes often need to pass continuously and rapidly through the conveyor belt at the inspection station. However, packaging boxes are mostly made of lightweight, flexible materials such as cardboard, with limited structural rigidity. During high-speed conveying and mechanical clamping, they are easily affected by factors such as vibrations from the conveyor mechanism, acceleration and deceleration inertial impacts, airflow disturbances, and uneven distribution of clamping forces, resulting in spatial positional shifts, minor surface deformations, and high-frequency vibrations, making it difficult for the inspected surface to maintain a flat and stable state over a long period.

[0003] Patent application CN119624971A discloses a visual recognition-based method and system for detecting defects in cardboard box printing. The method includes: acquiring cardboard box images using an image acquisition device; calculating grayscale feature values ​​for each pixel based on its grayscale value and the grayscale differences within its neighborhood, reflecting grayscale variations in local areas; calculating the degree of variation of pixels based on the grayscale feature values, where the degree of variation characterizes the disorder of the pixels; constructing a co-occurrence matrix of variation degrees to describe the joint distribution characteristics among different degrees of variation; calculating the defect degree of each pixel based on the co-occurrence matrix of variation degrees; and identifying pixels with defect degrees greater than a set threshold as defective pixels.

[0004] The aforementioned deformations and jitters directly affect the imaging quality of line scan cameras. High-speed printing quality inspection typically relies on high-resolution line scan cameras to scan the surface of packaging boxes line by line. When the packaging box surface experiences local warping, posture shifts, or high-frequency vibrations during exposure and scanning, the acquired images are prone to geometric distortion, pixel misalignment, local stretching, and defocusing. When these distorted images enter the defect comparison module, they may misjudge pattern misalignment caused by posture deviations or surface deformation as printing defects, increasing false alarms. At the same time, blurring and stretching may also mask real defects such as small missing prints, dirt, and misregistration, reducing the reliability of detection. Traditional static clamping or guiding mechanisms mainly rely on mechanical limits, making it difficult to combine the dynamic characteristics of the flexible packaging box to predict and compensate for operational disturbances in real time, and also difficult to continuously control the deformation state of the inspection surface under high-speed transport conditions. Therefore, there is an urgent need for an online detection method that can measure, actively compensate for, and stably trigger imaging of flexible deformation during high-speed transport of packaging boxes to improve the accuracy of printing defect detection and production line adaptability. Summary of the Invention

[0005] This invention provides an online printing quality inspection method and system for packaging box production lines to solve the technical problems in the prior art where flexible packaging boxes are prone to surface deformation and high-frequency vibration during high-speed conveying and inspection, resulting in blurred linear array imaging, increased template comparison error, and false alarms and missed detections of defects.

[0006] In a first aspect, the present invention provides an online printing quality inspection method for packaging box production lines, comprising the following steps: S1, before the packaging box enters the high-speed conveyor channel, modal testing and three-dimensional geometric scanning are performed on the packaging box sample, and an electromechanical fusion model containing the flexible body characteristics of the packaging box sample and the interaction of the gripper is constructed through system identification; S2, based on the preset motion trajectory of the conveying mechanism, combined with the electromechanical fusion model, the timing command of the active clamping force required to counteract the expected motion disturbance is predictively calculated in a feedforward manner through an inverse model controller; S3, during the clamping and conveying of the packaging box, key points of the controlled surface of the packaging box relative to the reference shape are measured in real time through at least two sets of non-planar laser displacement sensor arrays. S4. The real-time surface deformation field representing the response of the packaging box is calculated by performing three-dimensional displacement; S5. The real-time surface deformation field is used as a feedback signal and input to the inverse model controller to correct the timing command of the active clamping force online, so that the performance index of the real-time surface deformation field converges within the preset stable range; Based on the real-time surface deformation field and the output torque data of each clamp, the key parameters of the electromechanical fusion model are corrected and updated online using a recursive identification algorithm, and the updated model is used for feedforward calculation; S6. The performance index of the surface deformation field is monitored in real time. When the surface deformation field is kept within the preset stable range, indicating that a stable state has been reached, the linear scan camera is triggered to acquire the surface printing image, and the acquired image is compared with the standard template image to complete the defect detection.

[0007] Its effects are as follows: It proposes a complete online inspection process for packaging box printing. First, an electromechanical fusion model of the interaction between the cardboard box's flexibility and clamping is established offline. The clamping force is compensated by feedforward calculation based on the production line's motion trajectory. During transport, a non-planar laser array is used to collect three-dimensional displacement and construct a deformation field as feedback to correct the clamping force, while simultaneously updating the model parameters online. After the deformation stabilizes over a long period, a linear scan camera is triggered to image and compare defects. The entire process collaboratively suppresses cardboard box vibration, deformation, and image blurring caused by high-speed transport, solving the problems of misjudgment and missed detection of defects caused by deformation, and adapting to the continuous inspection needs of high-speed automated packaging production lines.

[0008] Furthermore, modal testing and three-dimensional geometric scanning were performed on the packaging box sample. An electromechanical fusion model was constructed through system identification, incorporating the flexible body characteristics of the packaging box sample and the interaction with the gripper. This included: applying a broadband random frequency sweep excitation force signal of a preset frequency to the geometric center of the packaging box sample using a vibrator; simultaneously acquiring three-dimensional response acceleration data using three triaxial accelerometers arranged in an equilateral triangle on the surface of the packaging box sample; acquiring three-dimensional point cloud data of the packaging box sample surface using a three-dimensional laser scanner, and triangulating the surface three-dimensional point cloud data to construct a three-dimensional finite element mesh model; and extracting natural frequencies, mode shape vectors, and damping ratios from the broadband random frequency sweep excitation force signal and the three-dimensional response acceleration data using a frequency domain subspace identification algorithm, and combining this with the three-dimensional finite element mesh model to establish an electromechanical fusion model including the mass matrix, damping matrix, and stiffness matrix.

[0009] Its effects are as follows: It refines the methods for constructing electromechanical integration models, utilizing frequency sweep excitation at the center of the exciter and collecting vibration responses from triangularly arranged triaxial accelerometers. A finite element mesh is constructed using a 3D laser scanner, and modal parameters are extracted through frequency domain subspace identification to build a dynamic model containing mass, damping, and stiffness matrices. It accurately quantifies the mechanical coupling relationship between the flexible body of the cardboard box and the clamping mechanism, overcoming the shortcomings of traditional static models that neglect vibration modes and clamping interactions, significantly improving the accuracy of the dynamic model, and providing reliable underlying model support for accurate prediction of feedforward clamping force and disturbance compensation.

[0010] Furthermore, the timing command of the active clamping force required to counteract the expected motion disturbance is calculated predictively using a feedforward method. This includes: acquiring the expected acceleration vector in the preset transmission trajectory of the transmission mechanism and calculating the expected external excitation disturbance vector accordingly; setting the expected relative deformation displacement vector, expected relative deformation velocity vector, and expected relative deformation acceleration vector on the surface of the packaging box; inputting the expected relative deformation displacement vector, expected relative deformation velocity vector, and expected relative deformation acceleration vector to the inverse model controller, and calculating the feedforward active clamping force by combining the electromechanical fusion model through inverse dynamics; setting the maximum spatial deformation of the packaging box surface not exceeding the preset control deformation threshold as a displacement constraint condition, solving the output torque distribution matrix of each clamp servo motor under the displacement constraint condition, and converting the output torque distribution matrix into the corresponding active clamping force timing command.

[0011] Its effects are as follows: it limits the calculation logic of the feedforward clamping force timing command, solves for external disturbances based on the acceleration of the production line trajectory, and uses the electromechanical fusion model to solve for the theoretical compensation clamping force in reverse. At the same time, it limits the maximum deformation threshold of the carton, optimizes the distribution of the output torque of each servo motor, and converts it into timing control commands. It can output the compensation force in advance before the carton deformation occurs, and use feedforward control to offset the inertial disturbances of the conveyor belt acceleration and deceleration, make up for the lag defects of pure feedback control, reduce the carton offset warping from the source of disturbance, and effectively reduce the adjustment load of the subsequent closed-loop feedback system.

[0012] Furthermore, real-time measurement of the three-dimensional displacement of key points on the controlled surface of the packaging box relative to the reference shape includes: acquiring real-time displacement measurement data of key points on the top and side surfaces of the packaging box in the corresponding measurement directions, and synchronously acquiring real-time position data of the packaging box along the conveying direction through the encoder of the conveying mechanism; constructing three-dimensional local coordinate vectors of each key point based on the array installation coordinates of each laser displacement sensor, the real-time displacement measurement data in the corresponding measurement directions, and the real-time position data of the packaging box along the conveying direction, and unifying the three-dimensional local coordinate vectors to the world coordinate system through a coordinate system transformation matrix to obtain the three-dimensional coordinates of each key point; obtaining the reference-aligned three-dimensional coordinates corresponding to the current sampling time based on the real-time conveying position or real-time pose of the packaging box; subtracting the corresponding three-dimensional coordinates of each key point at the current sampling time from the reference-aligned three-dimensional coordinates to obtain the three-dimensional displacement deviation vector of each key point after removing the rigid body conveying displacement.

[0013] Its effectiveness lies in the following: A dual-array laser system with an encoder is designed to synchronously acquire displacement and transport position data. This data is then transformed to a global coordinate system, aligned with the reference coordinates, and the overall rigid displacement of the cardboard box is eliminated, retaining only the three-dimensional displacement deviation corresponding to the cardboard box's own flexible deformation. This effectively separates two types of interference: the overall transport movement of the cardboard box and localized stress deformation. It filters out data interference caused by transport displacement, accurately reproducing the true deformation state of the cardboard box, ensuring the authenticity and effectiveness of the deformation field input feedback signal, and providing accurate raw measurement data for subsequent closed-loop force control and deformation field calculation.

[0014] Furthermore, the real-time surface deformation field representing the response of the packaging box is calculated, including: Based on the three-dimensional coordinates of the key points at the current sampling time, the B-spline surface fitting algorithm is used to reconstruct the continuous spatial surface of the controlled surface of the packaging box. Extract the coordinate matrix of the mesh nodes after the reconstruction of the continuous surface, and perform node correspondence subtraction operation with the coordinate matrix of the reference node under the same mesh node correspondence after being aligned with the rigid body of the current transport position or real-time pose. By obtaining the three-dimensional displacement deviation vector set of each node, a real-time surface deformation field representing the stress deformation state of the packaging box is obtained.

[0015] Its effects are as follows: By using B-spline surface fitting to reconstruct the continuous surface of the cardboard box from discrete measurement points, and performing difference calculations between the fitted grid nodes and the reference grid to obtain the global displacement deviation, a complete and continuous surface deformation field is constructed. This fills the measurement blind spots between laser sensor measurement points, enabling quantitative characterization of the cardboard box's microscopic warping and macroscopic torsional deformation across the entire domain. It overcomes the limitation of relying solely on discrete measurement points to determine deformation, outputting high-precision deformation data across the entire domain, providing comprehensive and continuous deformation state data for closed-loop adjustment of clamping force and steady-state imaging determination.

[0016] Furthermore, to ensure that the performance indicators of the real-time surface deformation field converge within a preset stable range, the following steps are taken: extracting the three-dimensional displacement deviation vector of the preset tracking observation node from the real-time surface deformation field as the representative deformation error vector at the current moment; inputting it into a feedback regulator using a PID control law to calculate the feedback compensation clamping force. The feedback compensation clamping force vector is the negative weighted sum of the results obtained by applying the proportional gain coefficient matrix, integral gain coefficient matrix, and differential gain coefficient matrix to the representative deformation error vector, the integral term of the representative deformation error vector with respect to time, and the differential term of the representative deformation error vector with respect to time, respectively; superimposing the feedback compensation clamping force vector with the feedforward active clamping force vector at the corresponding moment, and mapping it to the torque control quantity corresponding to each clamp servo motor through the clamping force allocation matrix, generating a clamping force control command, and driving each clamp servo motor to execute the corresponding torque output.

[0017] Furthermore, based on the real-time surface deformation field and the output torque data of each gripper, a recursive identification algorithm is used to perform online correction and updating of the key parameters of the mechatronics fusion model, and the updated model is used for feedforward calculations, including: Establish a sliding time window and cache historical observation datasets containing real-time surface deformation field data and output torque feedback data of each gripper servo motor within a set period. An extended Kalman filter algorithm is used, with elements of the damping matrix and stiffness matrix as state variables and historical observation datasets as observation variables, to perform state estimation and parameter updates. By replacing the original matrix parameters in the mechatronics model with updated state variables, online correction and updating of system model parameters can be achieved without shutting down the system.

[0018] Furthermore, the performance indicators of the surface deformation field are monitored in real time. When the surface deformation field remains within a preset stable range, indicating that a stable state has been reached, the linear scan camera is triggered to acquire a printed image of the surface. The acquired image is then compared with a standard template image to complete defect detection, including: When the system is determined to be in a stable state, an enable signal is output to the image acquisition control terminal. Combined with the encoder pulse signal of the transmission mechanism, a line synchronization trigger pulse is output to drive the line scan camera to acquire equidistant spatial images and store the acquired images in the memory buffer. The acquired image is read from the memory buffer, and the acquired image is registered and compared with the standard template image to obtain the printing defect detection result.

[0019] Furthermore, the magnitude of the representative deformation error vector is compared with the preset imaging stable deformation threshold in real time; When the magnitude of the representative deformation error vector at a single sampling moment is less than or equal to the preset imaging stable deformation threshold, the time value of the stabilization timer is incremented; if the magnitude of the representative deformation error vector exceeds the preset imaging stable deformation threshold, the stabilization timer is cleared and the timing restarts. When the cumulative time of the stabilization timer reaches the preset duration continuously, it is determined that the packaging box has entered a stable state.

[0020] Secondly, the present invention provides an online printing quality inspection system for a packaging box production line, including a memory and a processor. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned online printing quality inspection method for a packaging box production line is implemented.

[0021] The beneficial effects are as follows: This invention constructs an electromechanical fusion model characterizing the flexible body properties of the packaging box and the interaction relationship of the grippers through modal testing and three-dimensional geometric scanning. Combined with the motion trajectory of the conveying mechanism, it pre-calculates active clamping force commands to counteract motion disturbances. During the conveying process, a laser displacement sensor array is used to acquire the three-dimensional displacement of key points in real time and generate a surface deformation field, which is used as a feedback signal to correct the clamping force, making the surface deformation tend towards a preset stable range. Simultaneously, the model parameters are corrected online based on the deformation field and output torque data, improving the matching degree between the compensation command and the actual state, thereby reducing jitter, deformation, and imaging blur caused by high-speed conveying, and improving the accuracy of printing defect detection. Attached Figure Description

[0022] Figure 1 This is a flowchart of an online printing quality inspection method for packaging box production lines.

[0023] Figure 2 This is a schematic diagram of the excitation force spectrum for broadband random frequency sweeping.

[0024] Figure 3 This is a curve comparing deformation errors over 100 hours. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] An embodiment of the online printing quality inspection method for packaging box production lines provided by the present invention: like Figure 1 As shown, the online printing quality inspection method for packaging box production lines includes the following steps: S1, Modal scanning identifies the electromechanical fusion model of the cardboard box clamping mechanism.

[0027] Before the packaging box enters the high-speed conveyor channel, modal testing and three-dimensional geometric scanning are performed on the packaging box sample. Through system identification, an electromechanical fusion model is constructed that includes the flexible body characteristics of the packaging box sample and the interaction of the gripper.

[0028] A broadband white noise excitation signal was applied to the packaging box sample using a miniature electromagnetic exciter. A triaxial accelerometer based on a microelectromechanical system (MEMS) was used to acquire the vibration response signal of the packaging box, and the excitation force signal output by the exciter was recorded simultaneously. A fast Fourier transform algorithm was used to convert the time-domain vibration signal into a frequency-domain frequency response function. A feature system was employed to implement the algorithm to extract the natural frequencies and principal mode parameters of the packaging box. A structured light 3D scanner was used to acquire spatial point cloud data of the packaging box surface. An iterative nearest-point algorithm was used to perform point cloud stitching and filtering noise reduction to reconstruct a high-precision 3D geometric mesh.

[0029] Combining the extracted modal parameters and 3D geometric mesh, a second-order dynamic equation for the flexible body, including the equivalent mass matrix, equivalent damping matrix, and equivalent stiffness matrix of the packaging box, is established using the Lagrange equation. The electrical time constant and mechanical transmission ratio of the gripper servo motor are obtained through testing, and the gripper's action is equivalent to boundary constraint terms or external control force terms in the dynamic equation. The state-space subspace system identification algorithm function is used to fit the above input-output measured data, constructing a discretized electromechanical fusion state-space model that incorporates the fusion interaction between the flexible body characteristics and the gripper stiffness. The spectrum of the excitation signal applied to the geometric center of the packaging box is shown below. Figure 2 As shown.

[0030] In an optional embodiment, before the packaging box enters the high-speed conveyor channel, modal testing and three-dimensional geometric scanning are performed on the packaging box sample. An electromechanical fusion model is constructed through system identification, incorporating the flexible body characteristics of the packaging box sample and the interaction with the gripper, including: A broadband random frequency sweep excitation force signal of a preset frequency is applied to the geometric center of the packaging box sample using an exciter, and three triaxial accelerometers arranged in an equilateral triangle on the surface of the packaging box sample are used to synchronously collect three-dimensional response acceleration data. A 3D laser scanner was used to acquire 3D point cloud data of the surface of the packaging box sample, and the 3D point cloud data was triangulated to construct a 3D finite element mesh model. The frequency domain subspace identification algorithm is used to extract the natural frequency, mode shape vector and damping ratio from the broadband random frequency sweep excitation force signal and three-dimensional response acceleration data. Combined with the three-dimensional finite element mesh model, an electromechanical fusion model including the mass matrix, damping matrix and stiffness matrix is ​​established.

[0031] A miniature electromagnetic exciter was positioned at the geometric center of the paper packaging box, driving it to output a broadband random frequency sweep excitation force with an amplitude between 0.5N and 2.0N. To obtain the modal response, three miniature triaxial accelerometers, with a sensitivity set to 100mV / g and a sampling frequency set to 10kHz, were fixed to the surface of the packaging box in an equilateral triangular array with a side length of 50mm. A 3D laser scanner with a measurement accuracy of 0.01mm was simultaneously activated to scan the sample. The acquired point cloud data was discretized into a 3D finite element mesh node model with a side length of approximately 2mm using the Delaunay triangulation algorithm.

[0032] The computational processing unit constructs a frequency response function based on the synchronously acquired excitation force signal and three-dimensional response acceleration data. It then uses a frequency domain subspace identification algorithm to extract the first five modal parameters of the packaging box, such as the first natural frequency of 25Hz, the second natural frequency of 45Hz, and modal damping ratios distributed between 0.02 and 0.05. The extracted natural frequencies, damping ratios, and mode shape vectors are modally matched with the three-dimensional finite element mesh model to establish and correct the equivalent mass matrix M, damping matrix C, and stiffness matrix K of the packaging box, forming a second-order dynamic model of the flexible body. In this model, the mass matrix M is multiplied by the second-order time derivative of the three-dimensional displacement vector at the measuring points on the packaging box surface; the damping matrix C is multiplied by the first-order time derivative of the three-dimensional displacement vector; and the stiffness matrix K is multiplied by the three-dimensional displacement vector. The sum of these three is equal to the sum of the external excitation disturbance vector generated by the conveying mechanism and the active clamping force vector applied by the gripper. The model is used to describe environmental vibrations. Servo control force The dynamic relationship between the packaging box and the surface deformation response.

[0033] S2, relying on the trajectory model feedforward to solve the clamping force command.

[0034] Based on the preset motion trajectory of the conveying mechanism, combined with the electromechanical fusion model, the inverse model controller predictively calculates the timing command of the active clamping force required to counteract the expected motion disturbance in a feedforward manner.

[0035] The pre-planned non-uniform rational B-spline smooth motion trajectory data within the main controller of the conveying mechanism is acquired via an industrial Ethernet bus. First-order and second-order forward differences are calculated for the discrete displacement nodes of the trajectory data to obtain the expected velocity and acceleration sequences of the packaging box during future transport. This sequence is then substituted into the discretized electromechanical fusion state-space model as a defined basic excitation disturbance term. A zero-phase error tracking control algorithm is used to invert the system matrix of the state-space model to obtain a globally phase-lag-free inverse dynamic transfer function. Combined with an operator-partitioned quadratic programming solver algorithm, with the objective function of minimizing the tracking error, the optimal solution for quadratic programming, constrained by the servo system's maximum clamping stroke and the motor's peak torque boundary, is calculated. Active clamping force timing commands capable of counteracting translational inertial force disturbances and modal resonance responses are predictively generated for each distributed clamping axis in a millisecond-level discrete time step using a feedforward method.

[0036] In an optional embodiment, based on the preset motion trajectory of the conveying mechanism and combined with an electromechanical fusion model, an inverse model controller predictively calculates the timing command of the active clamping force required to counteract the expected motion disturbance using a feedforward method, including: Obtain the expected acceleration vector in the preset transmission trajectory of the transmission mechanism, and calculate the expected external excitation disturbance vector accordingly; Define the expected relative deformation displacement vector, expected relative deformation velocity vector, and expected relative deformation acceleration vector of the packaging box surface; The expected relative deformation displacement vector, expected relative deformation velocity vector, and expected relative deformation acceleration vector are input into the inverse model controller, and the feedforward active clamping force is calculated by inverse dynamics solution in combination with the electromechanical fusion model. The maximum spatial deformation of the packaging box surface is set to not exceed the preset control deformation threshold as a displacement constraint condition. The output torque distribution matrix of each gripper servo motor under the displacement constraint condition is solved, and the output torque distribution matrix is ​​converted into the corresponding active gripping force timing command.

[0037] When calculating the feedforward active clamping force command, the controller extracts the expected acceleration vector of the current S-shaped speed planning curve from the conveyor belt's motion controller via the EtherCAT industrial bus. For example, the maximum motion acceleration of the conveyor channel is set to 5 m / s², and multiplied by the equivalent mass of the packaging box to calculate the expected external excitation disturbance vector. To keep the packaging box flat during clamping and conveying, the expected relative deformation displacement is... Expected relative deformation rate and expected relative deformation acceleration Input inverse model controller. Specifically, feedforward active clamping force vector. This equals the product of the mass matrix M and the expected relative deformation acceleration vector, plus the product of the damping matrix C and the expected relative deformation velocity vector, plus the product of the stiffness matrix K and the expected relative deformation displacement vector, minus the expected external excitation disturbance vector. .

[0038] When the control objective is to maintain the flatness of the packaging box surface relative to the reference shape, the expected relative deformation displacement, expected relative deformation velocity, and expected relative deformation acceleration can be set as zero vectors. In this case, the feedforward active clamping force vector is numerically equal to the inverse vector of the external excitation disturbance force vector, which is used to offset the external acceleration disturbance in advance. Subsequently, with the maximum spatial deformation not exceeding 0.05mm as a constraint, a quadratic programming optimization algorithm is used to distribute the calculated feedforward active clamping force to each actuator. For example, for a 4-point direct-drive voice coil clamping mechanism, the controller solves the output torque distribution matrix within a 1-millisecond control cycle and converts the continuous compensation torque values ​​into corresponding servo current feedforward command timing sequences for issuance, so that the actuator outputs compensation clamping torque when an external acceleration disturbance occurs.

[0039] S3, using a non-planar laser array to measure displacement and solve for the surface deformation field.

[0040] During the packaging box clamping and conveying process, at least two sets of laser displacement sensor arrays with different orientations are used to measure the three-dimensional displacement of key points on the controlled surface of the packaging box relative to the reference shape in real time, and calculate the real-time surface deformation field representing the response of the packaging box.

[0041] Multiple high-speed laser triangulation sensors are arranged on non-linear rigid supports above and to the sides of the conveyor channel. Distance measurement data of the controlled surface of the packaging box is continuously acquired via real-time industrial Ethernet protocol in a synchronous sampling manner. Based on the coordinate transformation relationship obtained from equipment calibration, the measurement data in the local coordinate system of each sensor, the sensor array installation coordinates, and the real-time position data of the conveying direction acquired by the encoder are combined to form the local three-dimensional coordinates of each key point. These coordinates are then transformed to a unified world coordinate system to obtain the three-dimensional coordinates of each key point at the current sampling time. According to the real-time conveying position or pose of the packaging box, the static reference coordinates obtained from the three-dimensional geometric scan are rigidly aligned to obtain the reference alignment coordinates corresponding to the current sampling time. The three-dimensional coordinates at the current sampling time are subtracted from the reference alignment coordinates to generate a three-dimensional displacement deviation vector after removing the rigid body conveying displacement.

[0042] The radial basis function spatial interpolation algorithm is called to fit the discrete three-dimensional displacement deviation vector to a continuous spatial surface across the entire surface. The singular value decomposition matrix algorithm is then used to truncate, reduce the dimension, and smooth the fitted high-dimensional deformation feature matrix. This process yields a real-time surface deformation field model that can represent the microscopic undulations and macroscopic torsional state of the packaging box surface.

[0043] In an optional embodiment, during the packaging box clamping and conveying process, at least two sets of non-planar laser displacement sensor arrays are used to measure the three-dimensional displacement of key points on the controlled surface of the packaging box relative to a reference shape in real time, including: A laser displacement sensor array with different surfaces is arranged above and on the side of the conveying mechanism to obtain real-time displacement measurement data of key points on the top and side surfaces of the packaging box in the corresponding measurement directions. The real-time position data of the packaging box along the conveying direction is obtained synchronously through the encoder of the conveying mechanism. Based on the array installation coordinates of each laser displacement sensor, the real-time displacement measurement data in the corresponding measurement direction, and the real-time position data of the packaging box along the conveying direction, a three-dimensional local coordinate vector of each key point is constructed. The three-dimensional local coordinate vector is then unified to the world coordinate system through a coordinate system transformation matrix to obtain the three-dimensional coordinates of each key point at the current sampling time. Based on the real-time transport position or real-time pose of the packaging box, the reference three-dimensional coordinates in the initial calibration state or the static state without external force are rigidly aligned to obtain the reference aligned three-dimensional coordinates corresponding to the current sampling time. Subtract the corresponding three-dimensional coordinates of each key point at the current sampling time from the three-dimensional coordinates aligned with the reference to obtain the three-dimensional displacement deviation vector of each key point after removing the rigid body transport displacement.

[0044] The displacement measurement system employs a cross-array hardware layout. Four high-frequency laser displacement sensors are vertically suspended 150mm directly above the conveyor channel, forming the first array to measure Z-axis height. Four identical sensors are symmetrically installed 100mm horizontally to the side of the channel, forming the second array to measure Y-axis depth. The single-point measurement accuracy of each sensor is calibrated to 1 micrometer. To achieve measurement synchronization, all laser sensors and the high-resolution photoelectric encoder recording the X-axis conveyor position are set to 10,000 pulses / revolution. Synchronization is achieved through hardware interrupt signals generated by a field-programmable gate array (FPGA). The array's trigger sampling period is set to 0.1 milliseconds, corresponding to a 10kHz sampling rate. After each synchronization sampling trigger, the underlying DSP processor performs matrix space mapping operations.

[0045] Taking a Z-axis laser displacement sensor in the first array as an example, the current encoder output position in the conveying direction is denoted as... The transverse mounting coordinates of the sensor in the array are as follows: The height value measured by laser is recorded as Then construct the local coordinate vector of the key point on the top surface. Taking a Y-axis laser displacement sensor in the second array as an example, the current encoder output position in the conveying direction is denoted as... The vertical mounting coordinates of the sensor in the array are as follows: The depth value measured by laser is denoted as Then construct the local coordinate vector of the key point on that side. Then, the rotation matrix and translation offset vector determined during the device calibration phase are invoked to uniformly transform the local coordinate vectors to the world coordinate system. Specifically, the 3D coordinates in the world coordinate system are equal to the product of the rotation matrix of the corresponding sensor array to the world coordinate system and the local coordinate vector of the corresponding key point, plus the spatial translation offset vector of the corresponding sensor array. This matrix operation reconstructs the discrete distance values ​​of the eight independent sensors distributed on two skew planes into a unified world coordinate system. Three-dimensional coordinate set.

[0046] In an optional embodiment, the real-time surface deformation field representing the response of the packaging box is calculated, including: Based on the three-dimensional coordinates of the key points at the current sampling time, the B-spline surface fitting algorithm is used to reconstruct the continuous spatial surface of the controlled surface of the packaging box. Extract the coordinate matrix of the mesh nodes after the reconstruction of the continuous surface, and perform node correspondence subtraction operation with the coordinate matrix of the reference node under the same mesh node correspondence after being aligned with the rigid body of the current transport position or real-time pose. By obtaining the three-dimensional displacement deviation vector set of each node, a real-time surface deformation field representing the stress deformation state of the packaging box is obtained.

[0047] After obtaining the 3D discrete key points in a unified coordinate system, the controlled surface is geometrically reconstructed using an internally integrated GPU parallel computing platform. Cubic B-spline basis functions are selected along the u and v parameterization directions. and Combined with a weighted least squares approximation algorithm, the inverse solution of a finite number of real-time spatial observation points is mapped into a control vertex matrix with a dimension of 10×10. Specifically, for surface space points in parametric surface coordinates u and v Its three-dimensional coordinates are equal to the cubic B-spline basis function based on parameter u. Cubic B-spline basis functions based on parameter v and the corresponding control vertices The result is obtained by multiplying the three values ​​and then doubly summing over all control vertex indices i and j. This analytical mathematical operation transforms the originally scattered point data into continuous data. The spatial analytical surface fills the spatial measurement blind spot caused by the sensor installation spacing, making the overall surface fitting spatial error tend to be within the tolerance range of 5 micrometers under calibration conditions.

[0048] After constructing the parametric surface equations, a three-dimensional coordinate matrix containing thousands of computational mesh nodes is discretized from the fitted continuous surface based on a set high-density spatial resolution of 1mm × 1mm. The reference node coordinate matrix, stored offline in a static, unforced state, is retrieved and rigidly aligned with the current transport position or real-time pose to ensure it corresponds to the mesh node coordinate matrix of the reconstructed surface. Subsequently, element-wise subtraction of the node coordinates is performed. The output is a displacement deviation vector set containing the dX, dY, and dZ components of each mesh node. This vector set data constitutes a real-time surface deformation field, representing the local micro-buckling and macroscopic surface warping of the packaging box during transport.

[0049] S4, the deformation field feedback adjusts the clamping force and updates the dynamic model online.

[0050] The real-time surface deformation field is used as a feedback signal and input to the inverse model controller to correct the timing command of the active clamping force online, so that the performance index of the real-time surface deformation field converges within the preset stable range. Based on the real-time surface deformation field and the output torque data of each clamp, a recursive identification algorithm is used to correct and update the key parameters of the electromechanical fusion model online, and the updated model is used for feedforward calculation.

[0051] The root mean square (RMS) values ​​of the three-dimensional displacements of the global nodes of the surface deformation field are calculated in real time as a performance index of the surface deformation field. The deviation between this performance index and the ideal smoothness expectation value approaching zero is calculated. This deviation is input into the linear quadratic regulator algorithm module, which calculates the state feedback compensation torque used to suppress the deformation deviation by solving the algebraic Riccati equation. After the state feedback compensation torque and the active clamping force timing command are uniformly converted into the actuator torque control space corresponding to each clamping axis, they are linearly superimposed in the CNC system's low-level register to generate the corrected target torque command, which is then sent to the servo drivers of each clamping axis. Each servo driver converts the target torque command into the corresponding current command based on the motor torque constant, and drives the motor to output the corrected torque through the internal current loop, so that the RMS value of the three-dimensional displacement tends to be within the preset micron-level tolerance stability range.

[0052] The armature current feedback values ​​of each gripper motor are read in real time through the internal data channel of the servo driver and multiplied by the motor torque constant to convert them into output torque data. Alternatively, output torque data can be obtained through a torque sensor or the torque estimation module inside the driver. The output torque data is used as the input excitation time series of the system, and the real-time surface deformation field is used as the output response time series of the system. The inverse matrix of the updated data covariance matrix is ​​calculated online by calling the recursive least squares algorithm library function with forgetting factor. The system state transition matrix and input control matrix in the discretized electromechanical fusion state space model are corrected in real time in a time-recursive manner to complete the online correction of key parameters of stiffness and damping. The updated dynamic system matrix is ​​synchronized to the feedforward prediction calculation module, and the model update and calculation in step S2 are executed iteratively.

[0053] In an optional embodiment, the real-time surface deformation field is used as a feedback signal and input to the inverse model controller to correct the timing command of the active clamping force online, so that the performance index of the real-time surface deformation field converges within a preset stable range, including: The three-dimensional displacement deviation vector of the preset tracking observation node is extracted from the real-time surface deformation field and used as the representative deformation error vector at the current moment. The representative deformation error vector is input into a feedback regulator using a PID control law. The feedback compensation clamping force used to suppress the current deformation deviation is calculated. The feedback compensation clamping force vector is the negative weighted sum of the results obtained by applying the proportional gain coefficient matrix, the integral gain coefficient matrix, and the differential gain coefficient matrix to the representative deformation error vector, the integral term of the representative deformation error vector with respect to time, and the differential term of the representative deformation error vector with respect to time, respectively. The feedback compensation clamping force vector is superimposed with the feedforward active clamping force vector at the corresponding moment, and mapped to the torque control quantity corresponding to each clamping servo motor through the clamping force distribution matrix. This generates clamping force control commands and drives each clamping servo motor to execute the corresponding torque output.

[0054] When implementing high-frequency closed-loop feedback torque compensation, five mechanically sensitive observation nodes, including the center point and four corners of the packaging box, are extracted from the high-dimensional data matrix of the real-time surface deformation field. The three-dimensional vector weighted average of the displacement deviations of these five key nodes is calculated to generate a representative deformation error vector e with dimension 3 within the current control cycle, reducing the high-frequency electrical noise of the sensors. The error vector e is input to the digital PID feedback regulator at a frequency of 10kHz. To ensure the closed-loop stability of the pole distribution, the PID matrix parameters are pre-tuned using the frequency domain method, where the proportional coefficient matrix... The diagonal element is set to 150 N / mm, and the integral gain is... Set to 20 N / (mm·s), differential gain The value is set to 5 N·s / mm. Within the PID control cycle, the integral term reduces the steady-state displacement error caused by friction and gravity of the clamping guide rail by accumulating historical errors, while the derivative term generates a virtual damping torque in advance using the instantaneous rate of change of deformation error to reduce deformation overshoot caused by high-frequency resonance. The calculated feedback compensation force vector U is output in the opposite direction to the representative deformation error vector to counteract the current deformation deviation.

[0055] The feedback compensation force vector is mapped to the torque compensation amount corresponding to each gripper through the clamping force distribution matrix, and then compared with the feedforward clamping force vector obtained by synchronous calculation. Real-time vector algebraic superposition is performed. The synthesized time-domain clamping force control command is uniformly converted into the target torque command corresponding to each clamping servo motor and sent to the corresponding servo driver via industrial Ethernet. The servo driver converts the target torque command into a current command based on the motor torque constant, and then generates the corresponding pulse width modulation drive signal by the internal current loop and power module to drive each clamping servo motor at the end to output the corrected torque; wherein, the current loop bandwidth is set to 2.5kHz to make the surface deformation of the packaging box tend to the set reference.

[0056] In an optional embodiment, based on the real-time surface deformation field and the output torque data of each gripper, a recursive identification algorithm is used to perform online correction and updating of key parameters of the mechatronics fusion model, and the updated model is used for feedforward calculation, including: Establish a sliding time window and cache historical observation datasets containing real-time surface deformation field data and output torque feedback data of each gripper servo motor within a set period. An extended Kalman filter algorithm is used, with elements of the damping matrix and stiffness matrix as state variables and historical observation datasets as observation variables, to perform state estimation and parameter updates. By replacing the original matrix parameters in the mechatronics model with updated state variables, online correction and updating of system model parameters can be achieved without shutting down the system.

[0057] To address the time-varying characteristics of packaging boxes caused by temperature and humidity changes or material fatigue on continuous production lines, a sliding time window structure consisting of a circular queue is configured in main memory. This data window has a set time length of 50 milliseconds and continuously caches the deformation field displacement observations of the most recent 500 discrete time steps, as well as the output torque estimated from driver current feedback, torque sensors, or the driver's internal torque. The control kernel uses an extended Kalman filter algorithm running in this cache, and separately separates the viscosity coefficient of the damping matrix C and the principal bending stiffness elements of the stiffness matrix K in the prime mover model, setting them as estimated state variables. During initialization, the state prediction covariance matrix... Set as a 10-fold identity matrix, and the observation noise covariance matrix... The diagonal element is set to 10 based on the static noise floor calibration value of the laser displacement sensor. -6 .

[0058] As the control cycle progresses, after each data window slide, the filtering algorithm calculates the latest observation matrix based on the Jacobian matrix. And predict the covariance matrix based on the state. Observation matrix and observation noise covariance matrix Calculate the Kalman gain matrix . Specifically, equal and After multiplying the transposes of the matrices, multiply by the matrix formed by... , , Multiply and superimpose the transpose matrices in sequence The inverse matrix of the resulting matrix can be obtained by LU decomposition.

[0059] Using the generated It can converge the state estimation variance and correct the posterior estimates of stiffness and damping variables at the current moment. The underlying task overwrites the latest quantized stiffness and damping coefficient data after convergence verification into the corresponding matrix address of the original dynamic model in the feedforward controller RAM. This bumpless switching online update mechanism helps the internal digital model of the control system to approximate the real mechanical characteristics of the cardboard box during continuous operation.

[0060] S5 monitors deformation to trigger camera comparison and identification of printing defects.

[0061] The performance indicators of the surface deformation field are monitored in real time. When the surface deformation field remains within the preset stable range, indicating that a stable state has been reached, the linear scan camera is triggered to acquire the surface printed image, and the acquired image is compared with the standard template image to complete the defect detection.

[0062] A fixed-length sliding data time window is constructed, and continuously generated three-dimensional displacement root mean square values ​​are stored point by point according to the system sampling clock. The local statistical variance of the root mean square values ​​within the sliding data time window is calculated in real time. When the latest root mean square value is detected to be less than the preset deformation tolerance threshold, and the local statistical variance is lower than the preset fluctuation threshold, and this is maintained for the set total number of clock cycles, it is determined that the current flexible packaging box has entered a stable state.

[0063] The specified general-purpose input / output pin level is toggled to generate a hardware trigger pulse signal, which is then sent to the external hardware trigger port of the machine vision controller via a coaxial cable. Upon receiving the signal, the linear scan camera and LED line light source are synchronously triggered to complete the line-by-line scanning exposure and line-by-line stitching of the digital image of the controlled surface of the packaging box. The computer vision software development kit is used to read the complete acquired image, and the scale-invariant feature transform algorithm is used to extract the local scale key feature points of the acquired image and the pre-loaded standard template image. The random sampling consensus algorithm is then used to remove mismatched points, completing the affine transformation registration. The structural similarity index algorithm is used to calculate the brightness similarity, contrast similarity, and structural similarity of the two registered images at the pixel level, generating a global difference grayscale heatmap. The Otsu method is used to set the grayscale binarization threshold to extract abnormal connected components. The two-dimensional coordinates and area size of the printing defects are obtained by calculating the image moments, completing the quality inspection.

[0064] In an optional embodiment, the performance indicators of the surface deformation field are monitored in real time. When the surface deformation field remains within a preset stable range, indicating that a stable state has been reached, a linear scan camera is triggered to acquire a printed image of the surface. The acquired image is then compared with a standard template image to complete defect detection, including: The magnitude of the representative deformation error vector is compared with the preset imaging stable deformation threshold in real time. When the magnitude of the representative deformation error vector at a single sampling moment is less than or equal to the preset imaging stable deformation threshold, the time value of the stabilization timer is incremented; if the magnitude of the representative deformation error vector exceeds the preset imaging stable deformation threshold, the stabilization timer is cleared and the timing restarts. When the cumulative time of the stabilization timer reaches the preset duration continuously, it is determined that the packaging box has entered a stable state; When the system is determined to be in a stable state, an enable signal is output to the image acquisition control terminal. Combined with the encoder pulse signal of the transmission mechanism, a line synchronization trigger pulse is output to drive the line scan camera to acquire equidistant spatial images and store the acquired images in the memory buffer. The acquired image is read from the memory buffer, and the acquired image is registered and compared with the standard template image to obtain the printing defect detection result.

[0065] Real-time monitoring of the packaging box's stability is performed using a high-frequency digital comparator configured in a field-programmable gate array (FPGA). This comparator extracts a representative deformation error vector *e* from the calculation module's output at a fixed 0.1-millisecond interval and calculates the actual spatial displacement modulus by performing a square root operation on the sum of the squares of the vector's three-dimensional coordinate components. The calculated floating-point modulus value is then fed into the comparator and compared to the preset maximum allowable deformation threshold of 0.02 mm in the internal hardware register. When the calculated modulus is less than or equal to 0.02 mm, the 32-bit stabilization timer embedded in the control chip performs single-step incremental addition. When a sudden change in modulus exceeding 0.02 mm is detected due to disturbances such as servo belt jitter, the underlying gate-level circuit immediately clears the timer via a hardware interrupt instruction. Only when the hardware stabilization timer continuously accumulates for 200 control cycles (20 milliseconds) without any interruptions, does the overall control state machine determine that the residual oscillation of the flexible packaging box has stabilized. Under stable conditions, the control motherboard outputs a 24V high-level optocoupler-isolated enable signal. Upon receiving this enable signal, the 8K resolution line scan camera initiates line-by-line hardware-triggered exposure at equidistant intervals of 0.05mm / line, based on the position pulses divided by the photoelectric encoder on the transmission spindle. The captured high-definition scanned images are stored in the industrial host's detection buffer via the CameraLink interface. This mechanism reduces motion blur and geometric dot distortion in the printed pattern caused by residual deformation.

[0066] After the industrial host reads the complete acquired image from the detection buffer, it first performs brightness normalization and median filtering on the acquired image. Then, it loads the standard template image of the corresponding batch of packaging boxes. Based on the positioning marks or preset printing reference points in the packaging box layout, it extracts matching feature points between the acquired image and the standard template image, and removes mismatched points using a random sampling consistency algorithm. Based on the retained matching feature points, it calculates the affine transformation matrix of the acquired image relative to the standard template image, and uses the affine transformation matrix to register the acquired image to the coordinate system of the standard template image.

[0067] After registration, the registered acquired image and the standard template image are uniformly converted to the Lab color space. The differences between corresponding pixels in the L, a, and b channels are calculated, and the Euclidean distance of the differences in the three channels is used as the color difference value of the pixel. The color difference values ​​of all pixels are used to form a printing difference map. The printing difference map is binarized using the Otsu thresholding method to obtain an anomaly binary map.

[0068] Morphological opening and closing operations and connected component labeling are performed on the abnormal binary image. Connected components with areas smaller than a preset noise area threshold are removed, and the remaining connected components are retained as candidate printing defect regions. The region area, centroid coordinates, bounding rectangle, and average color difference value are calculated for the candidate printing defect regions. The defect type is determined based on the region area, bounding rectangle shape, and average color difference value. The printing defect detection result, including defect type, defect centroid coordinates, defect area, and average color difference value, is output.

[0069] Paper packaging boxes of the same specifications were tested on the same conveyor packaging line. The maximum motion acceleration of the conveyor channel was set to 5 m / s², the sampling frequency to 10000 Hz, and the total continuous operation time to 100 hours, to simulate the drift of mechanical properties of the packaging boxes caused by temperature and humidity changes and material fatigue. The experiment was divided into a baseline group and an experimental group. The baseline group adopted a fixed electromechanical fusion model and used feedforward control combined with proportional-integral-derivative feedback control for clamping force compensation. The experimental group, based on the same control structure, introduced an online correction mechanism for model parameters based on the extended Kalman filter algorithm. The deformation displacement observation value and the clamping torque feedback value were cached in real time through a 50-millisecond sliding time window, and the damping matrix and stiffness matrix were updated online.

[0070] After 100 hours of continuous operation, in the baseline group, because the model parameters were not updated according to changes in the packaging box characteristics, the average magnitude of the representative deformation error vector gradually increased from the initial 0.018 mm to 0.045 mm. The frequency exceeding the 0.02 mm imaging stability deformation threshold reached 34%, and the yield rate of the line scan camera successfully acquiring clear images in a stable state dropped to 82%. In the experimental group, under the real-time correction of the extended Kalman filter, the average magnitude of the representative deformation error vector remained between 0.012 mm and 0.016 mm, the frequency of exceeding the limit decreased to 2.1%, and the clear image acquisition rate stabilized at 99.5%. The deformation error comparison after 100 hours was... Figure 3 As shown.

[0071] The above results show that the online correction mechanism for model parameters can correct the stiffness and damping variables in the digital model without stopping the machine, making the feedforward compensation calculation closer to the current mechanical state of the packaging box, thereby reducing the deformation error caused by model mismatch and improving the clamping stability and printing image acquisition quality during continuous operation.

[0072] An embodiment of the online printing quality inspection system for packaging box production lines provided by this invention: The online printing quality inspection system for packaging box production lines includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the aforementioned online printing quality inspection method for packaging box production lines.

[0073] The online printing quality inspection system for packaging box production lines also includes other components well known to those skilled in the art, such as communication interfaces. Their setup and functions are known in the art and will not be described in detail here.

[0074] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for online printing quality inspection of packaging box production lines, characterized in that, Includes the following steps: S1. Before the packaging box enters the high-speed conveyor channel, modal testing and three-dimensional geometric scanning are performed on the packaging box sample. An electromechanical fusion model is constructed through system identification, which includes the flexible body characteristics of the packaging box sample and the interaction with the gripper. S2. Based on the preset motion trajectory of the conveyor mechanism, combined with the electromechanical fusion model, the timing command of the active clamping force required to counteract the expected motion disturbance is predicted and calculated in a feedforward manner through the inverse model controller. S3. During the clamping and conveying of the packaging box, the three-dimensional displacement of key points of the controlled surface of the packaging box relative to the reference shape is measured in real time through at least two sets of non-planar laser displacement sensor arrays, and the real-time surface deformation field representing the response of the packaging box is calculated. S4. The real-time surface deformation field is used as a feedback signal and input to the inverse model controller to correct the timing command of the active clamping force online, so that the performance index of the real-time surface deformation field converges within the preset stable range. Based on the real-time surface deformation field and the output torque data of each clamp, a recursive identification algorithm is used to correct and update the key parameters of the electromechanical fusion model online, and the updated model is used for feedforward calculation; S5, the performance index of the surface deformation field is monitored in real time. When the surface deformation field is kept within the preset stable range, it indicates that a stable state has been reached. The linear array camera is triggered to acquire the surface printing image, and the acquired image is compared with the standard template image to complete the defect detection.

2. The online printing quality inspection method for packaging box production lines according to claim 1, characterized in that, Modal testing and 3D geometric scanning were performed on the packaging box sample. An electromechanical fusion model was constructed through system identification, incorporating the flexible body characteristics of the packaging box sample and the interaction with the gripper. This included: applying a broadband random frequency sweep excitation force signal of a preset frequency to the geometric center of the packaging box sample using a vibrator; simultaneously acquiring 3D response acceleration data using three triaxial accelerometers arranged in an equilateral triangle on the surface of the packaging box sample; obtaining 3D point cloud data of the packaging box sample surface using a 3D laser scanner, and triangulating the surface 3D point cloud data to construct a 3D finite element mesh model; and extracting natural frequencies, mode shape vectors, and damping ratios from the broadband random frequency sweep excitation force signal and 3D response acceleration data using a frequency domain subspace identification algorithm, and combining this with the 3D finite element mesh model to establish an electromechanical fusion model including a mass matrix, damping matrix, and stiffness matrix.

3. The online printing quality inspection method for packaging box production lines according to claim 1, characterized in that, The active clamping force timing command required to counteract expected motion disturbances is calculated predictively using a feedforward method. This includes: acquiring the expected acceleration vector in the preset transmission trajectory of the conveying mechanism and calculating the expected external excitation disturbance force vector accordingly; setting the expected relative deformation displacement vector, expected relative deformation velocity vector, and expected relative deformation acceleration vector on the surface of the packaging box; inputting the expected relative deformation displacement vector, expected relative deformation velocity vector, and expected relative deformation acceleration vector to the inverse model controller, and calculating the feedforward active clamping force by combining the electromechanical fusion model through inverse dynamics; setting the maximum spatial deformation of the packaging box surface not exceeding the preset control deformation threshold as a displacement constraint condition, solving the output torque distribution matrix of each clamp servo motor under the displacement constraint condition, and converting the output torque distribution matrix into the corresponding active clamping force timing command.

4. The online printing quality inspection method for packaging box production lines according to claim 1, characterized in that, Real-time measurement of the three-dimensional displacement of key points on the controlled surface of the packaging box relative to a reference shape includes: acquiring real-time displacement measurement data of key points on the top and side surfaces of the packaging box in the corresponding measurement directions, and synchronously acquiring real-time position data of the packaging box along the conveying direction through the encoder of the conveying mechanism; constructing three-dimensional local coordinate vectors for each key point based on the array installation coordinates of each laser displacement sensor, the real-time displacement measurement data in the corresponding measurement directions, and the real-time position data of the packaging box along the conveying direction, and unifying the three-dimensional local coordinate vectors to the world coordinate system through a coordinate system transformation matrix to obtain the three-dimensional coordinates of each key point; obtaining the reference-aligned three-dimensional coordinates corresponding to the current sampling time based on the real-time conveying position or real-time pose of the packaging box; subtracting the corresponding three-dimensional coordinates of each key point at the current sampling time from the reference-aligned three-dimensional coordinates to obtain the three-dimensional displacement deviation vector of each key point after removing the rigid body conveying displacement.

5. The online printing quality inspection method for packaging box production lines according to claim 1, characterized in that, The real-time surface deformation field representing the response of the packaging box is calculated, including: Based on the three-dimensional coordinates of the key points at the current sampling time, the B-spline surface fitting algorithm is used to reconstruct the continuous spatial surface of the controlled surface of the packaging box. Extract the coordinate matrix of the mesh nodes after the reconstruction of the continuous surface, and perform node correspondence subtraction operation with the coordinate matrix of the reference node under the same mesh node correspondence after being aligned with the rigid body of the current transport position or real-time pose. By obtaining the three-dimensional displacement deviation vector set of each node, a real-time surface deformation field representing the stress deformation state of the packaging box is obtained.

6. The online printing quality inspection method for packaging box production lines according to claim 1, characterized in that, To ensure that the performance indicators of the real-time surface deformation field converge within a preset stable range, the following steps are taken: First, extract the three-dimensional displacement deviation vector of the preset tracking observation node from the real-time surface deformation field, using it as the representative deformation error vector at the current moment. Then, input this vector into a feedback regulator employing a PID control law to calculate the feedback compensation clamping force. The feedback compensation clamping force vector is the negative weighted sum of the results obtained by applying the proportional gain coefficient matrix, integral gain coefficient matrix, and differential gain coefficient matrix to the representative deformation error vector, the integral term of the representative deformation error vector with respect to time, and the differential term of the representative deformation error vector with respect to time, respectively. Finally, superimpose the feedback compensation clamping force vector with the corresponding feedforward active clamping force vector, and map it to the torque control quantity corresponding to each clamp servo motor through a clamping force allocation matrix. This generates a clamping force control command, which drives each clamp servo motor to execute the corresponding torque output.

7. The online printing quality inspection method for packaging box production lines according to claim 2, characterized in that, Based on real-time surface deformation field and output torque data of each gripper, a recursive identification algorithm is used to perform online correction and updating of key parameters of the mechatronics fusion model. The updated model is then used for feedforward calculations, including: Establish a sliding time window and cache historical observation datasets containing real-time surface deformation field data and output torque feedback data of each gripper servo motor within a set period. An extended Kalman filter algorithm is used, with elements of the damping matrix and stiffness matrix as state variables and historical observation datasets as observation variables, to perform state estimation and parameter updates. By replacing the original matrix parameters in the mechatronics model with updated state variables, online correction and updating of system model parameters can be achieved without shutting down the system.

8. The online printing quality inspection method for packaging box production lines according to claim 6, characterized in that, The performance indicators of the surface deformation field are monitored in real time. When the surface deformation field remains within a preset stable range, indicating that a stable state has been reached, the linear scan camera is triggered to acquire a printed image of the surface. The acquired image is then compared with a standard template image to complete defect detection, including: When the system is determined to be in a stable state, an enable signal is output to the image acquisition control terminal. Combined with the encoder pulse signal of the transmission mechanism, a line synchronization trigger pulse is output to drive the line scan camera to acquire equidistant spatial images and store the acquired images in the memory buffer. The acquired image is read from the memory buffer, and the acquired image is registered and compared with the standard template image to obtain the printing defect detection result.

9. The online printing quality inspection method for packaging box production lines according to claim 8, characterized in that, The magnitude of the representative deformation error vector is compared with the preset imaging stable deformation threshold in real time. When the magnitude of the representative deformation error vector at a single sampling moment is less than or equal to the preset imaging stabilization deformation threshold, the time value of the stabilization timer is accumulated. If the magnitude of the representative deformation error vector exceeds the preset imaging stabilization deformation threshold, the stabilization timer will be reset to zero and the timing will restart. When the cumulative time of the stabilization timer reaches the preset duration continuously, it is determined that the packaging box has entered a stable state.

10. An online printing quality inspection system for packaging box production lines, characterized in that, It includes a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the online printing quality inspection method for packaging box production lines as described in any one of claims 1-9 is implemented.

Citation Information

Patent Citations

  • Carton printing defect detection method and system based on visual identification

    CN119624971A