A Packaging Processing Control System Based on Servo Motors

By using visual positioning and 3D digital model construction modules to plan the filling path, and by utilizing servo motor control and supplementary filling technology, the problems of positional deviation and filling path planning of items during the packaging process are solved, thereby improving the accuracy and efficiency of packaging processing.

CN120370820BActive Publication Date: 2025-12-02GUANGZHOU HONEST AUTOMATION
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510519828.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-12-02
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

Existing packaging processing technologies have failed to effectively address the problem of inaccurate filling caused by positional deviations and tilting of items during the packaging process, and have neglected filling path planning, which may lead to collisions between the filling head and the packaging and production continuity issues.

Method used

The system uses a visual positioning module to analyze the position and posture deviation of the item, a 3D digital model construction module to obtain packaging surface information, plans the movement path of the filling head, and drives the filling head to move through a servo motor control module. It also combines a sub-filling area processing module to perform supplementary filling.

Benefits of technology

It achieves precise filling position, avoids collision between the filling head and the packaging, improves filling efficiency and safety, and reduces the production of defective products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120370820B_ABST
    Figure CN120370820B_ABST
Patent Text Reader

Abstract

This invention relates to the field of automation control technology, specifically to a packaging processing control system based on a servo motor. The system includes a vision positioning module, a 3D digital model construction module, a filling path planning module, a servo motor control module, an underfill area processing module, and a management database. This system analyzes the position and posture deviation of items at the packaging station using corner points to resolve filling position deviations. It acquires images of the packaging surface, extracts the center lines of each stripe, and obtains the 3D coordinates of points on the packaging surface to construct a 3D digital model of the packaging. It then plans the movement path of the filling head within the 3D space of the packaging, obtains control commands based on the movement path, and drives the filling head to move via a servo motor. By using grayscale thresholds to determine underfill areas, it performs supplementary filling, ensuring uniform filling and further guaranteeing product quality, ensuring that each package meets standards.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automation control technology, and more specifically, to a packaging processing control system based on a servo motor. Background Technology

[0002] In today's globalized economic environment, the packaging industry, as an important part of the manufacturing industry, plays a vital role in the protection, transportation, and sales of products. High-quality packaging not only ensures the integrity and safety of products during circulation but also enhances their brand image and market competitiveness. As consumers' demands for product quality and packaging aesthetics continue to rise, and as various industries increasingly require automation and intelligence in packaging, the packaging industry faces new challenges and opportunities.

[0003] However, existing packaging processing technologies still have shortcomings. For example, Chinese patent application number 202411036256.8 discloses an intelligent vacuum packaging control system. This solution is based on a dynamic adjustment mechanism of real-time data feedback, which allows the system to automatically adjust temperature and pressure according to different production needs, ensuring that the packaging environment is always in the best condition. This adaptive adjustment can effectively cope with sudden changes on the production line, significantly improve production quality and reduce scrap rate. By integrating pressure sensor data, the accuracy of internal status monitoring is improved, so that any slight deviation in the production process can be identified and adjusted in a timely manner.

[0004] However, this solution has the following shortcomings: First, while the solution automatically adjusts temperature and pressure according to different production needs to ensure that the packaging environment is always in the best condition, it does not involve detecting the positional deviation of the packaged items at the workstation. During the packaging process, even within the optimal packaging environment, the items may still shift in position or tilt due to various factors, making it difficult to accurately carry out the subsequent filling process, which may result in problems such as inaccurate filling position and uneven packaging appearance.

[0005] Second, this solution focuses on improving the accuracy of internal status monitoring by focusing on the single parameter of pressure, while neglecting the crucial step of filling path planning. This can lead to loopholes in the production process. Even if pressure monitoring can detect and adjust minor deviations in a timely manner to ensure the stability of the internal pressure of the packaging, without proper filling path planning, the filling head may still collide with the packaging during its movement, affecting the continuity of production and even damaging the equipment. This may result in inefficient filling, uneven filling, and affect product quality. Summary of the Invention

[0006] To overcome the shortcomings of the prior art, embodiments of the present invention provide a packaging processing control system based on a servo motor, which can effectively solve the problems involved in the prior art.

[0007] The objective of this invention can be achieved through the following technical solution: This invention provides a packaging processing control system based on a servo motor, including a vision positioning module, which is used to analyze the position and posture deviation of the item at the packaging station through corner point analysis to solve the problem of item filling position deviation;

[0008] The 3D digital model construction module is used to acquire images of the packaging surface, extract the center lines of each stripe, obtain the 3D coordinates of points on the packaging surface, and then construct a 3D digital model of the packaging.

[0009] The filling path planning module is used to plan the movement path of the filling head in the three-dimensional space of the packaging based on the three-dimensional digital model of the packaging.

[0010] The servo motor control module is used to obtain control commands based on the motion path within the three-dimensional space of the packaging, and drive the filling head to move via the servo motor;

[0011] The underfilled area processing module is used to determine each underfilled area through a grayscale threshold, and then fill it in.

[0012] The management database is used to store item feature point data, standard planar image data, packaging surface image data, and motion path data.

[0013] Compared with the prior art, the present invention has the following beneficial effects: First, the present invention solves the problem of item filling position deviation by analyzing the position and posture deviation of the item at the packaging station through corner point analysis, which makes the subsequent filling operation more in line with the actual state of the item and avoids the filling position shift caused by item placement deviation.

[0014] Second, this invention acquires images of the packaging surface, extracts the center lines of each stripe, obtains the three-dimensional coordinates of points on the packaging surface, and then constructs a three-dimensional digital model of the packaging. It plans the movement path of the filling head in the three-dimensional space of the packaging, ensuring that the filling process is efficient and smooth, avoiding collisions between the filling head and the packaging, and improving filling efficiency and safety.

