A machine vision-based paint spraying trajectory self-adaptive control method and system
By using machine vision to monitor the characteristics of paint mist field and wet zone in real time during the painting process, and combining with a composite control algorithm, the painting trajectory is dynamically adjusted, which solves the problem of uneven painting caused by workpiece deformation and airflow disturbance in the existing painting system, and achieves high-precision painting quality control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU XINKETAI INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-31
AI Technical Summary
Existing paint control systems cannot detect workpiece deformation, airflow disturbance, and paint viscosity fluctuations in real time during the paint spraying process, resulting in uneven film thickness, sagging, or exposure of the substrate. In particular, on complex workpieces, the paint film at the edges is often too thin or too thick.
An adaptive control method for spray painting trajectory based on machine vision is adopted. By capturing the density distribution of paint mist field between the spray gun and the workpiece and the reflective characteristics of the wet zone on the workpiece surface in real time, and combining the neural network model to predict the film thickness trend, a composite control algorithm combining feedforward and feedback is used to adjust the pose of the robotic arm and the parameters of the spray gun, so as to realize the dynamic adjustment of the spray painting trajectory.
It effectively eliminates painting deviations caused by workpiece deformation and airflow disturbances, ensuring consistent painting quality and material utilization, improving painting accuracy, and avoiding system lag and oscillation.
Smart Images

