A dynamic correction method for nozzle posture of a powder spraying machine based on a BP neural network
By fusing nozzle mechanical attitude and jet observation data through a BP neural network, real-time optimization of nozzle attitude and spray distance is achieved, solving the problem of unstable coating quality and improving the real-time performance and intelligence level of the coating process.
Patent Information
- Application Number
- CN202511287291.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-10
AI Technical Summary
The nozzle attitude and spray distance are difficult to be accurately corrected in real time, resulting in unstable coating quality. In the existing technology, the jet observation information and nozzle geometric attitude lack effective integration, are easily affected by noise, and the control parameters are fixed and difficult to adjust adaptively. It is difficult to balance response speed and control accuracy.
A nozzle attitude dynamic correction method based on BP neural network is adopted. By collecting nozzle mechanical attitude and jet observation data, the plume direction vector and the nozzle mechanical axis direction vector are fused, and the BP neural network is used for disturbance feedforward compensation. Combined with proportional, integral, derivative adjustment and closed-loop control, the nozzle attitude and spray distance are optimized in real time.
It improves the robustness of plume direction estimation, enhances the real-time performance and intelligence of the spraying process, improves spraying uniformity and deposition stability, and enhances the controller's ability to predict and correct uncertainties.
Smart Images

Figure CN120803075B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of nozzle posture correction technology, specifically relating to a dynamic correction method for the nozzle posture of a powder spraying machine based on a BP neural network. Background Technology
[0002] Powder coating technology has wide applications in material surface modification, wear-resistant protection of parts, and additive manufacturing. The stability and consistency of coating quality largely depend on the control accuracy of nozzle attitude and spray distance. In existing technologies, nozzle attitude is generally set by mechanical fixtures or detected by simple angle sensors, while spray distance is mostly maintained by manual measurement or fixed structure. However, due to the complex geometry of the workpiece surface, a deviation inevitably occurs between the mechanical axis of the nozzle and the actual main direction of the jet plume. This makes it difficult to keep the jet injection angle and spray distance within the ideal range, resulting in uneven coating thickness distribution and difficulty in guaranteeing coating quality.
[0003] Current research has attempted to incorporate image processing methods to obtain jet distribution characteristics, but these methods still have shortcomings: First, the jet observation information lacks effective fusion with the nozzle geometric attitude, making it susceptible to noise interference during observation and leading to unstable plume direction estimation; second, control parameters are usually fixed and difficult to adaptively adjust according to external disturbances or changes in workpiece curvature. Furthermore, traditional control methods often rely on a single feedback loop, making it difficult to balance response speed and control accuracy, and lacking the ability to dynamically correct nozzle attitude and spray distance under complex operating conditions. Summary of the Invention
[0004] This invention provides a dynamic correction method for nozzle posture of a powder coating machine based on a BP neural network, which solves the technical problem in related technologies that it is difficult to achieve real-time and accurate correction of nozzle posture and spray distance, resulting in unstable coating quality.
[0005] This invention provides a method for dynamic correction of nozzle attitude in a powder coating machine based on a BP neural network, comprising the following steps:
[0006] Step 1: Collect and calibrate device parameters, establish the transformation relationship between nozzle coordinates, workpiece coordinates and camera coordinates, and determine the workpiece surface points and workpiece surface normals through the set target plate;
[0007] Step 2: Acquire the nozzle mechanical attitude and determine the nozzle mechanical axis direction vector. Simultaneously, acquire jet observation data, calculate the gating weight based on the signal-to-noise ratio, and fuse the nozzle mechanical axis direction vector and the main plume axis direction vector to obtain the fused plume direction vector. Determine the spray distance and incident angle based on the jet observation data, and calculate the quality index. The nozzle mechanical attitude is represented by attitude angles.
[0008] Step 3: Perform online optimization based on preset amplitude perturbation. Using the quality index as input, apply preset amplitude perturbation to the attitude angle, estimate the sensitive direction of the quality index as the attitude angle changes, and adjust the attitude angle to obtain the optimized attitude angle. Based on the optimized attitude angle, obtain the optimized spray distance.
[0009] Step 4: Use a BP neural network for perturbation feedforward compensation. Construct a feature vector that includes the difference between the fused plume direction vector and the nozzle mechanical axis direction vector, the optimized spray distance and incident angle. Input the feature vector into the BP neural network and output the attitude angle perturbation correction amount and the spray distance perturbation correction amount to form the attitude feedforward amount and the spray distance feedforward amount.
[0010] Step 5: Perform main axis alignment and attitude and spray distance closed-loop tracking. Based on the axial deviation between the nozzle mechanical axis direction vector and the fused plume direction vector, combine proportional adjustment, integral adjustment and derivative adjustment, and generate the desired attitude angle and desired spray distance according to the optimized attitude angle, attitude feedforward and spray distance feedforward.
[0011] Step 6: Perform outer loop feedback control based on quality indicators, and adjust the preset amplitude disturbance, incident angle and spray distance.
[0012] Furthermore, the workpiece surface points and workpiece surface normals are determined using a set target plate, including:
[0013] Step 11: Arrange a planar target plate with a preset geometric feature point array on the surface of the workpiece, so that the plane of the target plate coincides with the plane of the workpiece surface.
[0014] Step 12: Acquire images of the target plate using a camera, and use the camera's internal and external parameters to perform spatial back projection on the feature points in the target plate image to obtain a set of planar points in the workpiece coordinate system.
[0015] Step 13: Perform least-squares plane fitting on the set of planar points to obtain the workpiece surface points and the workpiece surface normal.
[0016] Furthermore, the jet observation data includes: the main axis direction vector of the plume and the intensity field of the jet footprint;
[0017] The quality indicators are the uniformity of the spray pattern, the sum of the incident angle deviation and the spray distance deviation.
[0018] Furthermore, the process of determining the fused plume direction vector includes:
[0019] Step 21: Collect the mechanical attitude of the nozzle and represent it using attitude angles, including roll angle and pitch angle; calculate the direction vector of the mechanical axis of the nozzle based on the attitude angle and the preset coordinate transformation matrix, which serves as the geometric orientation of the nozzle body;
[0020] Step 22: Collect jet observation data to obtain the main axis direction vector of the plume, and calculate the gating weight based on the signal-to-noise ratio of the jet image. The signal-to-noise ratio is determined by the ratio of the mean effective signal intensity of the image to the noise variance. The gating weight is obtained by dividing the signal-to-noise ratio by a preset constant and then normalizing it.
[0021] Step 23: Use gating weights to linearly weight the nozzle mechanical axis direction vector and the plume main axis direction vector, and normalize the weighted result by dividing it by its modulus to obtain the fused plume direction vector per unit length.
[0022] Furthermore, the jet distance and incident angle are determined based on jet observation data, and quality indicators are calculated, including:
[0023] Step 31: Obtain the plume main axis direction vector based on the jet observation data, and take the inverse cosine of the dot product of the plume main axis direction vector and the normal vector of the workpiece surface as the incident angle; take the inner product of the vectors of the workpiece surface point and the nozzle exit point in the normal direction of the workpiece surface as the spray distance.
[0024] Step 32: Based on the sampling of the spray footprint intensity field, obtain multiple intensity values, calculate the average value, and calculate the difference between each intensity value and the average value and the ratio of the average value as the normalization deviation; square all normalization deviations and take the average value to obtain the uniformity of the spray footprint.
[0025] Step 33: Calculate the ratio of the difference between the incident angle and the preset incident angle target value to the span of the preset incident angle working interval to obtain the normalized result of the incident angle deviation; calculate the ratio of the difference between the spray distance and the preset spray distance target value to the span of the preset spray distance working interval to obtain the normalized result of the spray distance deviation; add the spray footprint uniformity, the normalized result of the incident angle deviation, and the normalized result of the spray distance deviation together to obtain the quality index.
[0026] Furthermore, step 3 specifically includes:
[0027] Step 41: Generate a sinusoidal disturbance signal for the attitude angle. The amplitude of the sinusoidal disturbance signal is a preset amplitude, which is determined by device calibration and is less than a preset angle threshold. The sinusoidal disturbance signal is superimposed on the current attitude angle to obtain the attitude angle after the disturbance is injected.
[0028] Step 42: Using the quality index as input, perform synchronous demodulation operation on the quality index and the sinusoidal disturbance signal within a preset time window to obtain the sensitivity estimation result; the synchronous demodulation is obtained by calculating the integral correlation between the quality index and the disturbance signal within the preset time window.
[0029] Step 43: Based on the sensitivity estimation result, the attitude angle is updated by gradient descent along the negative direction of the sensitivity estimation result with a preset update step size, and the updated attitude angle is projected into the preset attitude angle feasible domain boundary to obtain the optimized attitude angle. The spray distance is then recalculated by combining the workpiece surface point and the workpiece surface normal to obtain the optimized spray distance.
[0030] Furthermore, step 4 specifically includes:
[0031] Step 51: Construct a feature vector containing the difference vector between the fused plume direction and the nozzle mechanical axis direction, the optimized spray distance, and the incident angle. The difference vector is obtained by subtracting the fused plume direction vector and the nozzle mechanical axis direction vector component by component after normalization. The optimized spray distance and incident angle are normalized and then concatenated with the difference vector to form the feature vector.
[0032] Step 52: Input the feature vector into the trained BP neural network. The BP neural network is trained based on historical perturbation experimental data and corresponding attitude corrections, and outputs attitude angle perturbation corrections and jet distance perturbation corrections. The attitude angle perturbation corrections include roll angle corrections and pitch angle corrections.
[0033] Step 53: The attitude angle disturbance correction amount is superimposed with the optimized attitude angle to obtain the attitude feedforward amount, and the spray distance disturbance correction amount is superimposed with the optimized spray distance to obtain the spray distance feedforward amount.
[0034] Furthermore, the process of generating the desired attitude angle and desired spray distance includes:
[0035] Step 61: Calculate the angle between the nozzle mechanical axis direction vector and the fused plume direction vector as the axial deviation, and convert the axial deviation into an attitude angle equivalent error that includes roll angle error and pitch angle error by linear mapping of the direction cosine Jacobian matrix and the difference between the two vectors.
[0036] Step 62: Add the optimized attitude angle and attitude feedforward component by component to obtain the attitude reference value; add the optimized spray distance and spray distance feedforward component by component to obtain the spray distance reference value.
[0037] Step 63: The difference between the attitude reference value and the current measured attitude angle, the difference between the spray distance reference value and the current measured spray distance, and the equivalent error together constitute the closed-loop control error. The desired roll angle, desired pitch angle, and desired spray distance are calculated by linear combination of proportional, integral, and derivative terms, respectively. The proportional term is the product of the closed-loop control error and the proportional coefficient, the integral term is the product of the closed-loop control error integrated over time and the integral coefficient, and the derivative term is the product of the rate of change of the closed-loop control error over time and the derivative coefficient.
[0038] Step 64: Project the desired roll angle, desired pitch angle, and desired spray distance onto the feasible domain boundary of the attitude angle and spray distance, and constrain them to the boundary values by using the method of exceeding the boundary truncation, to obtain the final desired attitude angle and desired spray distance.
[0039] Furthermore, outer-loop feedback control is implemented based on quality indicators, and adjustments are made to preset amplitude disturbances, incident angles, and spray distances, including:
[0040] Step 71: Calculate the moving average of the quality index within the preset time window, and compare it with the preset upper limit and the preset lower limit of quality respectively;
[0041] Step 72: When the quality index is higher than the preset quality upper limit and continues to exceed the preset number of cycles, gradually increase the amplitude of the preset amplitude disturbance according to the preset proportional coefficient; when the quality index is lower than the preset quality lower limit and continues to exceed the preset number of cycles, gradually decrease the amplitude of the preset amplitude disturbance.
[0042] Step 73: Update the incident angle and spray distance based on the workpiece surface normal and radius of curvature, and project the updated incident angle and spray distance into the preset working range through amplitude limiting and speed limiting.
[0043] The beneficial effects of this invention are as follows: This invention integrates nozzle mechanical attitude and jet observation data, achieving adaptive fusion of direction information through difference vectors and gating weights, effectively improving the robustness of plume direction estimation; by employing an online optimization mechanism based on preset amplitude perturbations, the attitude angle is dynamically adjusted with quality indicators as feedback, and the spray distance is updated in real time while optimizing the attitude, enabling the system to adapt to complex workpiece surfaces and external disturbances; a nonlinear mapping relationship between nozzle attitude, spray distance, and spraying effect is established through a BP neural network, achieving disturbance feedforward compensation and improving the controller's ability to predict and correct uncertainties; furthermore, at the closed-loop control level, this invention introduces comprehensive adjustment of attitude reference quantities, spray distance reference quantities, and equivalent errors, combined with PID control and boundary projection, ensuring control accuracy and execution safety. Overall, this invention can significantly improve spraying uniformity and deposition stability, enhancing the real-time performance and intelligence level of the spraying process. Attached Figure Description
[0044] Figure 1 This is a flowchart of a dynamic correction method for nozzle posture of a powder spraying machine based on a BP neural network, according to the present invention. Detailed Implementation
[0045] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0046] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0047] like Figure 1 As shown, a method for dynamic correction of nozzle attitude in a powder coating machine based on a BP neural network includes the following steps:
[0048] Step 1: Collect and calibrate device parameters, establish the transformation relationship between nozzle coordinates, workpiece coordinates and camera coordinates, and determine the workpiece surface points and workpiece surface normals through the set target plate;
[0049] Step 2: Acquire the nozzle mechanical attitude and determine the nozzle mechanical axis direction vector. Simultaneously, acquire jet observation data, calculate the gating weight based on the signal-to-noise ratio, and fuse the nozzle mechanical axis direction vector and the main plume axis direction vector to obtain the fused plume direction vector. Determine the spray distance and incident angle based on the jet observation data, and calculate the quality index. The nozzle mechanical attitude is represented by attitude angles.
[0050] Step 3: Perform online optimization based on preset amplitude perturbation. Using the quality index as input, apply preset amplitude perturbation to the attitude angle, estimate the sensitive direction of the quality index as the attitude angle changes, and adjust the attitude angle to obtain the optimized attitude angle. Based on the optimized attitude angle, obtain the optimized spray distance.
[0051] Step 4: Use a BP neural network for perturbation feedforward compensation. Construct a feature vector that includes the difference between the fused plume direction vector and the nozzle mechanical axis direction vector, the optimized spray distance and incident angle. Input the feature vector into the BP neural network and output the attitude angle perturbation correction amount and the spray distance perturbation correction amount to form the attitude feedforward amount and the spray distance feedforward amount.
[0052] Step 5: Perform main axis alignment and attitude and spray distance closed-loop tracking. Based on the axial deviation between the nozzle mechanical axis direction vector and the fused plume direction vector, combine proportional adjustment, integral adjustment and derivative adjustment, and generate the desired attitude angle and desired spray distance according to the optimized attitude angle, attitude feedforward and spray distance feedforward.
[0053] Step 6: Perform outer loop feedback control based on quality indicators, and adjust the preset amplitude disturbance, incident angle and spray distance.
[0054] In one embodiment of the present invention, spatial transformation relationships between the nozzle coordinate system, workpiece coordinate system, and camera coordinate system are established by acquiring and calibrating the powder spraying device. The nozzle coordinate system is a rectangular coordinate system established with the nozzle outlet center point as the origin and the nozzle mechanical axis direction as the reference; the workpiece coordinate system is a rectangular coordinate system established with the reference point of the workpiece surface to be processed as the reference; and the camera coordinate system is a coordinate system established based on the imaging geometry of the vision acquisition device. By establishing the coordinate transformation relationship among the three, a unified expression of nozzle attitude information, workpiece geometric information, and visual perception information can be achieved.
[0055] In one embodiment of the present invention, determining workpiece surface points and workpiece surface normals using a set target plate includes:
[0056] Step 11: Arrange a planar target plate with a preset geometric feature point array on the surface of the workpiece, so that the plane of the target plate coincides with the plane of the workpiece surface, thereby ensuring that the geometric information measured by the target plate can truly reflect the spatial morphology of the workpiece surface; wherein, the preset geometric feature point array consists of several precisely positioned and regularly distributed points, usually using dots, checkerboard patterns or other high-contrast marks, to facilitate camera recognition and positioning.
[0057] Step 12: Acquire images of the target plate using a camera, and perform spatial back-projection on the feature points in the target plate image using the camera's intrinsic and extrinsic parameters to obtain a set of planar points in the workpiece coordinate system. The camera's intrinsic parameters refer to parameters related to imaging geometry, such as focal length, principal point position, and radial and tangential distortion coefficients. The extrinsic parameters refer to the rotation matrix and translation vector of the camera coordinate system relative to the workpiece coordinate system. Through this process, the spatial positional relationship of the target plate in the workpiece coordinate system can be accurately recovered.
[0058] Step 13: Perform least-squares plane fitting on the set of planar points to construct the plane equation that best represents the distribution of the point set, obtaining the coordinates of the workpiece surface points, i.e., the reference points located on the workpiece surface. The plane normal vector is used as the perpendicular direction of the fitting plane and is determined as the workpiece surface normal. The unit normal vector is obtained through normalization. The direction information of the workpiece surface normal directly reflects the geometric orientation of the workpiece surface.
[0059] In one embodiment of the present invention, the jet observation data includes: a plume main axis direction vector and a jet footprint intensity field; wherein, the plume main axis direction vector is a unit vector obtained by extracting the main direction of the energy distribution of the jet plume through image processing; the jet footprint intensity field is the intensity distribution formed by the jet particles falling on the surface area of the workpiece, reflecting the energy or deposition amount of each sampling point within the spray coverage area;
[0060] The quality indicators are the sum of spray footprint uniformity, incident angle deviation, and spray distance deviation. Among them, spray footprint uniformity is used to measure whether the spray intensity distribution is uniform; incident angle deviation is used to quantify the degree of influence of nozzle direction on spray quality; spray distance deviation represents the difference between the actual distance from the nozzle to the workpiece surface and the preset target spray distance, and is used to reflect the accuracy of spray distance control.
[0061] In one embodiment of the present invention, the process of determining the fused plume direction vector includes:
[0062] Step 21: Collect the mechanical attitude of the nozzle and represent it using attitude angles, including roll angle and pitch angle; calculate the direction vector of the nozzle mechanical axis based on the attitude angle and a preset coordinate transformation matrix, which serves as the geometric orientation of the nozzle body; wherein, the preset coordinate transformation matrix is a direction cosine matrix obtained through calibration, used to realize the transformation between the nozzle coordinate system and the workpiece coordinate system;
[0063] Step 22: Collect jet observation data to obtain the main axis direction vector of the plume, and calculate the gating weight based on the signal-to-noise ratio of the jet image. The signal-to-noise ratio is determined by the ratio of the mean effective signal intensity of the image to the noise variance. The gating weight is obtained by dividing the signal-to-noise ratio by a preset constant and then normalizing it. The gating weight is used to dynamically balance the contribution ratio of nozzle geometric axis information and plume observation information.
[0064] Step 23: Use gating weights to linearly weight the nozzle mechanical axis direction vector and the plume main axis direction vector, and normalize the weighted result by dividing it by its modulus to obtain the fused plume direction vector per unit length.
[0065] Through the above steps, this invention can adaptively achieve information fusion between the nozzle's mechanical attitude and the actual observed jet flow. When the jet flow image quality is high and the signal-to-noise ratio is large, the plume principal axis direction vector has a greater weight in the fusion result; while when the jet flow image has significant noise interference, the fusion result depends more on the nozzle's geometric attitude. This method effectively improves the robustness and accuracy of determining the plume principal axis direction vector.
[0066] In one embodiment of the present invention, the jet distance and incident angle are determined based on jet observation data, and quality indicators are calculated, including:
[0067] Step 31: Obtain the plume main axis direction vector based on the jet observation data, and take the inverse cosine of the dot product of the plume main axis direction vector and the normal vector of the workpiece surface as the incident angle; take the dot product of the vectors of the workpiece surface point and the nozzle exit point in the normal direction of the workpiece surface as the spray distance; specifically, the formula for calculating the incident angle is: ,in, Let arccos denote the angle of incidence, and arccos denote the arccosine function. This represents the direction vector of the main axis of the plume. This represents the normal vector of the workpiece surface. This represents the dot product operation; the incident angle reflects the relative angle between the jet direction and the workpiece surface; the formula for calculating the jet distance is: Where d represents the spray distance and T represents the transpose operation. and These represent the three-dimensional coordinates of the workpiece surface point and the nozzle exit point in the workpiece coordinate system, respectively. This formula represents the projection of the vector from the nozzle exit point to the workpiece surface point onto the surface normal direction to obtain the spray distance.
[0068] Step 32: Based on the sampling of the spray footprint intensity field, obtain multiple intensity values, calculate the average value, and calculate the difference between each intensity value and the average value and the ratio of the average value as the normalization deviation; square all normalization deviations and take the average value to obtain the uniformity of the spray footprint.
[0069] Step 33: Calculate the ratio of the difference between the incident angle and the preset incident angle target value to the span of the preset incident angle working interval to obtain the normalized result of the incident angle deviation; calculate the ratio of the difference between the spray distance and the preset spray distance target value to the span of the preset spray distance working interval to obtain the normalized result of the spray distance deviation; add the spray footprint uniformity, the normalized result of the incident angle deviation, and the normalized result of the spray distance deviation to obtain the quality index; the quality index can reflect the influence of the nozzle posture on the spraying effect and measure the degree of deviation of the spray distance and incident angle from the target value.
[0070] In one embodiment of the present invention, step 3 specifically includes:
[0071] Step 41: Generate a sinusoidal disturbance signal for the attitude angle. The amplitude of the sinusoidal disturbance signal is a preset amplitude, which is determined by the device calibration and is less than a preset angle threshold to avoid the disturbance having too much impact on the spraying process. The sinusoidal disturbance signal is superimposed on the current attitude angle to obtain the attitude angle after the disturbance is injected.
[0072] Step 42: Using the quality index as input, perform synchronous demodulation operations on the quality index and the sinusoidal disturbance signal within a preset time window to obtain the sensitivity estimation result; the synchronous demodulation is obtained by calculating the integral correlation between the quality index and the disturbance signal within the preset time window; specifically, the formula for calculating the sensitivity estimation result is as follows: S represents the sensitivity estimation result, which indicates the direction and magnitude of the quality index's response to attitude angle disturbances, and is used to reflect the sensitivity of the quality index to changes in disturbances. Indicates at time Quality indicators Indicates at time The sinusoidal disturbance signal, where t represents the current time point and T represents the length of the preset time window;
[0073] Step 43: Based on the sensitivity estimation result, the attitude angle is updated by gradient descent along the negative direction of the sensitivity estimation result with a preset update step size, and the updated attitude angle is projected into the preset attitude angle feasible domain boundary to obtain the optimized attitude angle. The spray distance is then recalculated by combining the workpiece surface point and the workpiece surface normal to obtain the optimized spray distance.
[0074] Through the above steps, the present invention can achieve adaptive optimization of nozzle attitude based on real-time quality indicators and small disturbance injection. Through sensitivity estimation and gradient descent update, the adjustment direction and magnitude of attitude angle can be quickly obtained. Through feasible region projection, it is ensured that the updated attitude angle meets the device constraints. By recalculating the spray distance through the optimized attitude angle, the consistency between spray distance and attitude control is guaranteed.
[0075] In one embodiment of the present invention, step 4 specifically includes:
[0076] Step 51: Construct a feature vector containing the difference vector between the fused plume direction and the nozzle mechanical axis direction, the optimized spray distance, and the incident angle. The difference vector is obtained by subtracting the fused plume direction vector and the nozzle mechanical axis direction vector component by component after normalization. The optimized spray distance and incident angle are normalized and then concatenated with the difference vector to form the feature vector.
[0077] Step 52: Input the feature vector into the trained BP neural network. The BP neural network is trained based on historical perturbation experimental data and corresponding attitude corrections, and outputs attitude angle perturbation corrections and spray distance perturbation corrections. The training objective is to minimize the actual spraying error. Through this training process, the BP neural network can learn the nonlinear mapping relationship between attitude perturbation and spraying effect. The attitude angle perturbation corrections include roll angle corrections and pitch angle corrections.
[0078] It should be noted that the BP neural network is a typical multi-layer feedforward network structure, including an input layer, hidden layers, and an output layer. The input layer receives the feature vector, the output layer provides the attitude angle perturbation correction and the jet distance perturbation correction, and the hidden layers employ nonlinear activation functions to enhance the network's fitting ability. The BP neural network undergoes supervised training using historical perturbation experimental data, and iteratively updates the weights and thresholds using an error backpropagation algorithm, thereby achieving a nonlinear mapping relationship between the input features and the output correction.
[0079] Step 53: The attitude angle disturbance correction amount is superimposed with the optimized attitude angle to obtain the attitude feedforward amount, and the spray distance disturbance correction amount is superimposed with the optimized spray distance to obtain the spray distance feedforward amount.
[0080] Through the above process, this invention utilizes a BP neural network to perform perturbation feedforward compensation for attitude and spray distance; the introduction of a difference vector enables the fusion of nozzle geometric attitude and jet observation information; the normalized spray distance and incident angle are used as inputs to improve the network's generalization ability under different scale conditions; the final output feedforward quantity is superimposed with the optimization result, which can effectively compensate for environmental disturbances and system uncertainties, improve the response speed and steady-state accuracy of closed-loop control, and thus ensure the stability and consistency of the spraying process.
[0081] In one embodiment of the present invention, the process of generating the desired attitude angle and the desired spray distance includes:
[0082] Step 61: Calculate the angle between the nozzle mechanical axis direction vector and the fused plume direction vector as the axial deviation, and convert the axial deviation into an attitude angle equivalent error including roll angle error and pitch angle error by linear mapping of the direction cosine Jacobian matrix and the difference between the two vectors; wherein, the axial deviation is obtained by taking the inverse cosine of the dot product of the nozzle mechanical axis direction vector and the fused plume direction vector.
[0083] Step 62: Add the optimized attitude angle and attitude feedforward component by component to obtain the attitude reference value; add the optimized spray distance and spray distance feedforward component by component to obtain the spray distance reference value.
[0084] Step 63: The difference between the attitude reference value and the currently measured attitude angle, the difference between the spray distance reference value and the currently measured spray distance, and the equivalent error together constitute the closed-loop control error. The desired roll angle, desired pitch angle, and desired spray distance are calculated by linear combinations of proportional, integral, and derivative terms, respectively. The proportional term is the product of the closed-loop control error and the proportional coefficient, the integral term is the product of the closed-loop control error integrated over time and the integral coefficient, and the derivative term is the product of the rate of change of the closed-loop control error over time and the derivative coefficient. The proportional term is used for fast response, the integral term is used to eliminate steady-state deviation, and the derivative term is used to suppress high-frequency disturbances.
[0085] Step 64: Project the desired roll angle, desired pitch angle, and desired spray distance onto the feasible domain boundary of the attitude angle and spray distance, and constrain them to the boundary values by using the method of exceeding the boundary truncation, to obtain the final desired attitude angle and desired spray distance.
[0086] Through the above steps, this invention achieves the dynamic generation of the desired attitude angle and desired spray distance. By introducing an equivalent error caused by the inconsistency between the nozzle direction and the spray direction as a compensation factor, this invention ensures that the closed-loop control simultaneously considers the optimization results, the actual execution state, and the geometric alignment requirements. Through PID regulation and boundary projection, the convergence, stability, and safety of the attitude and spray distance control are further guaranteed, thereby effectively improving the accuracy and robustness of the spraying process.
[0087] In one embodiment of the present invention, outer-loop feedback control is performed based on quality indicators, and preset amplitude disturbances, incident angles, and spray distances are adjusted, including:
[0088] Step 71: Calculate the moving average of the quality index within the preset time window, and compare it with the preset upper limit and the preset lower limit of quality respectively. If it exceeds the range, the spraying status is determined to be abnormal.
[0089] Step 72: When the quality index is higher than the preset quality upper limit and continues to exceed the preset number of cycles, the amplitude of the preset amplitude disturbance is gradually increased according to the preset proportional coefficient; when the quality index is lower than the preset quality lower limit and continues to exceed the preset number of cycles, the amplitude of the preset amplitude disturbance is gradually decreased. This step ensures that the disturbance injection can provide sufficient sensitivity without causing excessive fluctuations in the spraying process.
[0090] Step 73: Update the incident angle and spray distance based on the workpiece surface normal and radius of curvature, and project the updated incident angle and spray distance onto a preset working range using amplitude and speed limiting. The workpiece surface normal reflects the local orientation of the workpiece surface, and the radius of curvature reflects the degree of curvature of the workpiece surface. By adjusting the spray angle target in conjunction with the workpiece surface normal, the nozzle posture always maintains a reasonable angle with the workpiece surface. By adjusting the spray distance target in conjunction with the workpiece surface radius of curvature, the distance between the nozzle and the workpiece surface meets the requirements for coverage and deposition thickness. To ensure the physical feasibility and control stability of the incident angle and spray distance target values, the updated incident angle and spray distance are further projected onto a preset working range. The preset working range is jointly determined by the system's mechanical constraints and process requirements, using amplitude and speed limiting projection methods. Amplitude limiting ensures that the incident angle and spray distance do not exceed the set upper and lower limits, and speed limiting ensures that the target change amplitude within adjacent control cycles does not exceed the allowable rate, thereby avoiding overshoot or jitter in the actuator.
[0091] Through the above-mentioned outer loop feedback control process, the present invention can adjust the preset amplitude and geometric control target in real time according to the changes in quality indicators during the spraying process, so that the nozzle posture and spray distance are dynamically optimized according to the surface characteristics of the workpiece and the spraying state.
[0092] It should be noted that the interval and threshold sizes are set for ease of comparison. The size of the threshold depends on the amount of sample data and the base number set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless calculations, and the formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0093] The embodiments of the present invention have been described above, but the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of the present embodiments, all of which are within the protection scope of the present embodiments.
Claims
1. A method for dynamic correction of nozzle attitude in a powder coating machine based on a BP neural network, characterized in that, Includes the following steps: Step 1: Collect and calibrate device parameters to determine workpiece surface points and workpiece surface normals; Step 2: Collect nozzle mechanical attitude and jet observation data, determine the nozzle mechanical axis direction vector, calculate the gating weight based on the signal-to-noise ratio, fuse the nozzle mechanical axis direction vector and the main plume axis direction vector to obtain the fused plume direction vector; and determine the spray distance and incident angle, and calculate the quality index. The mechanical attitude of the nozzle is represented by attitude angles; Step 3: Online optimization based on preset amplitude perturbation. Apply preset amplitude perturbation to the attitude angle according to the quality index and output the sensitivity estimation result; adjust the attitude angle to obtain the optimized attitude angle and the optimized spray distance. Step 4: Use a BP neural network for perturbation feedforward compensation. Construct a feature vector that includes the difference between the fused plume direction vector and the nozzle mechanical axis direction vector, the optimized spray distance and incident angle, and input it into the BP neural network. Output the attitude angle perturbation correction amount and the spray distance perturbation correction amount to form the attitude feedforward amount and the spray distance feedforward amount. Step 5: Perform spindle alignment and closed-loop tracking. Based on the axial deviation between the nozzle mechanical axis direction vector and the fused plume direction vector, combine proportional, integral and derivative adjustments, and generate the desired attitude angle and desired spray distance according to the optimized attitude angle, attitude feedforward and spray distance feedforward. Step 6: Perform outer loop feedback control based on quality indicators, and adjust the preset amplitude disturbance, incident angle and spray distance.
2. The method for dynamic correction of nozzle attitude of a powder spraying machine based on a BP neural network according to claim 1, characterized in that, Determine the workpiece surface points and workpiece surface normals, including: Step 11: Arrange a planar target plate with a preset geometric feature point array on the surface of the workpiece, so that the plane of the target plate coincides with the plane of the workpiece surface. Step 12: Acquire images of the target plate using a camera, and use the camera's internal and external parameters to perform spatial back projection on the feature points in the target plate image to obtain a set of planar points in the workpiece coordinate system. Step 13: Perform least-squares plane fitting on the set of planar points to obtain the workpiece surface points and the workpiece surface normal.
3. The method for dynamic correction of nozzle attitude of a powder spraying machine based on a BP neural network according to claim 1, characterized in that, The jet observation data includes: the plume main axis direction vector and the jet footprint intensity field; The quality indicators are the uniformity of the spray pattern, the sum of the incident angle deviation and the spray distance deviation.
4. The method for dynamic correction of nozzle attitude of a powder spraying machine based on a BP neural network according to claim 1, characterized in that, The process of determining the direction vector of the fused plume includes: Step 21: Collect the mechanical attitude of the nozzle and represent it using attitude angles, including roll angle and pitch angle; calculate the direction vector of the mechanical axis of the nozzle based on the attitude angle and the preset coordinate transformation matrix, which serves as the geometric orientation of the nozzle body; Step 22: Collect jet observation data to obtain the main axis direction vector of the plume, and calculate the gating weight based on the signal-to-noise ratio of the jet image. The signal-to-noise ratio is determined by the ratio of the mean effective signal intensity of the image to the noise variance. The gating weight is obtained by dividing the signal-to-noise ratio by a preset constant and then normalizing it. Step 23: Use gating weights to linearly weight the nozzle mechanical axis direction vector and the plume main axis direction vector, and normalize the weighted result by dividing it by its modulus to obtain the fused plume direction vector per unit length.
5. The method for dynamic correction of nozzle attitude of a powder spraying machine based on a BP neural network according to claim 3, characterized in that, The calculation process for quality indicators includes: Step 31: Obtain the plume main axis direction vector based on the jet observation data, and take the inverse cosine of the dot product of the plume main axis direction vector and the normal vector of the workpiece surface as the incident angle; take the inner product of the vectors of the workpiece surface point and the nozzle exit point in the normal direction of the workpiece surface as the spray distance. Step 32: Based on the sampling of the spray footprint intensity field, obtain multiple intensity values, calculate the average value, and calculate the difference between each intensity value and the average value and the ratio of the average value as the normalization deviation; square all normalization deviations and take the average value to obtain the uniformity of the spray footprint. Step 33: Calculate the ratio of the difference between the incident angle and the preset incident angle target value to the span of the preset incident angle working interval to obtain the normalized result of the incident angle deviation; calculate the ratio of the difference between the spray distance and the preset spray distance target value to the span of the preset spray distance working interval to obtain the normalized result of the spray distance deviation; add the spray footprint uniformity, the normalized result of the incident angle deviation, and the normalized result of the spray distance deviation together to obtain the quality index.
6. The method for dynamic correction of nozzle attitude of a powder spraying machine based on a BP neural network according to claim 1, characterized in that, Step 3 specifically includes: Step 41: Generate a sinusoidal disturbance signal for the attitude angle. The amplitude of the sinusoidal disturbance signal is a preset amplitude, which is determined by device calibration and is less than a preset angle threshold. The sinusoidal disturbance signal is superimposed on the current attitude angle to obtain the attitude angle after the disturbance is injected. Step 42: Using the quality index as input, perform synchronous demodulation operation on the quality index and the sinusoidal disturbance signal within a preset time window to obtain the sensitivity estimation result; the synchronous demodulation is obtained by calculating the integral correlation between the quality index and the disturbance signal within the preset time window. Step 43: Based on the sensitivity estimation result, the attitude angle is updated by gradient descent along the negative direction of the sensitivity estimation result with a preset update step size, and the updated attitude angle is projected into the preset attitude angle feasible domain boundary to obtain the optimized attitude angle. The spray distance is then recalculated by combining the workpiece surface point and the workpiece surface normal to obtain the optimized spray distance.
7. The method for dynamic correction of nozzle attitude of a powder spraying machine based on a BP neural network according to claim 1, characterized in that, Step 4 specifically includes: Step 51: Construct a feature vector containing the difference vector between the fused plume direction and the nozzle mechanical axis direction, the optimized spray distance, and the incident angle. The difference vector is obtained by subtracting the fused plume direction vector and the nozzle mechanical axis direction vector component by component after normalization. The optimized spray distance and incident angle are normalized and then concatenated with the difference vector to form the feature vector. Step 52: Input the feature vector into the trained BP neural network. The BP neural network is trained based on historical perturbation experimental data and corresponding attitude corrections, and outputs attitude angle perturbation corrections and jet distance perturbation corrections. The attitude angle perturbation corrections include roll angle corrections and pitch angle corrections. Step 53: The attitude angle disturbance correction amount is superimposed with the optimized attitude angle to obtain the attitude feedforward amount, and the spray distance disturbance correction amount is superimposed with the optimized spray distance to obtain the spray distance feedforward amount.
8. The method for dynamic correction of nozzle attitude of a powder spraying machine based on a BP neural network according to claim 1, characterized in that, The process of generating the desired attitude angle and desired spray distance includes: Step 61: Calculate the angle between the nozzle mechanical axis direction vector and the fused plume direction vector as the axial deviation, and convert the axial deviation into an attitude angle equivalent error that includes roll angle error and pitch angle error by linear mapping of the direction cosine Jacobian matrix and the difference between the two vectors. Step 62: Add the optimized attitude angle and attitude feedforward component by component to obtain the attitude reference value; add the optimized spray distance and spray distance feedforward component by component to obtain the spray distance reference value. Step 63: The difference between the attitude reference value and the current measured attitude angle, the difference between the spray distance reference value and the current measured spray distance, and the equivalent error together constitute the closed-loop control error. The desired roll angle, desired pitch angle, and desired spray distance are calculated by linear combination of proportional, integral, and derivative terms, respectively. The proportional term is the product of the closed-loop control error and the proportional coefficient, the integral term is the product of the closed-loop control error integrated over time and the integral coefficient, and the derivative term is the product of the rate of change of the closed-loop control error over time and the derivative coefficient. Step 64: Project the desired roll angle, desired pitch angle, and desired spray distance onto the feasible domain boundary of the attitude angle and spray distance, and constrain them to the boundary values by using the method of exceeding the boundary truncation, to obtain the final desired attitude angle and desired spray distance.
9. The method for dynamic correction of nozzle attitude of a powder coating machine based on a BP neural network according to claim 1, characterized in that, Outer-loop feedback control is implemented based on quality indicators, and adjustments are made to preset amplitude disturbances, incident angles, and spray distances, including: Step 71: Calculate the moving average of the quality index within the preset time window, and compare it with the preset upper limit and the preset lower limit of quality respectively; Step 72: When the quality index is higher than the preset quality upper limit and continues to exceed the preset number of cycles, gradually increase the amplitude of the preset amplitude disturbance according to the preset proportional coefficient; when the quality index is lower than the preset quality lower limit and continues to exceed the preset number of cycles, gradually decrease the amplitude of the preset amplitude disturbance. Step 73: Update the incident angle and spray distance based on the workpiece surface normal and radius of curvature, and project the updated incident angle and spray distance into the preset working range through amplitude limiting and speed limiting.
Citation Information
Patent Citations
Unmanned aerial vehicle-mechanical arm system cooperative control method for precise spraying
CN120479640A
Multi-parameter regulation and control method and system for vacuum insulated panel heat insulation layer spraying robot
CN120552039A