[0015] Third, this invention obtains control commands through the motion path within the three-dimensional space of the packaging, and drives the filling head to move through a servo motor. This enables the control commands to be executed quickly and accurately, greatly shortening the movement time of the filling head and increasing the speed of the filling operation, thereby improving the overall production efficiency.

[0016] Fourth, this invention determines each underfilled area by using a grayscale threshold, and then performs supplementary filling, so as to promptly detect and correct underfilling problems, avoid the occurrence of a large number of unqualified products, and save the cost of subsequent rework or scrapping. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a system module connection diagram of the present invention.

[0019] Figure 2 for Figure 1 A flowchart of the 3D digital model construction module.

[0020] Figure 3 for Figure 2 The flowchart for step S3.

[0021] Figure 4 for Figure 2 The flowchart for step S4. Detailed Implementation

[0022] 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 embodiments of the present invention, and not all embodiments. 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.

[0023] Please see Figure 1 As shown, a packaging processing control system based on a servo motor includes a vision positioning module, a three-dimensional digital model construction module, a filling path planning module, a servo motor control module, an underfill area processing module, and a management database.

[0024] The management database is connected to the visual positioning module, the 3D digital model construction module, the fill path planning module, the servo motor control module, and the underfill area processing module. The 3D digital model construction module is connected to the visual positioning module and the fill path planning module. The fill path planning module is connected to the underfill area processing module. The servo motor control module is connected to the fill path planning module and the underfill area processing module.

[0025] The visual positioning module is used to analyze the position and orientation deviation of items at the packaging station through corner point analysis, thereby solving the problem of item filling position deviation.

[0026] The specific analysis method of the visual positioning module is as follows: an industrial camera is installed at a suitable position above the packaging station. When the item enters the packaging station, the original image of the item is acquired through the industrial camera. The original image of the item is then processed into grayscale to obtain a grayscale image of the item.

[0027] Calculate the grayscale image of the item in each case. gradient of direction and The gradient of the direction is used to calculate the autocorrelation matrix of the grayscale image of the object. The response value of each pixel is calculated based on the autocorrelation matrix. A response value threshold is set. Each pixel in the image is traversed. Pixels with response values ​​greater than the response value threshold are marked as corners and their coordinate positions in the image are recorded.

[0028] It should be noted that the specific operation method of the autocorrelation matrix of the grayscale image of the item is as follows: the grayscale image of the item is convolved using templates in the horizontal and vertical directions respectively to obtain the horizontal gradient value and vertical gradient value of each pixel. For each pixel in the grayscale image of the item, a 2x2 autocorrelation matrix is ​​constructed based on its horizontal gradient value and vertical gradient value. The top left element of the autocorrelation matrix is ​​the square of the horizontal gradient value, the bottom right element is the square of the vertical gradient value, and the two off-diagonal elements are the product of the horizontal gradient value and the vertical gradient value.

[0029] The horizontal and vertical templates are the horizontal and vertical templates of the Sobel operator, and are 3x3 matrices. , Each element represents a weight value.

[0030] It should be noted that the specific calculation method for the horizontal and vertical gradient values ​​of each pixel is as follows: Starting from the top left corner of the image, each pixel in the image is traversed sequentially from left to right and from top to bottom. For the currently being processed pixel, its position in the image is determined. Taking the current pixel as the center, a 3x3 neighborhood is selected. The weight value in the horizontal template is multiplied by the gray value of the corresponding pixel in the 3x3 neighborhood. That is, the weight of the top left corner of the template is -1 multiplied by the gray value of the top left corner pixel in the neighborhood, the weight of the middle of the first row of the template is 0 multiplied by the gray value of the middle pixel in the first row of the neighborhood, and so on, completing 9 sets of multiplication operations. The results of the 9 sets of multiplication operations are added together to obtain the horizontal gradient value of each pixel. The vertical gradient value of each pixel is calculated using the same method with the vertical template.

[0031] It should be noted that the specific calculation method for the response value of each pixel is as follows: obtain the autocorrelation matrix of the grayscale image of the item for each pixel, denoted as... Through formula The response value of each pixel is calculated, where Represents an empirical constant. Indicates the first The number of each pixel .

[0032] Among the detected corner points, at least three non-collinear feature points are selected and recorded as the feature points of the item. The feature points of the item are matched with the feature points in the database using a descriptor-based matching algorithm to find the corresponding three-dimensional coordinates in the packaging station coordinate system. Accurate item positioning and posture analysis can ensure that each packaging operation is based on the correct state of the item, reducing packaging errors caused by improper item placement.

[0033] It should be noted that the specific analysis method for each feature point of the item is as follows: select three corner points from the corner points. For three points on a two-dimensional plane, calculate the vectors respectively. , If the absolute value of the cross product of the two vectors is greater than a set threshold, then the three points are considered to be non-collinear. Thus, different combinations of three corner points are continuously selected from the corner points for non-collinearity judgment until at least one set of three non-collinear feature points that meet the conditions are found. These non-collinear feature points are then marked as the feature points of the item.

[0034] It should be noted that the specific analysis method for finding the corresponding three-dimensional coordinates in the packaging station coordinate system is as follows: Taking each of the at least three non-collinear item feature points selected from the detected corner points as the center, a circular neighborhood is determined. A Gaussian scale space is constructed for the image region containing the feature points. Specifically, Gaussian convolution kernels of different scales are used to perform convolution operations with the image region to obtain a series of images of different scales. In the Gaussian scale space, the position and scale of the feature point as a key point are determined by comparing the pixel values ​​in the neighborhood of each feature point. The gradient direction histogram in the neighborhood of the key point is calculated. The main direction of the key point is determined based on the peak value of the histogram. The neighborhood of the key point is divided into multiple sub-regions. A gradient direction histogram is calculated in each sub-region. The gradient direction histograms calculated in each sub-region are combined into a feature vector, which is used as the SIFT descriptor of the feature point.