Figure CN122480957A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of paint spraying control technology, and in particular to a paint spraying trajectory adaptive control method and system based on machine vision. Background Technology
[0002] In modern manufacturing industries such as automobile manufacturing, aerospace, construction machinery, and furniture production, automated painting technology has gradually replaced manual painting. However, existing painting control systems generally suffer from the following technical problems:
[0003] Current mainstream vision-guided painting methods mostly rely on a single 3D scan before painting to generate a fixed trajectory. Once painting begins, the system is in a blind painting state. If the workpiece is slightly deformed by heat, the airflow in the workshop is disturbed, or the viscosity of the paint fluctuates during the painting process, the system cannot detect and correct it, resulting in uneven film thickness, sagging, or exposed substrate. Traditional closed-loop control methods for spray painting typically rely on flow sensors installed on the spray gun or film thickness gauges installed behind the workpiece. However, these devices suffer from severe lag and cannot reflect the actual spatial distribution of paint mist generated during the spraying process. For workpieces with complex holes, flanges, or deep grooves, fixed painting trajectories often result in paint films that are too thin or too thick at the edges. Existing painting control methods mostly use simple PID feedback control, which is slow to react to sudden deviations caused by airflow disturbances during the painting process and is prone to overshoot or oscillation.
[0004] Therefore, there is an urgent need for an intelligent control scheme that can sense the state of paint mist in real time during the painting process and dynamically adjust the painting trajectory accordingly to solve the above problems. Summary of the Invention
[0005] This application provides a machine vision-based adaptive control method and system for paint spraying trajectories. It captures in real-time the paint mist density distribution between the spray gun and the workpiece, as well as the reflective characteristics of the wetted zone on the workpiece surface. Combining this with a neural network model based on leveling dynamics to predict film thickness trends, and employing a composite control algorithm combining feedforward and feedback to synchronously correct the robotic arm pose and spray gun process parameters, this invention solves the problems of trajectory position deviation and uneven film thickness caused by airflow disturbances and workpiece deformation in existing technologies. It achieves adaptive adjustment of the painting process, significantly improving paint quality and material utilization.
[0006] This application provides a machine vision-based adaptive control method for paint spraying trajectories, including: Step S10: Use a structured light camera to acquire three-dimensional point cloud data of the workpiece to be painted, construct a geometric topological model of the surface of the workpiece to be painted, and divide the surface of the workpiece to be painted into several painting sub-regions according to the curvature change. Step S20: Based on the geometric topology model of the surface of the workpiece to be painted and the preset process parameters, the non-uniform rational B-spline curve fitting algorithm is used to generate an initial painting trajectory without singularities, and the corresponding robotic arm joint spatial motion command is calculated. Step S30: Perform the painting operation according to the initial painting trajectory and the spatial motion command of the robotic arm joint. During the painting process, the density distribution map of the paint mist field between the spray gun and the workpiece to be painted and the reflective characteristics of the wet zone on the surface of the workpiece to be painted are collected in real time at a preset frame rate by the vision sensor deployed on the spray gun. Step S40: Compare the optical flow field of the real-time collected reflective features of the wetted zone with the theoretically predicted wetted zone model, calculate the positional deviation of the current paint spraying trajectory, and predict the film thickness deviation within the set time window based on the current diffusion trend of the wetted zone according to the paint film leveling dynamics model. Step S50: Based on the positional deviation of the current paint spraying trajectory and the predicted film thickness deviation, the position, movement speed, spray gun atomization air pressure, and fan-shaped control valve opening of the robotic arm end are simultaneously adjusted using a composite control method combining feedforward and feedback.
[0007] Furthermore, the step of dividing the surface of the workpiece to be painted into several painting sub-regions based on the curvature change includes: Calculate the Gaussian curvature of each sampling point in the 3D point cloud data of the workpiece to be painted; Set a first curvature threshold and a second curvature threshold, wherein the first curvature threshold is greater than the second curvature threshold; The region formed by sampling points with Gaussian curvature greater than the first curvature threshold is marked as the high curvature edge region; the region formed by sampling points with Gaussian curvature between the first curvature threshold and the second curvature threshold is marked as the transition surface region; and the region formed by sampling points with Gaussian curvature less than the second curvature threshold is marked as the flat region. Set different initial spray widths for different marked areas.
[0008] Furthermore, the step of generating the initial paint trajectory without singularities using a non-uniform rational B-spline curve fitting algorithm includes: Multiple parallel cross-sectional lines are extracted from the geometric topology model of the workpiece surface to be painted; for each cross-sectional line, the intersection line with the workpiece surface to be painted is calculated to obtain the initial discrete path point set; the discrete path point set is filtered to obtain a smooth value point sequence, and a non-uniform rational B-spline curve is constructed as the initial painting trajectory. Calculate the radius of curvature of each shape point on the non-uniform rational B-spline curve, and identify the extreme points where the radius of curvature is smaller than the radius of the spray gun nozzle; when the radius of curvature is found to be smaller than the radius of the spray gun nozzle, insert a retraction point at the extreme point to obtain an initial paint trajectory without singularities.
[0009] Furthermore, the real-time acquisition of the paint mist density distribution map between the spray gun and the workpiece to be painted includes: A sheet-like structured laser beam is projected onto the paint mist spraying area between the spray gun outlet and the workpiece to be painted using a coaxial light source. An industrial camera is used to capture images of the scattered laser beams from the paint mist particles. The scattered beam images are then binarized, and the area and centroid positions of the connected regions are calculated. These are used as quantitative indicators of the paint mist field density distribution map.
[0010] Furthermore, the process of acquiring the reflective characteristics of the wetted zone on the surface of the workpiece to be painted includes: A ring-shaped LED light source is arranged around the nozzle of the spray gun to project incident light of a specific wavelength onto the surface of the workpiece to be painted; the reflected light image of the surface of the workpiece to be painted is acquired by an industrial camera, and the diffuse reflection light and ambient stray light of the workpiece surface are filtered out by a polarizing filter, retaining only the specular reflection light signal generated by the wet paint surface. The filtered reflected light image is defined as the wet zone reflective feature map, which is converted from RGB color space to HSV color space. A threshold is set according to the hue and saturation range of the wet paint surface, and the converted feature map is binarized and segmented to extract the contour of the connected region of the wet zone. The centroid position, width and edge gradient direction of the contour of the connected region are calculated as quantitative feature vectors representing the state of the wet zone.
[0011] Furthermore, the step of comparing the real-time collected reflective features of the wetted zone with the theoretically predicted wetted zone model to calculate the positional deviation of the current paint spraying trajectory includes: Extract the centroid coordinates of the wetted zone from the reflective features of the wetted zone in the current frame. Using the camera intrinsic parameter model and hand-eye calibration matrix, the data is back-projected onto the robot arm's base coordinate system, where... Representing two-dimensional coordinates, the actual center point of the wetting zone is obtained. ,in Represents three-dimensional coordinates; Based on the current running time of the robotic arm Find the corresponding theoretical target point in the initial paint spray trajectory. And calculate the actual center point of the wetting zone. With theoretical target point Euclidean distance deviation between : ; Extract the centroid position of the paint mist density distribution map in the current frame and calculate its expected offset from the spray gun's central axis. If the offset exceeds a preset safety threshold, it is determined that airflow drift has occurred, and the offset is added to the Euclidean distance deviation. In the middle, it serves as the final positional deviation.
[0012] Furthermore, the prediction of film thickness deviation within a set time window based on the film leveling dynamics model and the current diffusion trend of the wetting zone includes: Extract the gray-level gradient features of the current wetting zone edge and calculate the frontal expansion velocity of the wetting zone. ; speed of frontier expansion Current ambient temperature relative humidity and paint viscosity Input a pre-trained neural network model, and the model outputs the predicted film thickness within a future set time window. ; Calculate and predict film thickness With target film thickness The difference : This serves as the predicted film thickness deviation.
[0013] Furthermore, the composite control method combining feedforward and feedback includes: The current position deviation obtained in step S40 Deviation from current film thickness Input the PID controller and calculate the feedback control quantity used to eliminate the current error. ; Based on the rate of change of the current position deviation and the airflow disturbance vector of the paint fog field, the system disturbance at the next moment is predicted using the disturbance observer, and the feedforward compensation amount used to suppress future errors is calculated. ; Feedback control quantity With feedforward compensation The final control quantity is obtained by vector superposition. and the final control quantity The commands are interpreted as kinematic commands for the robotic arm and process parameter commands for the spray gun.
[0014] This application also provides a machine vision-based adaptive control system for paint spraying trajectories, including: The paint spraying area segmentation module is used to acquire 3D point cloud data of the workpiece to be painted using a structured light camera, construct a geometric topological model of the workpiece surface, and divide the workpiece surface into several paint spraying sub-regions according to the curvature changes. Initial trajectory generation module: Based on the geometric topology model of the workpiece surface to be painted and preset process parameters, it uses a non-uniform rational B-spline curve fitting algorithm to generate an initial painting trajectory without singularities, and solves for the corresponding robotic arm joint spatial motion commands. Visual feedback acquisition module: used to execute the painting operation according to the initial painting trajectory and the spatial motion command of the robotic arm joint. During the painting process, the visual sensor deployed on the spray gun collects the paint mist field density distribution map between the spray gun and the workpiece to be painted and the wet band reflective features of the workpiece surface in real time at a preset frame rate. Deviation Calculation and Prediction Module: This module compares the reflective characteristics of the wetted zone collected in real time with the theoretically predicted wetted zone model to calculate the positional deviation of the current paint spraying trajectory. At the same time, based on the paint film leveling dynamics model, it predicts the film thickness deviation within a set time window based on the current diffusion trend of the wetted zone. Adaptive control module: Based on the positional deviation of the current paint spraying trajectory and the predicted film thickness deviation, it uses a composite control method combining feedforward and feedback to synchronously adjust the position, movement speed, spray gun atomization air pressure, and fan-shaped control valve opening of the robotic arm end effector.
[0015] The present invention discloses the following technical effects: This invention provides a machine vision-based adaptive control method and system for paint spraying trajectories. It collects in real time the density distribution map of the paint mist field between the spray gun and the workpiece to be painted, as well as the reflective characteristics of the wetted zone on the surface of the workpiece. By combining dynamic visual feedback with closed-loop iterative control, it no longer relies on a preset fixed paint spraying trajectory, but dynamically adjusts according to the paint spraying state. This effectively eliminates paint spraying deviations caused by slight deformation of the workpiece due to heat or installation errors, ensuring the consistency of paint spraying quality along the entire trajectory.
[0016] This invention employs a composite control strategy combining feedforward and feedback. Feedback control utilizes the current position deviation and film thickness deviation to eliminate existing errors; feedforward control predicts future disturbances based on the deviation change rate and airflow disturbance vector, and synthesizes the final command. Compared to traditional PID control, this control strategy can not only correct the current film thickness error, but also perform predictive control in advance based on the deviation trend. It effectively suppresses system hysteresis, avoids overshoot or oscillation, and maintains extremely high painting accuracy even in a workshop with airflow disturbances.
[0017] This invention divides the surface of the workpiece to be painted into a high-curvature edge region, a transitional curved surface region, and a flat region. It identifies extreme points where the radius of curvature is smaller than the radius of the spray gun nozzle and inserts a retraction point to avoid these points, thus solving the problems of interference and missed spraying when painting complex curved surfaces. In addition, this invention uses a polarizing filter to filter out diffuse reflection from the dry surface of the workpiece, retaining only the specular reflection from the wet paint surface. Even in a paint spraying workshop with abundant paint mist and complex lighting, it can accurately extract the wet zone features from a strong noise background. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a machine vision-based adaptive control method for paint spraying trajectories, provided in an embodiment of this application.
[0019] Figure 2 This is a schematic diagram of a machine vision-based adaptive control system for paint spraying trajectories, provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application will be provided in conjunction with the accompanying drawings. The described embodiments should not be considered as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] Example 1: This application provides a machine vision-based adaptive control method for paint spraying trajectories, such as... Figure 1 As shown, the method includes: Step S10: Use a structured light camera to acquire three-dimensional point cloud data of the workpiece to be painted, construct a geometric topological model of the surface of the workpiece to be painted, and divide the surface of the workpiece to be painted into several painting sub-regions according to the curvature change.
[0022] This embodiment uses the painting of automobile wheel covers as an example to explain the implementation details of this step: Due to the complex shape and obstructions of car wheel covers, scanning from a single perspective cannot acquire complete data. This step first uses a structured light camera in conjunction with a six-axis robotic arm for scanning. The scanning process includes: The robotic arm is controlled to move the car wheel cover to three preset scanning stations in sequence. At each station, the structured light camera projects a sinusoidal stripe pattern onto the workpiece surface. Distortion calculation is used to obtain the local point cloud from the current viewpoint. The ICP algorithm is then used to uniformly register all the local point clouds to the robotic arm's base coordinate system and fuse them to generate a complete 3D point cloud of the car wheel cover.
[0023] Secondly, the preprocessed 3D point cloud of the car wheel cover is processed using the Poisson reconstruction algorithm to generate a closed triangular mesh model as the geometric topology model of the car wheel cover. The normal vectors of all triangular facets are uniformly adjusted to point to the outside of the centroid (i.e. the outer surface of the car wheel cover) by calculating the centroid of the model. Next, traverse each vertex in the triangular network model. Calculate its Gaussian curvature ,in For vertex indices, the calculation process includes: for each vertex Extract its first-order neighborhood point set, and fit a local quadratic surface based on this point set using the least squares method to calculate the principal curvature of the surface. and Thus, the Gaussian curvature is obtained. : ; Finally, based on the material of the car wheel cover and the leveling characteristics of the paint, an adaptive threshold is set: First curvature threshold. Second curvature threshold Based on the threshold determination, the surface of the car wheel cover is divided into multiple paint sub-areas: High curvature edge region ( This area mainly consists of the sharp edges of the wheel hub cover and the base of the bolt posts; paint is extremely prone to runoff in this area, so the initial spray width for this area is set at 60mm, and the overlap rate is required to be 70%. Transitional surface area ( This mainly refers to the curved transition area of the wheel hub cover. The initial spray width of this area is set to 100mm, and the overlap rate is required to be 50%. flat area ( ): This mainly refers to the large flat area of the wheel hub cover. The initial spray width of this area is set to 180mm, and the overlap rate is required to be 30%.
[0024] Step S20: Based on the geometric topology model of the workpiece surface to be painted and the preset process parameters, the initial painting trajectory without singularities is generated by the non-uniform rational B-spline curve fitting algorithm, and the corresponding robotic arm joint spatial motion command is calculated.
[0025] This embodiment follows step S10 with a case study of painting car wheel covers, detailing the implementation of this step: First, trajectory planning is performed for the three painting sub-areas divided in step S10. The optimal painting direction is automatically determined based on the posture of the car wheel cover. Taking the flat area as an example, the painting direction is set to the positive Y-axis. And according to the preset process parameters (spray gun spray diameter) (The overlap requirement is 30%), calculate the line spacing of the cross-section lines. :
[0026] In the geometric topological model, along the X-axis, every... The distance generates a cutting plane parallel to the YZ plane. The intersection of the cutting plane and the grid of the flat area is calculated to obtain discrete path points. This process is repeated to obtain a set of discrete path points covering the entire flat area. Secondly, since the directly extracted intersection lines may have jagged edges or abrupt changes caused by the grid topology, they must be smoothed. The shape point sequence is sampled from the discrete path point set, and the Savitzky-Golay filter is used to smooth the shape point sequence to remove the spikes caused by point cloud noise. Next, based on the smoothed pattern value sequence, an initial paint trajectory without singularities is obtained by fitting a non-uniform rational B-spline (NURBS) curve, including the following detailed steps: A cubic NURBS curve is selected to ensure continuous curvature and smooth, abrupt movements of the robotic arm. Based on the Euclidean distance between adjacent value points, the nodal vector is calculated using the chord length parameterization method, which is then used to define the p-order B-spline basis function. , Indicates curve parameters; By solving the system of linear equations Back-calculate control points ,in, Indicates the first Given a type value point, Representational value points The corresponding curve parameters are pre-calculated using chord length parameterization; This indicates that the total number of control points has been reduced by one. Indicates weight; Control Points The control polygon skeleton that constitutes the NURBS curve, and its spatial distribution determines the curvature of the curve; while the shape value points This serves as a forced interpolation constraint, ensuring that the final generated NURBS curve can accurately approximate the geometric direction of the initial paint trajectory, while achieving smooth continuity of trajectory curvature and speed. Traverse the fitted NURBS curve and calculate the radius of curvature at each point on the curve. If the radius of curvature at a certain point is less than 15mm of the spray gun nozzle radius, it is determined that there is an overfitting singularity (i.e. the paint trajectory turns too sharply, which will cause the spray gun to scrape the workpiece or paint to accumulate). Insert a retraction point at the overfitted singularity position, control the spray gun to lift outward by 20mm along the current normal, pass the singularity and then return to the original spraying distance, thus avoiding the risk of interference from the source of the trajectory; finally, an initial spraying trajectory without singularities is obtained.
[0027] After obtaining the initial paint trajectory without singularities, it is converted into joint angle commands that the robotic arm can execute: For each discrete point on the NURBS curve, calculate the pose matrix of the spray gun. The pose setting follows the principle that "the spray gun axis is always perpendicular to the workpiece surface", that is, the Z-axis of the spray gun is aligned with the normal vector of the workpiece surface. The pose matrix is input into the inverse kinematics model of the robotic arm, and the corresponding six joint angles are solved using a numerical method. During the solution process, the determinant of the Jacobian matrix is monitored in real time. If the determinant is close to zero (close to the wrist singularity), the end pose of the robotic arm is finely adjusted to avoid the singularity region. To ensure uniform paint film thickness, the spray gun movement speed must be constant. An S-shaped acceleration and deceleration curve is used to plan the joint speed to ensure continuous acceleration and avoid paint accumulation due to inertia at the start and stop points.
[0028] Step S30: Perform the painting operation according to the initial painting trajectory and the spatial motion command of the robotic arm joint. During the painting process, the visual sensor deployed on the spray gun collects the paint mist density distribution map between the spray gun and the workpiece to be painted and the wet zone reflective features of the workpiece surface in real time at a preset frame rate.
[0029] This embodiment follows step S20 with a case study of painting car wheel covers, detailing the implementation of this step: The vision sensor deployed on the spray gun in this step is a vision sensing module, which includes a high dynamic range industrial camera and a coaxial laser structured light emitter. To prevent interference from ambient light in the automotive wheel cover production workshop, a dual-band filter is installed in front of the industrial camera lens: the first band is 650nm, which is used to match the wavelength of the ring LED light source and capture the reflective signal of the wet zone on the surface of the automotive wheel cover; the second band is 808nm, which is used to match the wavelength of the laser structured light and capture the paint mist field distribution between the spray gun and the automotive wheel cover. A polarizer is placed in front of the ring LED light source, with the polarization direction set to horizontal; an analyzer is placed in front of the camera lens, with the polarization direction set to vertical; using Malus's law, the diffuse reflection light from the dry car wheel cover surface is greatly reduced, while the specular reflection light generated by the wet paint surface can pass through, thereby greatly improving the contrast between the wet zone and the background.
[0030] After completing the deployment of the vision sensor and configuration of optical parameters, a signal is sent to the robotic arm controller via the EtherCAT bus. When the robotic arm reaches the painting trajectory point, the industrial camera is triggered to expose at a frame rate of 1000 fps, capturing the paint mist density distribution map between the spray gun and the car wheel cover, including: A sheet-like structured laser beam is projected onto the paint mist spraying area between the spray gun outlet and the car wheel hub cover using a coaxial light source. Images of the scattered light spots caused by the laser beams from the paint mist particles are collected. The scattered light spot images are binarized, and the area and centroid position of the connected regions are calculated. These are used as quantitative indicators of the paint mist field density distribution map. If the centroid deviates from the image center by more than 5 pixels, it is determined that the paint mist drift is caused by airflow interference. If the area of the connected regions is less than a preset value, it is determined that the paint output is insufficient. The process of obtaining the reflective characteristics of the wet zone on the surface of a car wheel cover includes: A ring-shaped LED light source is arranged around the nozzle of the spray gun to project incident light of a specific wavelength onto the surface of the car wheel cover; the reflected light image of the car wheel cover surface is collected by an industrial camera, and the diffuse reflection light and ambient stray light of the workpiece surface are filtered out by a polarizing filter, retaining only the specular reflection light signal generated by the wet paint surface. The filtered reflected light image is defined as the wet zone reflective feature map, which is converted from RGB color space to HSV color space. A threshold is set according to the hue and saturation range of the wet paint surface, and the converted feature map is binarized and segmented to extract the contour of the connected region of the wet zone. The centroid position, width and edge gradient direction of the contour of the connected region are calculated as quantitative feature vectors representing the state of the wet zone. The larger the edge gradient, the faster the paint spreads, which indicates that the film thickness may be thinner.
[0031] Step S40: Compare the optical flow field of the real-time collected reflective features of the wetted zone with the theoretically predicted wetted zone model to calculate the positional deviation of the current paint spraying trajectory. At the same time, based on the paint film leveling dynamics model, predict the film thickness deviation within a set time window in the future according to the diffusion trend of the current wetted zone.
[0032] This embodiment follows step S30 with a case study of painting a car wheel hub cover, detailing the implementation of this step: First, the reflective characteristics of the wetted zone on the surface of the car wheel hub cover, collected in real time, are compared with the optical flow field of the theoretically predicted wetted zone model to calculate the positional deviation of the current paint spray trajectory, including: Extract the centroid coordinates of the wetted zone from the reflective features of the wetted zone in the current frame. Using the camera intrinsic parameter model and hand-eye calibration matrix, the data is back-projected onto the robot arm's base coordinate system, where... Representing two-dimensional coordinates, the actual center point of the wetting zone is obtained. ,in Represents three-dimensional coordinates; Based on the current running time of the robotic arm Find the corresponding theoretical target point in the initial paint spray trajectory. And calculate the actual center point of the wetting zone. With theoretical target point Euclidean distance deviation between : ; Extract the centroid position of the paint mist density distribution map in the current frame and calculate its expected offset from the spray gun's central axis. If the offset exceeds a preset safety threshold, it is determined that airflow drift has occurred, and the offset is added to the Euclidean distance deviation. In the middle, as the final positional deviation .
[0033] Secondly, based on the paint film leveling dynamics model, the film thickness deviation within a set time window is predicted according to the current diffusion trend of the wetted zone on the surface of the automotive wheel cover, including: Extract the gray-level gradient features of the current wetting zone edge and calculate the frontal expansion velocity of the wetting zone. It is obtained by comparing the pixel shifts at the edge of the wetted zone in two consecutive frames of images and dividing by the time interval; speed of frontier expansion Current ambient temperature relative humidity and paint viscosity Input a pre-trained neural network model, and the model outputs the predicted film thickness within a future set time window. ; Calculate and predict film thickness With target film thickness The difference : This serves as the predicted film thickness deviation.
[0034] Step S50: Based on the positional deviation of the current paint spraying trajectory and the predicted film thickness deviation, the position, movement speed, spray gun atomization air pressure, and fan-shaped control valve opening of the robotic arm end are simultaneously adjusted using a composite control method combining feedforward and feedback.
[0035] This embodiment follows step S40 with a case study of painting car wheel covers, detailing the implementation of this step: This step receives the positional deviation during the car wheel cover painting process output from step S40. and film thickness deviation The adjustment command is calculated and issued through a composite control method combining feedforward and feedback: A PID controller is used to perform closed-loop adjustment of the current deviation in the painting of the car wheel hub cover, for positional deviation. Calculate the proportional, integral, and differential terms respectively:
[0036] in, Indicates the current Position feedback compensation amount at any time. Indicates the current Positional deviation at any moment , and The preset control gain; For the predicted film thickness deviation Used to adjust the spray gun's movement speed and paint output. Output speed feedback compensation amount Control the robotic arm to accelerate; if Output flow feedback compensation amount The proportional valve is opened wider; among which... Indicates the proportional gain coefficient; To address sudden disturbances (such as airflow) during the painting process, feedforward control based on a disturbance observer is introduced. This monitors the rate of change of positional deviation. If the centroid of the wetted zone on the surface of the car wheel hub cover shifts rapidly within a short period (due to crosswinds), an external disturbance is identified. :
[0037] in, The equivalent mass at the end effector of the robotic arm; Based on the estimated external disturbance force Directly calculate the feedforward compensation amount :
[0038] in, This is the nominal transfer function of the robotic arm. In actual operation, if an airflow is detected blowing to the left, the robotic arm is immediately controlled to produce a small pre-displacement to the right to counteract the impending offset. The position, speed, and flow feedback compensation quantities are vector-superimposed with the feedforward compensation quantities to obtain the final control quantity; the position feedback compensation quantity is superimposed on the current theoretical painting trajectory point to obtain the corrected theoretical target point; and the control quantity is converted into motor torque and speed commands for each joint using the Jacobian matrix.
[0039] In the context of painting the high-curvature edge area of a car wheel cover, the specific closed-loop control process includes: When the center of mass of the wet zone on the surface of the car wheel hub cover shifts to the right, that is, when the airflow suddenly blows to the left, the interference observer detects the sudden acceleration change and outputs the feedforward compensation amount; the position deviation gradually appears, the PID controller outputs the position feedback compensation amount, adjusts the robotic arm to move to the right by 0.05mm instantaneously, and the spray gun fan valve opens by 5% to widen the spray width to cover the offset area. When the predicted film thickness deviation That is, when the wet zone on the surface of the car wheel hub cover expands too quickly, The PID controller is triggered to generate a feedback-driven compensation quantity; the feedforward control of the disturbance observer predicts the trend of thicker paint in the next moment based on the expansion speed, adjusts the robotic arm movement speed by 10%, and increases the atomization pressure by 0.1MPa to make the paint mist finer and reduce single-point deposition.
[0040] When the actual width of the wetted zone on the surface of the car wheel cover exceeds the preset threshold, i.e. when the paint accumulates at the corners, the position deviation shows that the paint trajectory is stuck in the groove and the expansion speed approaches zero. The composite control adjustment robot arm is raised 2mm along the normal direction and moved away from the surface of the car wheel cover, and the paint flow rate valve is reduced by 10%.
[0041] In this embodiment, the control cycle is set to 2ms. Before the painting work on the current sub-area of the car wheel cover is completed, the cycle is strictly performed in the order of steps S30 to S50. After each cycle, the instruction output by S50 is sent to the robotic arm, and the predicted film thickness output by S40 is updated to the current film thickness input value for the next cycle, thus forming a rolling optimization. The following criteria are used to determine whether the painting work in the current sub-area is complete: The cumulative travel of the robotic arm is monitored in real time. The Euclidean distance between the current trajectory point and the preset endpoint of the region is less than a preset threshold. When the value is 0.1mm, the trajectory for that area is considered to have been completed. Once the system determines that the current painting sub-area is finished, it immediately performs the following switching action: The robotic arm is controlled to smoothly move from the end point of the current paint area to the starting point of the next paint area in an arc transition. During the transition, the spray gun is controlled to close the paint outlet valve to prevent empty travel and paint mist from contaminating the already painted areas on the surface of the car wheel cover. The paint trajectory generator switches to the parameter set of the next paint sub-region, for example, adjusting the spray width from 60mm in the high curvature edge area to 100mm in the transition curved surface area, and adjusting the overlap rate from 70% to 50%; The gain parameters of the feedforward-feedback controller are dynamically adjusted based on the surface characteristics of the transition surface region; for example, a flat region allows for a larger velocity gain, while a high curvature edge region requires a smaller gain to ensure stability. Traverse all the paint spraying sub-areas divided in step S10. If the current area is the last area and the work is completed, control the robotic arm to return to the origin, shut off all air and electrical circuits, and issue a "painting completed" signal. If there are still unfinished areas, return to step S20, load the initial trajectory of the new area, and restart the loop from S30 to S50.
[0042] Example 2: The machine vision-based adaptive control system for paint spraying trajectories provided in this embodiment of the invention can execute the machine vision-based adaptive control method for paint spraying trajectories provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method, such as... Figure 2 As shown, it has the following modules: The paint spraying area segmentation module is used to acquire 3D point cloud data of the workpiece to be painted using a structured light camera, construct a geometric topological model of the workpiece surface, and divide the workpiece surface into several paint spraying sub-regions according to the curvature changes. Initial trajectory generation module: Based on the geometric topology model of the workpiece surface to be painted and preset process parameters, it uses a non-uniform rational B-spline curve fitting algorithm to generate an initial painting trajectory without singularities, and solves for the corresponding robotic arm joint spatial motion commands. Visual feedback acquisition module: used to execute the painting operation according to the initial painting trajectory and the spatial motion command of the robotic arm joint. During the painting process, the visual sensor deployed on the spray gun collects the paint mist field density distribution map between the spray gun and the workpiece to be painted and the wet band reflective features of the workpiece surface in real time at a preset frame rate. Deviation Calculation and Prediction Module: This module compares the reflective characteristics of the wetted zone collected in real time with the theoretically predicted wetted zone model to calculate the positional deviation of the current paint spraying trajectory. At the same time, based on the paint film leveling dynamics model, it predicts the film thickness deviation within a set time window based on the current diffusion trend of the wetted zone. Adaptive control module: Based on the positional deviation of the current paint spraying trajectory and the predicted film thickness deviation, it uses a composite control method combining feedforward and feedback to synchronously adjust the position, movement speed, spray gun atomization air pressure, and fan-shaped control valve opening of the robotic arm end effector.
[0043] Although this application makes various references to certain modules in the system according to the embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy distinction between each other and are not used to limit the scope of protection of this invention.
[0044] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application. In some cases, the actions or steps described in this application can be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A machine vision-based adaptive control method for paint spraying trajectory, characterized in that, The method includes: Step S10: Use a structured light camera to acquire three-dimensional point cloud data of the workpiece to be painted, construct a geometric topological model of the surface of the workpiece to be painted, and divide the surface of the workpiece to be painted into several painting sub-regions according to the curvature change. Step S20: Based on the geometric topology model of the surface of the workpiece to be painted and the preset process parameters, the non-uniform rational B-spline curve fitting algorithm is used to generate an initial painting trajectory without singularities, and the corresponding robotic arm joint spatial motion command is calculated. Step S30: Perform the painting operation according to the initial painting trajectory and the spatial motion command of the robotic arm joint. During the painting process, the density distribution map of the paint mist field between the spray gun and the workpiece to be painted and the reflective characteristics of the wet zone on the surface of the workpiece to be painted are collected in real time at a preset frame rate by the vision sensor deployed on the spray gun. Step S40: Compare the optical flow field of the real-time collected reflective features of the wetted zone with the theoretically predicted wetted zone model, calculate the positional deviation of the current paint spraying trajectory, and predict the film thickness deviation within the set time window based on the current diffusion trend of the wetted zone according to the paint film leveling dynamics model. Step S50: Based on the positional deviation of the current paint spraying trajectory and the predicted film thickness deviation, the position, movement speed, spray gun atomization air pressure, and fan-shaped control valve opening of the robotic arm end are simultaneously adjusted using a composite control method combining feedforward and feedback.
2. The machine vision-based adaptive control method for paint spraying trajectory as described in claim 1, characterized in that, In step S10, dividing the surface of the workpiece to be painted into several painting sub-regions according to the curvature change includes the following detailed steps: Step S101: Calculate the Gaussian curvature of each sampling point in the three-dimensional point cloud data of the workpiece to be painted; Step S102: Set a first curvature threshold and a second curvature threshold, wherein the first curvature threshold is greater than the second curvature threshold; Step S103: The region formed by sampling points with Gaussian curvature greater than the first curvature threshold is marked as a high curvature edge region; the region formed by sampling points with Gaussian curvature between the first curvature threshold and the second curvature threshold is marked as a transition surface region; and the region formed by sampling points with Gaussian curvature less than the second curvature threshold is marked as a flat region. Step S104: Set different initial spray widths for different marked areas, wherein the spray width of the high curvature edge area is smaller than the spray width of the flat area.
3. The machine vision-based adaptive control method for paint spraying trajectory as described in claim 1, characterized in that, In step S20, the generation of the initial paint spraying trajectory without singularities using a non-uniform rational B-spline curve fitting algorithm includes the following detailed steps: Step S201: On the geometric topology model of the surface of the workpiece to be painted, extract multiple parallel cross-sectional lines along the preset travel direction. The spacing between the cross-sectional lines is determined by the preset spray overlap rate. Step S202: For each cross-sectional line, calculate its intersection with the surface of the workpiece to be painted, and obtain the initial set of discrete path points. Step S203: Filter the discrete path point set to remove outliers caused by point cloud noise and obtain a smooth shape value point sequence. Based on the smooth shape value point sequence, construct a non-uniform rational B-spline curve as the initial spraying trajectory. Step S204: Calculate the radius of curvature of each shape point on the non-uniform rational B-spline curve, and identify the extreme points where the radius of curvature is smaller than the radius of the spray gun nozzle. Step S205: When the radius of curvature is detected to be smaller than the radius of the spray gun nozzle, a retraction point is inserted at the extreme point to obtain an initial paint trajectory without singularities.
4. The machine vision-based adaptive control method for paint spraying trajectory as described in claim 1, characterized in that, In step S30, the real-time acquisition of the paint mist density distribution map between the spray gun and the workpiece to be painted includes: A sheet-like structured laser beam is projected onto the paint mist spraying area between the spray gun outlet and the workpiece to be painted using a coaxial light source. An industrial camera is used to capture images of the scattered laser beams from the paint mist particles. The scattered beam images are then binarized, and the area and centroid positions of the connected regions are calculated. These are used as quantitative indicators of the paint mist field density distribution map.
5. The machine vision-based adaptive control method for paint spraying trajectory as described in claim 1, characterized in that, In step S30, the process of obtaining the reflective characteristics of the wetted zone on the surface of the workpiece to be painted includes: A ring-shaped LED light source is arranged around the nozzle of the spray gun to project incident light of a specific wavelength onto the surface of the workpiece to be painted; the reflected light image of the surface of the workpiece to be painted is acquired by an industrial camera, and the diffuse reflection light and ambient stray light of the workpiece surface are filtered out by a polarizing filter, retaining only the specular reflection light signal generated by the wet paint surface. The filtered reflected light image is defined as the wet zone reflective feature map, which is converted from RGB color space to HSV color space. A threshold is set according to the hue and saturation range of the wet paint surface, and the converted feature map is binarized and segmented to extract the contour of the connected region of the wet zone. The centroid position, width and edge gradient direction of the contour of the connected region are calculated as quantitative feature vectors representing the state of the wet zone.
6. The machine vision-based adaptive control method for paint spraying trajectory as described in claim 1, characterized in that, In step S40, comparing the real-time collected reflective features of the wetted zone with the theoretically predicted wetted zone model to calculate the positional deviation of the current paint spraying trajectory includes: Extract the centroid coordinates of the wetted zone from the reflective features of the wetted zone in the current frame. Using the camera intrinsic parameter model and hand-eye calibration matrix, the data is back-projected onto the robot arm's base coordinate system, where... Representing two-dimensional coordinates, the actual center point of the wetting zone is obtained. ,in Represents three-dimensional coordinates; Based on the current running time of the robotic arm Find the corresponding theoretical target point in the initial paint spray trajectory. And calculate the actual center point of the wetting zone. With theoretical target point Euclidean distance deviation between : ; Extract the centroid position of the paint mist density distribution map in the current frame and calculate its expected offset from the spray gun's central axis. If the offset exceeds a preset safety threshold, it is determined that airflow drift has occurred, and the offset is added to the Euclidean distance deviation. In the middle, it serves as the final positional deviation.
7. The machine vision-based adaptive control method for paint spraying trajectory as described in claim 1, characterized in that, In step S40, the prediction of film thickness deviation within a set time window based on the current diffusion trend of the wetting zone, using the film leveling dynamics model, includes: Extract the gray-level gradient features of the current wetting zone edge and calculate the frontal expansion velocity of the wetting zone. ; speed of frontier expansion Current ambient temperature relative humidity and paint viscosity Input a pre-trained neural network model, and the model outputs the predicted film thickness within a future set time window. ; Calculate and predict film thickness With target film thickness The difference : This serves as the predicted film thickness deviation.
8. The machine vision-based adaptive control method for paint spraying trajectory as described in claim 1, characterized in that, In step S50, the composite control method combining feedforward and feedback includes: Step S501, the current position deviation obtained in step S40 is... Deviation from current film thickness Input the PID controller and calculate the feedback control quantity used to eliminate the current error. ; Step S502: Based on the rate of change of the current position deviation and the airflow disturbance vector of the paint fog field, predict the system disturbance amount at the next moment using the disturbance observer, and calculate the feedforward compensation amount used to suppress future errors. ; Step S503, the feedback control quantity With feedforward compensation The final control quantity is obtained by vector superposition. and the final control quantity The commands are interpreted as kinematic commands for the robotic arm and process parameter commands for the spray gun.
9. The machine vision-based adaptive control method for paint spraying trajectory as described in claim 8, characterized in that, The parsing process of the kinematic commands of the robotic arm and the process parameter commands of the spray gun includes: When the predicted film thickness deviation When the value is positive and exceeds the preset upper limit threshold, the robotic arm is controlled to accelerate along the tangent direction of the trajectory, and the atomizing air pressure of the spray gun is increased and the opening of the fan-shaped control valve is reduced. When the predicted film thickness deviation When the value is negative and less than the preset lower threshold, the robotic arm is controlled to move towards the workpiece along the trajectory normal, and the opening of the spray gun's fan-shaped control valve and the opening of the paint output flow valve are increased. When a lateral shift is detected in the centroid of the current frame's paint fog density distribution map, the robotic arm is controlled to perform translation compensation in a horizontal plane perpendicular to the painting direction.
10. A machine vision-based adaptive control system for paint spraying trajectories, characterized in that, The system is used to implement the machine vision-based adaptive control method for paint spraying trajectories as described in any one of claims 1-9, and the system comprises: The paint spraying area segmentation module is used to acquire 3D point cloud data of the workpiece to be painted using a structured light camera, construct a geometric topological model of the workpiece surface, and divide the workpiece surface into several paint spraying sub-regions according to the curvature changes. Initial trajectory generation module: Based on the geometric topology model of the workpiece surface to be painted and preset process parameters, it uses a non-uniform rational B-spline curve fitting algorithm to generate an initial painting trajectory without singularities, and solves for the corresponding robotic arm joint spatial motion commands. Visual feedback acquisition module: used to execute the painting operation according to the initial painting trajectory and the spatial motion command of the robotic arm joint. During the painting process, the visual sensor deployed on the spray gun collects the paint mist field density distribution map between the spray gun and the workpiece to be painted and the wet band reflective features of the workpiece surface in real time at a preset frame rate. Deviation Calculation and Prediction Module: This module compares the reflective characteristics of the wetted zone collected in real time with the theoretically predicted wetted zone model to calculate the positional deviation of the current paint spraying trajectory. At the same time, based on the paint film leveling dynamics model, it predicts the film thickness deviation within a set time window based on the current diffusion trend of the wetted zone. Adaptive control module: Based on the positional deviation of the current paint spraying trajectory and the predicted film thickness deviation, it uses a composite control method combining feedforward and feedback to synchronously adjust the position, movement speed, spray gun atomization air pressure, and fan-shaped control valve opening of the robotic arm end effector.