[0035] Using a descriptor-based matching algorithm, the SIFT descriptors of each feature point of the item are matched with the descriptors of feature points in the database. Based on the matching results and combined with the pre-established mapping relationship between image data and the packaging station coordinate system, the three-dimensional coordinates of the item feature points in the packaging station coordinate system are determined.

[0036] By utilizing the principle of perspective projection transformation, a mapping relationship between the image plane and the three-dimensional space of the packaging station is established. An overdetermined set of equations is constructed using the coordinates of each feature point of the item in the image plane and the three-dimensional coordinates in the packaging station coordinate system. The rotation matrix and translation vector are obtained by solving the set of equations using the least squares method. This accurately determines the specific position and posture of the item in the packaging station, providing the necessary basis for the packaging equipment to perform precise operations on the item.

[0037] It should be noted that the specific analysis method of the rotation matrix and translation vector is as follows: Given the three-dimensional coordinates of each feature point of the item in the image plane coordinate system and the packaging station coordinate system, for each feature point, eliminate the scale factor from the projection formula to obtain two equations. Linearize the equations and let the parameters of the rotation matrix and translation vector form an unknown vector. Since there are multiple feature points, each feature point corresponds to two equations, thereby constructing an overdetermined system of equations.

[0038] The least squares method aims to find the parameter vector that minimizes the sum of squared residuals of an overdetermined system of equations. By taking the partial derivative of the sum of squared residuals with respect to the unknown parameter vector and setting it to 0, the normal equation is obtained. When the relevant matrix is ​​invertible, the parameter vector is solved using a specific formula, and then the parameter values ​​of the rotation matrix and translation vector are extracted from it to obtain the rotation matrix and translation vector.

[0039] Based on the rotation matrix and translation vector, the posture parameters of the item at the packaging station are calculated and compared with the preset standard posture. The position and posture deviation of the item at the packaging station are analyzed, and then adjustment commands are sent to the packaging equipment. This allows the packaging equipment to accurately adjust the position and posture of the item according to the adjustment commands, ensuring that the item is in the optimal position during the packaging process, thereby achieving precise packaging.

[0040] It should be noted that by converting the rotation matrix into Euler angles and combining the translation vector of the item relative to the origin in the packaging station coordinate system, a complete posture and position description of the item at the packaging station is obtained. The standard posture parameters of the item under ideal packaging conditions are obtained, including standard Euler angles and standard position coordinates. For posture deviation, the difference between the actual posture Euler angles and the standard Euler angles is calculated. For position deviation, the difference between the actual position coordinates and the standard position coordinates is calculated. Based on the calculated posture and position deviations, the control system of the packaging equipment generates adjustment commands according to the pre-set adjustment strategy.

[0041] The 3D digital model construction module is used to acquire images of the packaging surface, extract the center lines of each stripe, obtain the 3D coordinates of points on the packaging surface, and then construct a 3D digital model of the packaging.

[0042] Please see Figure 2As shown, the specific analysis method of the three-dimensional digital model construction module is as follows: S1. By scanning a flat plane to acquire a standard planar image, and simultaneously using a 3D vision sensor to project structured light onto the packaging surface, a specific light spot formed by the structured light on the packaging surface is obtained, and an image of the packaging surface with the specific light spot of the structured light is acquired; this can more accurately obtain the actual shape information of the packaging surface, thereby improving the data accuracy of the entire detection and modeling process.

[0043] S2. After grayscale processing of the packaging surface image, the edge detection algorithm is used to extract the edges of each stripe. The thinning algorithm is then used to refine the extracted stripe edges to a single pixel width, thus obtaining the center lines of each stripe in the packaging surface image. This allows the obtained center lines of each stripe to more accurately represent the actual structural features of the packaging surface, which is crucial for the subsequent accurate calculation of relevant parameters of the packaging surface and the construction of a high-precision three-dimensional digital model.

[0044] It should be noted that the specific operation of the edge detection algorithm is as follows: Calculate the gradient magnitude and direction of each pixel in the packaging surface image. Traverse each pixel. For each pixel, compare the gradient magnitude of the pixel with the gradient magnitude of its neighboring pixels in its gradient direction. If the gradient magnitude of the pixel is not a local maximum, set the magnitude of the pixel to 0, i.e., suppress non-edge points, thereby refining the edge to a single pixel width. At the same time, set high and low thresholds. Pixels with gradient magnitudes greater than the high threshold are marked as strong edge points, pixels with gradient magnitudes less than the low threshold are marked as non-edge points, and points between the two thresholds are marked as weak edge points. Check the weak edge points. If there are strong edge points in their neighborhood, mark the weak edge point as an edge point; otherwise, mark it as a non-edge point. In this way, the broken edges are connected to obtain the edges of each stripe.

[0045] S3. Compare the center lines of each stripe in the packaging surface image with the corresponding center lines in the standard planar image, and calculate the curvature deviation and spacing deviation at each point of the center line of each stripe in the packaging surface image; quantify the difference between the packaging surface and the ideal plane, and provide specific numerical basis for evaluating the packaging surface.

[0046] S4. By using a homogeneous transformation matrix, the curvature deviation and spacing deviation of each point on the center line of each stripe in the packaging surface image are transformed into three-dimensional coordinates of the packaging surface points in the real-world coordinate system, thereby constructing a three-dimensional digital model of the packaging; during the filling process, a more reasonable filling path can be planned based on the three-dimensional model to ensure the uniformity and accuracy of the filling.

[0047] Please see Figure 3As shown, step S3 includes the following steps: S31. Convert the center lines of each stripe in the packaging surface image into a series of discrete points, obtain the pixel coordinates of each point of each stripe center line in the image coordinate system, take each point as the center, take a neighborhood of a set size around it, and perform curve fitting based on the pixel coordinates of each point contained in the neighborhood. Use the least squares method to calculate the parameters of the fitted curve and determine the fitted curve equation at each point of each stripe center line. The surface stripes of different packaging may have complex curvatures and changes. The fitted curve can capture these details. Compared with simple straight lines or broken lines, it can more realistically reflect the actual shape of the center line and provide an accurate data basis for subsequent analysis.

[0048] It should be noted that the curve fitting uses a quadratic polynomial function for fitting, and an error function is defined to measure the degree of difference between the hypothesized fitted curve and the actual data points. The error of each point is obtained by subtracting the actual ordinate of each data point from the ordinate of the corresponding abscissa calculated using the fitted curve. The errors of all points are then squared and summed to obtain the total error function. The partial derivatives of the error function are calculated and set to 0, resulting in a system of equations containing multiple equations. The system of equations is written in matrix form, and the parameters of the fitted curve are determined by finding the inverse matrix. The above operation is repeated for each point on the center line of each stripe to obtain the fitted curve equation at each point on the center line of each stripe.

[0049] S32. Calculate the first derivative of the fitted curve equation at each point of the center line of each stripe to obtain the slope of the tangent line at each point. Use the arctangent function to convert the slope of the tangent line into the angle between the tangent line and the positive direction of the X-axis. At the same time, calculate the curvature between each point in the neighborhood of each point of the center line of each stripe, based on the tangent angles corresponding to each point in the neighborhood. Take the average value to obtain the curvature of each point of the center line of each stripe on the packaging surface image. Calculating the curvature based on the situation in the neighborhood of each point can reflect the local curvature changes of the center line, avoiding the problem of only focusing on the whole and ignoring local details.

[0050] S33. The curvature deviation at each point of the center line of each stripe in the packaging surface image is obtained by subtracting the curvature of the corresponding center line of the stripe in the standard planar image; this can intuitively reflect the degree of curvature deformation of the packaging surface relative to the standard state.

[0051] S34. In a standard planar image, measure the standard spacing between the center lines of adjacent stripes, and at each point on the center line of each stripe in the image of the packaging surface, perpendicular to the direction of the center line of the stripe, measure the actual spacing between the center lines of adjacent stripes at each point; spacing is an important feature of the packaging surface, and different packaging designs may have specific requirements for stripe spacing. Accurately measuring the spacing helps to assess whether the packaging meets the design standards.

[0052] S35. Calculate the difference between the actual spacing between adjacent stripe center lines at each point of each stripe center line and the standard spacing to obtain the spacing deviation at each point of each stripe center line on the packaging surface image; by calculating the difference between the actual spacing and the standard spacing to obtain the spacing deviation, the dimensional accuracy of the stripe spacing on the packaging surface can be intuitively reflected. If the spacing deviation is too large, it may affect the appearance of the packaging and even affect the performance of the packaging.

[0053] Please see Figure 4 As shown, step S4 includes the following steps: S41. Select a gauge block as a standard object, obtain its size and shape, scan the standard object, and use its measurement data in the sensor coordinate system and the known real-world coordinates to establish the transformation relationship between the two using a homogeneous transformation matrix; this ensures that the data about the packaging surface obtained from the sensor can accurately correspond to the actual spatial position, improving the accuracy of the entire measurement and modeling process.

[0054] It should be noted that the specific analysis method of step S41 is as follows: the surface information of the gauge block is completely obtained by scanning equipment, and the point cloud data of the gauge block in the sensor coordinate system is obtained. The point cloud data includes its three-dimensional coordinates in the sensor coordinate system. The corresponding points are found between the measurement data of the gauge block (point cloud in the sensor coordinate system) and the known real-world coordinates. An overdetermined system of equations is obtained through multiple sets of corresponding points. The overdetermined system of equations is solved using the least squares method to obtain the specific elements of the homogeneous transformation matrix.

[0055] S42. Based on the projection and imaging principles of structured light, the correlation between the curvature deviation, spacing deviation, and depth at each point on the center line of each stripe in the packaging surface image is determined. The depth is the straight-line distance from each point on the center line of each stripe in the packaging surface image to the 3D vision sensor. In this way, the curvature deviation and spacing deviation at each point on the center line of each stripe in the packaging surface image are converted into the depth at each point on the center line of each stripe in the packaging surface image. For the complex shapes and deformations that may exist on the packaging surface, by converting the deviation into depth, the characteristics of the packaging surface can be described more comprehensively. Different curvature deviations and spacing deviations correspond to different depth changes. This correlation can accurately reflect the unevenness of the packaging surface, which helps to more accurately detect and analyze the quality problems of the packaging surface.

[0056] It should be noted that the specific analysis method for the depth of each point on the center line of each stripe in the packaging surface image is as follows: using a standard object of known height, stripe images are collected at different heights, the curvature deviation of the stripe center line is calculated, and then a functional relationship between the curvature deviation and the depth is fitted. At the same time, by conducting experiments on a standard object of known height, stripe images are collected at different heights, the spacing deviation of the stripe center line is calculated, and then a functional relationship between the spacing deviation and the depth is fitted. Weights are assigned to the curvature deviation and the spacing deviation. For each point on the center line of each stripe in the packaging surface image, the depth of that point is calculated using a weighted summation method based on its curvature deviation and spacing deviation, as well as the previously established association model and weight assignment.

[0057] S43. The homogeneous transformation matrix is ​​used to convert the depth of each point on the center line of each stripe in the packaging surface image into three-dimensional coordinates in the sensor coordinate system, denoted as the three-dimensional coordinates of the packaging surface point. Converting the depth into three-dimensional coordinates can accurately represent the position of the packaging surface point in space. The three-dimensional coordinates contain information about the point in three dimensions. Compared with the depth information alone, it describes the spatial position of the point more comprehensively, which helps to more accurately construct the three-dimensional shape of the packaging and improve the accuracy and reliability of the model.

[0058] S44. Integrate the three-dimensional coordinates of the packaging surface points and use the triangulation algorithm to generate a three-dimensional digital model of the packaging; the shape and structure of the packaging can be seen intuitively. Through the three-dimensional digital model, packaging defects can be detected more accurately, packaging design can be optimized, and the quality and performance of the packaging can be improved.

[0059] The filling path planning module is used to plan the movement path of the filling head in the three-dimensional space of the packaging based on the three-dimensional digital model of the packaging.

[0060] The specific operation method of the filling path planning module is as follows: acquire the three-dimensional digital model data of the packaging, determine the boundary, internal structure and the area defined as obstacles in the model, and clarify the starting position of the filling head and the target position to be reached, which are respectively recorded as the starting point and the target point; clarifying the starting position and target position (starting point and target point) of the filling head provides a clear task objective for path planning.

[0061] A tree with a starting point is created. A point is randomly selected in the environment and designated as the sampling point. The node closest to the sampling point is found in the tree, and the tree is extended a certain distance in the direction of the sampling point to generate a new node and add it to the tree. The new node is checked for collisions with obstacles. If a collision occurs, the node is discarded. This operation is repeated until the tree extends to the target point. Each time a new node is extended, a collision with an obstacle is checked and the colliding node is discarded. This operation effectively avoids the risk of the filling head colliding with obstacles inside the packaging during its movement. It ensures that the filling head can safely pass through the packaging space during actual movement, protecting the integrity of the filling equipment and packaging, and reducing the possibility of equipment damage and production interruption caused by collisions.

[0062] Once the tree expands to the target point, starting from the target point, the tree is traced back to the starting point along the node connections, forming a path from the starting point to the target point. This path consists of a series of nodes, which is the planned movement path of the filling head in the three-dimensional space of the packaging. The path formed by tracing nodes in this way is optimized to a certain extent because the tree expansion process is based on distance and feasibility. The traced path is usually relatively short and reasonable, which helps to improve filling efficiency, reduce the movement time and energy consumption of the filling head, and improve the production efficiency and economic benefits of the entire packaging filling process.

[0063] The servo motor control module is used to obtain control commands based on the motion path within the three-dimensional space of the packaging, and drive the filling head to move via the servo motor.

[0064] The specific analysis method of the servo motor control module is as follows: receiving control instructions from the filling path planning module, which contain the three-dimensional coordinate information of each target position on the movement path of the filling head in the three-dimensional space of the packaging; based on these instructions, the movement of the filling head can be precisely controlled to ensure that the filling operation is carried out according to the pre-designed optimal plan, thereby improving the accuracy and efficiency of filling and avoiding problems such as insufficient filling, overfilling or filling position deviation caused by unreasonable path planning.

[0065] The system can acquire the current actual position of the filling head driven by the motor on the motion path in real time, and subtract the current actual position from the corresponding target position on the motion path to obtain the position deviation. This allows for rapid detection and corresponding corrective measures to ensure that the filling head always moves towards the target position, thereby improving the stability and reliability of the filling operation.

[0066] The control signal is calculated based on the position deviation. By adjusting the strength of the control signal, the servo motor is driven to move the filling head along the path to the target position. At the same time, the position deviation is updated and fed back in real time. During the movement, the position deviation is updated and fed back in real time, so that the control module can continuously adjust the control strategy according to the actual situation of the filling head movement, which has a strong adaptive capability.

[0067] When the position deviation along the motion path is less than the preset error range, it is determined that the filling head has reached the target position on the path, the control signal is stopped, and the motor stops moving. The clear target position arrival judgment mechanism helps to improve the motion efficiency of the entire filling process. The filling head can stop moving in time after reaching each target position, avoiding unnecessary idling and energy consumption.

[0068] In the control command, the three-dimensional coordinate information of each target position is arranged and numbered sequentially according to the order in which the filling head should move. When calculating the position deviation, the current actual position is compared with the corresponding target position according to the number. At the same time, during the process of driving the filling head to move, the coordinate information of the next target position will be called according to the number sequence only after the deviation of the previous target position is less than the preset error range and the arrival is confirmed. This ensures that the filling head moves along the motion path in sequence. This orderly motion control method is particularly important for complex filling paths. It avoids chaotic movement of the filling head between different target positions and ensures that each filling action is executed in the correct order, thereby ensuring the correctness and integrity of the filling process.

[0069] The underfilled area processing module is used to determine each underfilled area through a grayscale threshold, and then fill it in.

[0070] The specific analysis method of the underfill area processing module is as follows: After filling is completed, images of the packaging are acquired from different angles using an industrial camera, and the images are preprocessed to obtain packaging filling images. A threshold segmentation algorithm is used to identify each underfilled area in the packaging filling image. The threshold segmentation algorithm can flexibly adjust the threshold parameters according to the characteristics and filling requirements of different packaging to adapt to various types of packaging and filling materials. Whether it is transparent packaging or opaque packaging, underfilled areas can be accurately identified by reasonably setting the threshold.

[0071] By calculating the center coordinates and bounding box of each underfilled area, its specific location within the packaging's three-dimensional space is determined. Feedback on the location of each underfilled area within this space is then provided. Using a path search algorithm, starting from the current position of the filling head and targeting the center coordinates of the underfilled area, the system re-plans its movement path, moving the filling head to each underfilled area to replenish it until the preset standard filling height is reached. This feedback allows the system to monitor the packaging's filling status in real time and adjust its filling strategy accordingly. If a new underfilled area is detected, the system can immediately re-plan the filling path and replenish it, ensuring the accuracy and timeliness of the filling process.

[0072] It should be noted that the specific analysis method for calculating the center coordinates and bounding box of each underfilled region is as follows: For a certain underfilled region, add up the abscissas of all pixels in the region, and then divide by the total number of pixels in the region to obtain the center abscissa of the underfilled region. Similarly, by summing the ordinates of all pixels within the region and dividing by the total number of pixels, we obtain the center ordinate. The center coordinates of each underfilled region are obtained in this way. Iterate through all pixels within the underfilled area and find the minimum x-coordinate. and maximum value and the minimum value of the ordinate. and maximum value ,by As the coordinates of the top-left vertex of the bounding box, The coordinates of the lower right corner vertex of the bounding box are used to determine the bounding box of the underfilled region. The above operation is repeated for each underfilled region to obtain the center coordinates and bounding box of each underfilled region.

[0073] The specific detection method for each underfilled area is as follows: convert the packaging filling image into a grayscale image, calculate the histogram of the grayscale image, determine the grayscale range of the filling material, packaging background and underfilled area based on the distribution of the histogram, and select a grayscale threshold based on the grayscale range of the filling material and underfilled area. By analyzing the histogram, it can be clearly seen that the grayscale of the filling material is concentrated in a certain range, while the grayscale of the underfilled area is in another range, thereby avoiding misjudgment caused by grayscale confusion.

[0074] It should be noted that the specific analysis method for determining the grayscale range of filling material, packaging background, and underfilled areas based on the distribution of the histogram is as follows: The grayscale range of the grayscale image is determined to be 0 to 255, where 0 represents black and 255 represents white. An array of length 256 (corresponding to 256 grayscale levels from 0 to 255) is created to store the frequency of each grayscale level. Initially, all elements in the array are set to 0. All pixels in the grayscale image are traversed, and the grayscale value of each pixel is obtained. Based on the magnitude of the grayscale value, the value of the element at the corresponding index position in the histogram array is incremented by 1. This yields the value of each element in the histogram array, i.e., the frequency of the corresponding grayscale level in the image.

[0075] By observing the shape of the histogram, it can be generally determined that the packaging background occupies a large area in the image, and its grayscale value will form a relatively large and concentrated peak area in the histogram. By observing the histogram, the grayscale range where this large peak is located can be preliminarily determined as the grayscale range of the packaging background.

[0076] The grayscale value of the filler material will also form one or more peak regions in the histogram. Based on the actual situation, analyze the peak positions that may correspond to the filler material in the histogram to determine the grayscale range of the filler material.

[0077] The gray values ​​of the underfilled area usually differ from those of the filler material and the packaging background. In the histogram, the remaining gray area, i.e. the gray range of the underfilled area, is found by excluding the gray ranges of the already determined packaging background and filler material.

[0078] In one specific embodiment, a transparent plastic package containing white powdery filler is processed. The generated histogram is observed, and it is found that the gray values ​​corresponding to the peak areas are concentrated between 80 and 100. Since the transparent plastic package occupies a large area in the image and the gray values ​​of the background are relatively uniform, the gray range of 80 to 100 is determined to be the gray range of the packaging background.

[0079] In the histogram, there is another relatively high peak area between gray values ​​of 180 and 220. Because white powdery filler material will appear brighter in the image, corresponding to higher gray values, the range of 180 to 220 is determined as the gray range of the filler material.

[0080] Excluding the already determined grayscale ranges of the packaging background and filler material, it was found that the grayscale area between 100 and 180 might correspond to the underfilled area. This is because the underfilled area may be affected by both the packaging background and a small amount of filler material, so its grayscale value is between the two. After further observation and analysis of actual images, it was finally determined that 100 to 180 is the grayscale range of the underfilled area.

[0081] Because the grayscale range of the filling material is 180 to 220, and the grayscale range of the underfilled area is 100 to 180, the midpoint grayscale value of 150 is selected as the threshold. When this threshold is used to segment the grayscale image, pixels with a grayscale value greater than 150 are considered to be the filling material part, while pixels with a grayscale value less than 150 are considered to be the underfilled area.

[0082] Based on the selected threshold, the grayscale image of the packaging filling image is binarized. Pixels with grayscale values ​​greater than or equal to the grayscale threshold are set to white, and pixels with grayscale values ​​less than the grayscale threshold are set to black. By connecting pixels of the same color, the black connected regions of the underfilled area are obtained in the binary image. Each black connected region is recorded as an underfilled area. The complex grayscale image is simplified into a black and white binary image, so that the underfilled area is presented in the form of an intuitive black connected region, which is convenient for observation and analysis.

[0083] The management database is used to store item feature point data, standard planar image data, packaging surface image data, and motion path data.

[0084] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention, which are still covered within the protection scope of the present invention.

Claims

1. A packaging processing control system based on a servo motor, characterized in that, The system specifically includes the following modules: The visual positioning module is used to analyze the position and orientation deviation of items at the packaging station through corner point analysis, and to solve the problem of item filling position deviation; The 3D digital model construction module is used to acquire images of the packaging surface, extract the center lines of each stripe, obtain the 3D coordinates of points on the packaging surface, and then construct a 3D digital model of the packaging. The filling path planning module is used to plan the movement path of the filling head in the three-dimensional space of the packaging based on the three-dimensional digital model of the packaging. The servo motor control module is used to obtain control commands based on the motion path within the three-dimensional space of the packaging, and drive the filling head to move via the servo motor; The underfilled area processing module is used to determine each underfilled area through a grayscale threshold, and then fill it in. The management database is used to store item feature point data, standard planar image data, packaging surface image data, and motion path data; The specific analysis method of the three-dimensional digital model construction module includes the following steps: S1. Acquire images of the packaging surface with specific structured light spots; S2. Obtain the center lines of each stripe in the processed packaging surface image; S3. Based on the center lines of each stripe in the packaging surface image and the corresponding center lines in the standard planar image, calculate the curvature deviation and spacing deviation at each point of the center lines of each stripe in the packaging surface image. S4. Construct a three-dimensional digital model of the packaging based on the curvature deviation and spacing deviation at each point of the center line of each stripe in the packaging surface image; Step S3 includes the following steps: S31. Convert the center lines of each stripe in the packaging surface image into a series of discrete points, and determine the fitting curve equation at each point of each stripe center line; S32. Based on the fitted curve equations at each point of the center line of each stripe, the curvature of each point of the center line of each stripe in the packaging surface image is obtained; S33. Based on the curvature of the center line of each stripe in the packaging surface image and the curvature of the corresponding center line of the stripe in the standard planar image, the curvature deviation of the center line of each stripe in the packaging surface image is obtained at each point of the center line of each stripe in the packaging surface image. S34. In a standard planar image, measure the standard spacing between adjacent stripe center lines, and in a packaging surface image, measure the actual spacing between adjacent stripe center lines at each point of each stripe center line. S35. Based on the actual spacing between adjacent stripe center lines at each point of each stripe center line and the standard spacing, the spacing deviation at each point of each stripe center line of the packaging surface image is obtained.

2. The servo motor-based packaging and processing control system according to claim 1, characterized in that, The specific analysis method for the visual positioning module is as follows: An industrial camera is installed at a suitable position above the packaging station. When an item enters the packaging station, the original image of the item is acquired through the industrial camera. The original image of the item is then converted to grayscale to obtain a grayscale image of the item. Calculate the grayscale image of the item in each case. gradient of direction and The gradient of the direction is used to calculate the autocorrelation matrix of the grayscale image of the object. The response value of each pixel is calculated based on the autocorrelation matrix. A response value threshold is set. Each pixel in the image is traversed. Pixels with response values ​​greater than the response value threshold are marked as corners and their coordinate positions in the image are recorded. Among the detected corner points, at least three non-collinear feature points are selected and recorded as the feature points of the item. The feature points of the item are matched with the feature points in the database using a descriptor-based matching algorithm to find the corresponding three-dimensional coordinates in the packaging station coordinate system. By utilizing the principle of perspective projection transformation, a mapping relationship between the image plane and the three-dimensional space of the packaging station is established. An overdetermined set of equations is constructed by using the coordinates of each feature point of the item in the image plane and the three-dimensional coordinates in the packaging station coordinate system. The rotation matrix and translation vector are obtained by solving the set of equations using the least squares method. Based on the rotation matrix and translation vector, the posture parameters of the item at the packaging station are calculated, compared with the preset standard posture, and the position and posture deviation of the item at the packaging station are analyzed. Then, an adjustment command is sent to the packaging equipment.

3. The packaging and processing control system based on a servo motor according to claim 1, characterized in that, The specific analysis method of the three-dimensional digital model construction module also includes the following steps: S1. A standard planar image is acquired by scanning a flat plane, and at the same time, structured light is projected onto the packaging surface using a 3D vision sensor to obtain a specific light spot formed by the structured light on the packaging surface, and an image of the packaging surface with the specific light spot of the structured light is acquired. S2. After grayscale processing of the packaging surface image, the edge detection algorithm is used to extract the edges of each stripe. The thinning algorithm is then used to thin the extracted stripe edges to a single pixel width to obtain the center line of each stripe in the packaging surface image. S3. Compare the center lines of each stripe in the packaging surface image with the corresponding center lines in the standard planar image, and calculate the curvature deviation and spacing deviation at each point of the center line of each stripe in the packaging surface image. S4. By using a homogeneous transformation matrix, the curvature deviation and spacing deviation of each point on the center line of each stripe in the packaging surface image are transformed into the three-dimensional coordinates of the packaging surface points in the real world coordinate system, thereby constructing a three-dimensional digital model of the packaging.

4. The servo motor-based packaging and processing control system according to claim 3, characterized in that, Step S3 also includes the following: S31. Convert the center lines of each stripe in the packaging surface image into a series of discrete points, obtain the pixel coordinates of each point of each stripe center line in the image coordinate system, take each point as the center, take a neighborhood of a set size around it, perform curve fitting based on the pixel coordinates of each point contained in the neighborhood, and use the least squares method to calculate the parameters of the fitted curve to determine the fitted curve equation at each point of each stripe center line. S32. Calculate the first derivative of the fitted curve equation at each point of each stripe centerline to obtain the tangent slope of the curve at each point. Use the arctangent function to convert the tangent slope into the angle between the tangent and the positive X-axis. At the same time, calculate the curvature between each point in the neighborhood of each stripe centerline based on the tangent angles corresponding to each point in the neighborhood. Take the average value to obtain the curvature at each point of each stripe centerline of the packaging surface image. S33. The curvature deviation of each point of the center line of each stripe in the packaging surface image is obtained by subtracting the curvature of the corresponding center line of the stripe in the standard planar image. S34. In a standard planar image, measure the standard distance between the center lines of adjacent stripes, and at each point of the center line of each stripe on the packaging surface image, perpendicular to the direction of the center line of the stripe, measure the actual distance between the center lines of adjacent stripes at each point of the center line of each stripe. S35. Calculate the difference between the actual spacing between adjacent stripe center lines at each point of each stripe center line and the standard spacing to obtain the spacing deviation at each point of each stripe center line of the packaging surface image.

5. The servo motor-based packaging and processing control system according to claim 3, characterized in that, Step S4 includes the following steps: S41. Select a gauge block as a standard object, obtain its size and shape, and scan the standard object. Using its measurement data in the sensor coordinate system and the known real-world coordinates, establish the transformation relationship between the two using a homogeneous transformation matrix. S42. Based on the projection and imaging principle of structured light, determine the relationship between the curvature deviation, spacing deviation and depth at each point of the center line of each stripe in the packaging surface image. The depth is the straight-line distance from each point of the center line of each stripe in the packaging surface image to the 3D vision sensor. In this way, the curvature deviation and spacing deviation at each point of the center line of each stripe in the packaging surface image are converted into the depth at each point of the center line of each stripe in the packaging surface image. S43. Use the homogeneous transformation matrix to convert the depth of each point on the center line of each stripe in the packaging surface image into three-dimensional coordinates in the sensor coordinate system, denoted as the three-dimensional coordinates of the packaging surface point; S44. Integrate the three-dimensional coordinates of the packaging surface points and use a triangulation algorithm to generate a three-dimensional digital model of the packaging.

6. The packaging and processing control system based on a servo motor according to claim 1, characterized in that, The specific operation method of the filling path planning module is as follows: Obtain the 3D digital model data of the packaging, determine the boundary, internal structure and areas defined as obstacles of the model, and clarify the starting position and target position of the filling head, which are denoted as the starting point and the target point, respectively. Create a tree with a starting point. Randomly select a point in the environment and call it a sampling point. Find the node closest to the sampling point in the tree and extend it a certain distance in the direction of the sampling point to generate a new node and add it to the tree. Check whether the new node collides with an obstacle. If it collides, discard the node. Repeat the above operation until the tree is extended to the target point. Once the tree expands to the target point, starting from the target point, the tree is traced back to the starting point along the node connections, forming a path from the starting point to the target point. This path consists of a series of nodes, which is the planned movement path of the filling head in the three-dimensional space of the packaging.

7. The servo motor-based packaging and processing control system according to claim 1, characterized in that, The specific analysis method for the servo motor control module is as follows; Receive control commands from the filling path planning module, which contain the three-dimensional coordinate information of each target position on the movement path of the filling head in the three-dimensional space of the packaging; The current actual position of the filling head driven by the motor on the motion path is obtained in real time, and the position deviation is obtained by subtracting the current actual position from the corresponding target position on the motion path. The control signal is calculated based on the position deviation. The servo motor is driven to move the filling head along the path to the target position by adjusting the strength of the control signal. At the same time, the position deviation is updated and fed back in real time. When the position deviation along the motion path is less than the preset error range, it is determined that the filling head has reached the target position on the path, the control signal is stopped, and the motor stops moving.

8. The servo motor-based packaging and processing control system according to claim 7, characterized in that, In the control command, the three-dimensional coordinate information of each target position is arranged and numbered in the order in which the filling head should move. When calculating the position deviation, the current actual position is compared with the corresponding target position in sequence according to the number. At the same time, during the process of driving the filling head to move, the coordinate information of the next target position will be called in the order of the number only after the deviation of the previous target position is less than the preset error range and the arrival is confirmed. This ensures that the filling head moves along the motion path in sequence.

9. The servo motor-based packaging and processing control system according to claim 6, characterized in that, The specific analysis method of the underfilled region processing module is as follows: After filling is completed, images of the packaging are acquired from different angles using an industrial camera. After preprocessing, the packaging filling image is obtained. A threshold segmentation algorithm is used to identify each underfilled area in the packaging filling image. By calculating the center coordinates and bounding box of each underfilled area, its specific position in the three-dimensional space of the packaging is determined. Feedback is provided on the specific position of each underfilled area in the three-dimensional space of the packaging. Using a path search algorithm, the movement path is replanned with the current position of the filling head as the starting point and the center coordinates of the underfilled area as the target point. The filling head moves to each underfilled area to fill it until each underfilled area reaches the preset standard filling height.

10. The servo motor-based packaging and processing control system according to claim 7, characterized in that, The specific detection method for each underfilled region is as follows: Convert the packaging filling image to a grayscale image, calculate the histogram of the grayscale image, determine the grayscale range of the filling material, packaging background and underfilled area based on the distribution of the histogram, and select the grayscale threshold based on the grayscale range of the filling material and underfilled area. Based on the selected threshold, the grayscale image of the packaging filling image is binarized. Pixels with grayscale values ​​greater than or equal to the grayscale threshold are set to white, and pixels with grayscale values ​​less than the grayscale threshold are set to black. By connecting pixels of the same color, the black connected regions of the underfilled area in the binary image are obtained, and each black connected region is recorded as the underfilled area.

Citation Information

Patent Citations

  • An intelligent vacuum packaging control system

    CN118605352B

  • Packaging container automatic filling control method

    CN105314178A

  • UAV autonomous landing control system and method for mobile platform

    CN108873917A

  • Mechanical arm path planning method integrating low-difference sequence and RRT algorithm

    CN112356033A

  • High-precision control method and system of multi-axis servo system based on machine vision

    CN114355953A