Powder sprayer nozzle attitude dynamic correction method based on BP neural network
By fusing nozzle mechanical attitude and jet observation data through a BP neural network, dynamic correction 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
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-10-17
- 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. Traditional control methods cannot balance response speed and 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. The nonlinear mapping relationship between nozzle attitude and jet distance is established by using BP neural network to perform disturbance feedforward compensation, and closed-loop control is achieved by combining proportional-integral-derivative control.
It improves the real-time performance and intelligence of the spraying process, enhances the uniformity of spraying and deposition stability, and strengthens the adaptability and control precision to complex working conditions.
Smart Images

Figure CN120803075A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of nozzle posture correction, and in particular relates to a method for dynamic correction of the nozzle posture of a powder spraying machine based on a BP neural network. Background Art
[0002] Powder spraying technology is widely used in material surface modification, component wear protection, and additive manufacturing. The stability and consistency of spraying quality largely depend on the control accuracy of nozzle posture and spray distance. In the existing technology, the nozzle posture is generally set by a mechanical fixture or simply detected by an angle sensor, and the spray distance is mostly maintained by manual measurement or fixed structure limitation. However, due to the complex geometric morphology of the workpiece surface, there is an inevitable deviation between the mechanical axis direction of the nozzle and the actual main direction of the jet plume, making it difficult to maintain the jet incidence angle and spray distance within the ideal range, resulting in uneven distribution of coating deposition thickness and difficulty in ensuring spraying quality.
[0003] Currently, studies have attempted to incorporate image processing methods to characterize jet distribution, but these methods still have shortcomings: First, there is a lack of effective integration of jet observation information with the nozzle geometry, making the observation process susceptible to noise interference, resulting in unstable plume direction estimation; second, control parameters are typically fixed, making it difficult to adaptively adjust 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 lack the ability to dynamically correct nozzle attitude and spray distance under complex operating conditions. Summary of the Invention
[0004] The present invention provides a method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network, which solves the technical problem in related technologies that nozzle posture and spray distance are difficult to be accurately corrected in real time, resulting in unstable spraying quality.
[0005] The present invention provides a method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network, comprising the following steps: Step 1: Collect and calibrate device parameters, establish the conversion relationship between nozzle coordinates, workpiece coordinates and camera coordinates, and determine the workpiece surface points and workpiece surface normals through the set target plate; 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, fuse the nozzle mechanical axis direction vector and the plume main axis direction vector to obtain a 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 the attitude angle; Step 3, online optimization based on preset amplitude perturbation, taking the quality index as input, applying a preset amplitude perturbation to the attitude angle, estimating the sensitive direction of the quality index with the change of the attitude angle, and adjusting the attitude angle to obtain the optimized attitude angle, and obtaining the optimized spray distance based on the optimized attitude angle; Step 4, using BP neural network to perform perturbation feedforward compensation, constructing a feature vector containing the difference between the fused plume direction vector and the nozzle mechanical axis direction vector, the optimized spray distance and the incident angle, inputting the feature vector into the BP neural network, outputting the attitude angle perturbation correction and the spray distance perturbation correction, and forming the attitude feedforward and the spray distance feedforward; Step 5, performing main shaft alignment and attitude and spray distance closed-loop tracking, based on the axial deviation of the nozzle mechanical axis direction vector and the fused plume direction vector, combining proportional adjustment, integral adjustment and differential adjustment, and according to the optimized attitude angle, attitude feedforward and spray distance feedforward, generating the expected attitude angle and the expected spray distance; Step 6, outer loop feedback control based on the quality index, and adjustment of the preset amplitude perturbation, the incident angle and the spray distance.
[0006] Further, the workpiece surface point and the workpiece surface normal are determined by a set target plate, comprising: Step 11, arranging a planar target plate with a preset array of geometric feature points on the workpiece surface, so that the target plate plane coincides with the workpiece surface plane; Step 12, acquiring an image of the target plate by a camera, and using the internal and external parameters of the camera 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, performing least squares plane fitting on the set of planar points to obtain the workpiece surface point and the workpiece surface normal.
[0007] Further, the spray flow observation data includes a plume main axis direction vector and a spray width footprint intensity field. The quality index is the sum of the spray width footprint uniformity, the incident angle deviation and the spray distance deviation.
[0008] Further, the determination process of the fused plume direction vector includes: Step 21, acquiring the nozzle mechanical attitude and representing it by an attitude angle, the attitude angle including a roll angle and a pitch angle; calculating the nozzle mechanical axis direction vector based on the attitude angle and a preset coordinate conversion matrix as the geometric orientation of the nozzle body; Step 22, acquiring spray flow observation data to obtain a plume main axis direction vector, and calculating a gating weight according to the signal-to-noise ratio of the spray flow image, the signal-to-noise ratio being determined by the ratio of the mean value of the image effective signal intensity to the noise variance, and the gating weight being obtained by dividing the signal-to-noise ratio by a preset constant and normalizing; Step 23, linearly weight the nozzle mechanical axis direction vector and the plume principal axis direction vector by the gating weight, and normalize the weighted result by dividing by its module length to obtain a unit length fused plume direction vector.
[0009] Further, the spray distance and the incident angle are determined according to the spray observation data, and a quality index is calculated, including: Step 31, a plume principal axis direction vector is obtained based on the spray observation data, and the incident angle is taken as the inverse cosine of the dot product of the plume principal axis direction vector and the normal vector of the workpiece surface; the spray distance is taken as the inner product of the vectors of the workpiece surface point and the nozzle outlet point in the normal direction of the workpiece surface; Step 32, a plurality of intensity values are obtained based on the sampling of the spray footprint intensity field, the average value is calculated, and the normalized deviation is calculated as the ratio of each intensity value to the average value; the spray footprint uniformity is obtained by squaring and averaging all normalized deviations. Step 33, the normalized result of the incident angle deviation is obtained by calculating the ratio of the difference between the incident angle and the preset incident angle target value to the preset incident angle working interval span; the normalized result of the spray distance deviation is obtained by calculating the ratio of the difference between the spray distance and the preset spray distance target value to the preset spray distance working interval span; the quality index is obtained by adding the spray footprint uniformity, the normalized result of the incident angle deviation, and the normalized result of the spray distance deviation.
[0010] Further, the step 3 specifically includes: Step 41, a sinusoidal disturbance signal is generated for the attitude angle, the amplitude of the sinusoidal disturbance signal is a preset amplitude, the preset amplitude is determined by device calibration and is less than a preset angle threshold, and the sinusoidal disturbance signal is superimposed on the current attitude angle to obtain the attitude angle after injection disturbance; Step 42, taking the quality index as input, the quality index and the sinusoidal disturbance signal are synchronously demodulated in a preset time window to obtain a sensitivity estimation result; the synchronous demodulation is obtained by calculating the integral correlation of the quality index and the disturbance signal in the preset time window; Step 43, according to the sensitivity estimation result, the attitude angle is updated by gradient descent with a preset update step along the negative direction of the sensitivity estimation result, and the updated attitude angle is projected into the preset attitude angle feasible region boundary to obtain the optimized attitude angle, and the spray distance is recalculated based on the workpiece surface point and the workpiece surface normal to obtain the optimized spray distance.
[0011] Further, the step 4 specifically includes: Step 51, constructing a feature vector containing a difference vector of the fused plume direction and the nozzle mechanical axis direction, the optimized standoff distance, and the incident angle, wherein the difference vector is a vector obtained by subtracting the unitized nozzle mechanical axis direction vector from the unitized fused plume direction vector, and the optimized standoff distance and the incident angle are concatenated with the difference vector after normalization to form the feature vector; Step 52, inputting the feature vector into a trained BP neural network, wherein the BP neural network is trained based on historical disturbance experiment data and corresponding attitude correction amounts, and outputs an attitude angle disturbance correction amount and a standoff distance disturbance correction amount, wherein the attitude angle disturbance correction amount includes a roll angle direction correction amount and a pitch angle direction correction amount; Step 53, superimposing the attitude angle disturbance correction amount and the optimized attitude angle to obtain an attitude feedforward amount, and superimposing the standoff distance disturbance correction amount and the optimized standoff distance to obtain a standoff distance feedforward amount.
[0012] Further, the process of generating the desired attitude angle and the desired standoff distance includes: Step 61, calculating the included angle between the nozzle mechanical axis direction vector and the fused plume direction vector as an axial deviation, and converting the axial deviation into an attitude angle equivalent error containing a roll angle error and a pitch angle error through a linear mapping of the directional cosine Jacobian matrix and the difference between the two vectors; Step 62, adding the optimized attitude angle and the attitude feedforward amount element by element to obtain an attitude reference amount, and adding the optimized standoff distance and the standoff distance feedforward amount element by element to obtain a standoff distance reference amount; Step 63, constructing a closed-loop control error with the attitude reference amount and the difference between the current measured attitude angle, the standoff distance reference amount and the difference between the current measured standoff distance, and the equivalent error, and calculating the desired roll angle, the desired pitch angle, and the desired standoff distance through linear combination of proportional term, integral term, and differential term, wherein the proportional term is the product of the closed-loop control error and the proportional coefficient, the integral term is the product of the integral of the closed-loop control error with time and the integral coefficient, and the differential term is the product of the rate of change of the closed-loop control error with time and the differential coefficient; Step 64, projecting the desired roll angle, the desired pitch angle, and the desired standoff distance into the feasible region boundary of the attitude angle and the standoff distance, and constraining to the boundary value by using the out-of-boundary truncation method to obtain the final desired attitude angle and the desired standoff distance.
[0013] Further, the outer loop feedback control is based on the quality index, and the preset amplitude disturbance, the incident angle, and the standoff distance are adjusted, including: Step 71, calculating the sliding mean of the quality index within a preset time window, and comparing it with the preset upper limit of the quality index and the preset lower limit of the quality index, respectively; Step 72, when the quality index is higher than the preset upper limit of quality and lasts for more than a preset number of periods, gradually increase the amplitude of the preset amplitude disturbance by a preset proportion coefficient, and when the quality index is lower than the preset lower limit of quality and lasts for more than a preset number of periods, gradually decrease the amplitude of the preset amplitude disturbance; Step 73, update the incident angle and the spray distance according to the workpiece surface normal and the radius of curvature, and project the updated incident angle and the spray distance into the preset working interval through amplitude limiting and speed limiting.
[0014] The beneficial effects of the present application are that the present application fuses the nozzle mechanical posture and the spray flow observation data, realizes adaptive fusion of direction information through difference vectors and gate weights, effectively improves the robustness of plume direction estimation, adopts a preset amplitude disturbance-based online optimization mechanism, adjusts the posture angle with the quality index as feedback, and updates the spray distance in real time while optimizing the posture, so that the system can adapt to complex workpiece surfaces and external disturbances, establishes a nonlinear mapping relationship between the nozzle posture, the spray distance and the spraying effect through the BP neural network, realizes disturbance feedforward compensation, improves the prediction and correction ability of the controller to uncertain factors, and further introduces the comprehensive adjustment of the posture reference quantity, the spray distance reference quantity and the equivalent error in the closed-loop control layer, and combines PID control and boundary projection to ensure control accuracy and execution safety. Overall, the present application can significantly improve the spraying uniformity and deposition stability, and improve the real-time and intelligent level of the spraying process. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 is a flow chart of a powder spraying machine nozzle posture dynamic correction method based on a BP neural network. DETAILED DESCRIPTION
[0016] The subject matter described herein will now be discussed with reference to example implementations. It should be understood that the discussion of these implementations is merely meant to provide a better understanding of the subject matter described herein and can include changes in the function and arrangement of elements discussed without departing from the scope of the disclosure. Various examples can omit, substitute, or add various procedures or components as appropriate or desired. Also, features described in relation to some examples can also be combined in other examples.
[0017] It should be noted that unless otherwise defined, technical and scientific terms used in one or more embodiments of the application have the meanings commonly understood by one of ordinary skill in the art in the field of the application. The words "first", "second", and similar words of distinction do not imply any order, quantity, or importance, but are used to distinguish different components. The words "include" or "contain" and similar words mean that the elements or objects before the words encompass the elements or objects listed after the words and their equivalents, and do not exclude other elements or objects. The words "connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The words "up", "down", "left", "right", and the like are only used to represent relative positional relationships, which may change accordingly when the absolute position of the described object changes.
[0018] As shown in Figure 1 A nozzle posture dynamic correction method of a powder spraying machine based on a BP neural network, comprising the following steps: Step 1, collect and calibrate device parameters, establish the conversion relationship between the nozzle coordinates, workpiece coordinates and camera coordinates, and determine the workpiece surface points and workpiece surface normal through the set target plate; Step 2, collect the nozzle mechanical posture and determine the nozzle mechanical axis direction vector, at the same time collect the plume observation data, calculate the gating weight according to the signal-to-noise ratio, fuse the nozzle mechanical axis direction vector and the plume main axis direction vector to obtain the fused plume direction vector; determine the standoff distance and the incident angle according to the plume observation data, and calculate the quality index; the nozzle mechanical posture is represented by the posture angle; Step 3, online optimization based on preset amplitude perturbation, taking the quality index as input, applying a preset amplitude perturbation to the posture angle, estimating the sensitive direction of the quality index with the posture angle change, and adjusting the posture angle to obtain the optimized posture angle, and obtaining the optimized standoff distance based on the optimized posture angle; Step 4, BP neural network is used for perturbation feedforward compensation, a feature vector containing the difference between the fused plume direction vector and the nozzle mechanical axis direction vector, the optimized standoff distance and the incident angle is constructed, the feature vector is input into the BP neural network, the posture angle perturbation correction amount and the standoff distance perturbation correction amount are output, and the posture feedforward amount and the standoff distance feedforward amount are formed; Step 5, execute the main shaft alignment and the posture and standoff distance closed loop tracking, based on the axial deviation of the nozzle mechanical axis direction vector and the fused plume direction vector, combined with proportional adjustment, integral adjustment and differential adjustment, and according to the optimized posture angle, the posture feedforward amount and the standoff distance feedforward amount, the expected posture angle and the expected standoff distance are generated; Step 6, outer loop feedback control based on the quality index, and adjustment of the preset amplitude perturbation, the incident angle and the standoff distance.
[0019] In an embodiment of the present application, the space conversion relationship between the nozzle coordinate system, the workpiece coordinate system and the camera coordinate system is established by collecting and calibrating the powder spraying device. The nozzle coordinate system refers to a rectangular coordinate system with the center point of the nozzle outlet as the origin and the mechanical shaft direction of the nozzle as the reference; the workpiece coordinate system refers to a rectangular coordinate system established with the reference point on the surface of the workpiece as the reference; and the camera coordinate system refers to a coordinate system established according to the imaging geometry of the vision collection device. By establishing the coordinate conversion relationship among the three, the unified expression of the nozzle attitude information, the workpiece geometry information and the visual perception information can be realized.
[0020] In an embodiment of the present application, the workpiece surface point and the workpiece surface normal are determined by a set target plate, comprising: Step 11: A planar target plate with a preset array of geometric feature points is arranged 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 topography of the workpiece surface; wherein the preset array of geometric feature points is composed of a plurality of position-accurate and regularly-distributed points, usually adopting round dots, chessboard grids or other high-contrast markers, so as to facilitate camera recognition and positioning; Step 12: The image of the target plate is collected by the camera, and the feature points in the target plate image are subjected to spatial back-projection by using the internal parameters and external parameters of the camera, to obtain a set of planar points in the workpiece coordinate system; wherein the internal parameters of the camera refer to the focal length, the principal point position, the radial distortion and tangential distortion coefficients and other imaging geometry-related parameters; the external 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 position relationship of the target plate in the workpiece coordinate system can be accurately restored; Step 13: The least squares plane fitting is performed on the set of planar points, to construct a plane equation that best characterizes the distribution of the point set, to obtain the workpiece surface point, i.e. the coordinate of the reference point on the workpiece surface, and the plane normal vector as the vertical direction of the fitted plane, to determine the workpiece surface normal, and to obtain the unit normal vector through normalization processing. The direction information of the workpiece surface normal directly reflects the geometric orientation of the workpiece surface.
[0021] In an embodiment of the present application, the spray flow observation data includes: a plume main axis direction vector and a spray footprint intensity field; wherein the plume main axis direction vector is a unit vector obtained by extracting the main direction of energy distribution of the spray plume through image processing; and the spray footprint intensity field is the intensity distribution formed by the sprayed particles falling on the workpiece surface area, reflecting the energy or deposition amount of each sampling point within the spraying coverage range; The quality index is the sum of swath footprint uniformity, incident angle deviation and spray distance deviation. The swath footprint uniformity is used to measure whether the spraying intensity distribution is uniform; the incident angle deviation is used to quantify the influence degree of the nozzle direction on the spraying quality; and the spray distance deviation represents the difference between the actual nozzle to the workpiece surface distance and the preset target spray distance, and is used to reflect the accuracy of the spray distance control.
[0022] In an embodiment of the present application, the determination process of the fused plume direction vector comprises: Step 21, the nozzle mechanical posture is collected and represented by posture angles, the posture angles including roll angle and pitch angle; the nozzle mechanical axis direction vector is calculated based on the posture angles and a preset coordinate conversion matrix, as the geometric orientation of the nozzle body; wherein the preset coordinate conversion matrix is a direction cosine matrix obtained by calibration, and is used to realize the conversion between the nozzle coordinate system and the workpiece coordinate system; Step 22, the plume observation data is collected to obtain the plume main axis direction vector, and the gating weight is calculated according to the signal-to-noise ratio of the plume image, the signal-to-noise ratio being determined by the ratio of the image effective signal intensity mean value to the noise variance, and the gating weight being obtained by dividing the signal-to-noise ratio by a preset constant and normalizing; wherein the gating weight is used to dynamically balance the contribution proportion of the nozzle geometric axis information and the plume observation information; Step 23, the nozzle mechanical axis direction vector and the plume main axis direction vector are linearly weighted by using the gating weight, and the weighted result is normalized by dividing by its module length to obtain the fused plume direction vector of unit length.
[0023] Through the above steps, the present application can adaptively realize information fusion between the nozzle mechanical posture and the actual plume observation result; when the plume image quality is high and the signal-to-noise ratio is large, the plume main axis direction vector occupies a larger weight in the fusion result; and when the plume image noise interference is large, the fusion result depends more on the nozzle geometric posture. This method effectively improves the robustness and accuracy of the determination of the plume main axis direction vector.
[0024] In an embodiment of the present application, the spray distance and the incident angle are determined according to the plume observation data, and the quality index is calculated, comprising: Step 31, the plume main axis direction vector is obtained based on the plume observation data, and the incident angle is taken as the angle obtained by taking the inverse cosine of the dot product of the plume main axis direction vector and the workpiece surface normal vector; the spray distance is taken as the inner product value of the vectors of the workpiece surface point and the nozzle outlet point in the direction of the workpiece surface normal; specifically, the calculation formula of the incident angle is: wherein, represents the incident angle, arccos represents the inverse cosine function, represents the plume main axis direction vector, represents the workpiece surface normal vector, Represents dot product operation; the incident angle reflects the relative angle between the jet direction and the workpiece surface; the calculation formula for the spray distance is: , where d represents the spray distance, T represents the transposition operation, and Respectively represent the three-dimensional coordinates of the workpiece surface point and the nozzle exit point in the workpiece coordinate system. This formula represents the projection of the vector from the nozzle exit point to the workpiece surface point in the direction of the surface normal to obtain the spray distance; Step 32: obtaining multiple intensity values based on the spray pattern intensity field sampling, calculating an average value, and calculating the ratio of the difference between each intensity value and the average value and the average value as a normalized deviation; squaring all normalized deviations and taking the average value to obtain the spray pattern uniformity; Step 33, calculate the ratio of the difference between the incident angle and the preset incident angle target value to the preset incident angle working range span 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 preset spray distance working range span to obtain the normalized result of the spray distance deviation; add the normalized result of the spray width footprint uniformity, the incident angle deviation and the normalized result of the spray distance deviation to obtain the quality index; the quality index can not only reflect the influence of the nozzle posture on the spraying effect, but also measure the degree to which the spray distance and the incident angle deviate from the target value.
[0025] In one embodiment of the present invention, 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 to prevent the disturbance from having an excessive 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. Step 42: Using the quality indicator as input, perform synchronous demodulation on the quality indicator and the sinusoidal disturbance signal within a preset time window to obtain a sensitivity estimation result; the synchronous demodulation is obtained by calculating the integral correlation between the quality indicator and the disturbance signal within the preset time window; specifically, the calculation formula for the sensitivity estimation result is: , S represents the sensitivity estimation result, which indicates the response direction and amplitude of the quality index to the attitude angle disturbance, and is used to reflect the sensitivity of the quality index to the disturbance change; Indicates at time quality indicators, Indicates at time The sinusoidal disturbance signal is t, t represents the current time point, and T represents the length of the preset time window; Step 43, according to the sensitivity estimation result, gradient descent update is performed on the attitude angle in the negative direction of the sensitivity estimation result with a preset update step, the updated attitude angle is projected into the preset attitude angle feasible region boundary, an optimized attitude angle is obtained, the spray distance is recalculated in combination with the workpiece surface point and the workpiece surface normal, and an optimized spray distance is obtained.
[0026] Through the above steps, the present application can realize adaptive optimization of the nozzle attitude based on real-time quality indicators and small disturbance injection, and through sensitivity estimation and gradient descent update, the adjustment direction and amplitude of the attitude angle can be quickly obtained; through feasible region projection, it is ensured that the updated attitude angle meets the device constraint condition; through recalculation of the spray distance based on the optimized attitude angle, the consistency of the spray distance and the attitude control is ensured.
[0027] In an embodiment of the present application, the step 4 specifically comprises: Step 51, constructing a feature vector containing a difference vector of the fused plume direction and the nozzle mechanical axis direction, an optimized spray distance and an incident angle, wherein the difference vector is a vector obtained by subtracting the unitized plume direction vector from the unitized nozzle mechanical axis direction vector, and the optimized spray distance and the incident angle are normalized and spliced with the difference vector to form the feature vector; Step 52, inputting the feature vector into the trained BP neural network, the BP neural network is trained based on historical disturbance experimental data and corresponding attitude correction amount, outputting an attitude angle disturbance correction amount and a spray distance disturbance correction amount, and the training target is to minimize the actual spraying error; through the training process, the BP neural network can learn the nonlinear mapping relationship between the attitude disturbance and the spraying effect; the attitude angle disturbance correction amount includes a roll angle direction correction amount and a pitch angle direction correction amount; It should be noted that the BP neural network is a typical multi-layer feedforward network structure, including an input layer, a hidden layer and an output layer. The input layer receives the feature vector, the output layer gives the attitude angle disturbance correction amount and the spray distance disturbance correction amount, and the hidden layer uses a nonlinear activation function to enhance the fitting ability of the network. The BP neural network is supervised trained through historical disturbance experimental data, and the weights and thresholds are iteratively updated by using the error back propagation algorithm, so as to realize the nonlinear mapping relationship between the input features and the output correction amount.
[0028] Step 53, superimposing the attitude angle disturbance correction amount and the optimized attitude angle to obtain an attitude feedforward amount, and superimposing the spray distance disturbance correction amount and the optimized spray distance to obtain a spray distance feedforward amount.
[0029] Through the above process, the present application uses the BP neural network to compensate the posture and the spray distance before the disturbance feedforward; the introduction of the difference vector enables the fusion of the nozzle geometric posture and the jet observation information; the normalized spray distance and the incident angle as the input improve the generalization ability of the network under different scale conditions; the final output of the feedforward quantity and the optimization result superposition can effectively compensate the environmental disturbance and the system uncertainty, improve the response speed and the steady state accuracy of the closed loop control, so as to ensure the stability and consistency of the spraying process.
[0030] In an embodiment of the present application, the process of generating the expected posture angle and the expected spray distance includes: Step 61, calculate the included angle between the nozzle mechanical shaft direction vector and the fused plume direction vector as the axial deviation, and convert the axial deviation into the equivalent error of the posture angle containing the roll angle error and the pitch angle error through the linear mapping of the directional cosine Jacobian matrix and the difference value of the two vectors; wherein the axial deviation is obtained by calculating the dot product of the nozzle mechanical shaft direction vector and the fused plume direction vector and taking the inverse cosine; Step 62, add the optimized posture angle and the posture feedforward quantity component by component to obtain the posture reference quantity; add the optimized spray distance and the spray distance feedforward quantity component by component to obtain the spray distance reference quantity; Step 63, the difference between the posture reference quantity and the current measured posture angle, the difference between the spray distance reference quantity and the current measured spray distance, and the equivalent error together constitute the closed loop control error, and the expected roll angle, the expected pitch angle and the expected spray distance are calculated through the linear combination of the proportional term, the integral term and the differential term, wherein the proportional term is the product of the closed loop control error and the proportional coefficient, the integral term is the product of the integral of the closed loop control error with time and the integral coefficient, and the differential term is the product of the rate of change of the closed loop control error with time and the differential coefficient; the proportional term is used for fast response, the integral term is used for eliminating the steady state deviation, and the differential term is used for suppressing high frequency disturbance.
[0031] Step 64, project the expected roll angle, the expected pitch angle and the expected spray distance into the feasible region boundary of the posture angle and the spray distance, and constrain to the boundary value by using the boundary cutting method to obtain the final expected posture angle and the expected spray distance.
[0032] Through the above steps, the present application realizes the dynamic generation of the expected posture angle and the expected spray distance. The present application introduces the equivalent error caused by the inconsistency between the nozzle direction and the jet direction as a compensation factor, so that the closed loop control considers the optimization result, the actual execution state and the geometric alignment requirement at the same time. Through the PID adjustment and the boundary projection, the convergence, stability and safety of the posture and spray distance control are further ensured, so as to effectively improve the accuracy and robustness of the spraying process.
[0033] In one embodiment of the present invention, outer loop feedback control is performed based on the quality index, and the preset amplitude disturbance, incident angle and spray distance are adjusted, including: Step 71, calculating the sliding mean of the quality index within a preset time window, and comparing it with the preset upper and lower quality limits, respectively. If the values are outside the range, it is determined that the spraying state is abnormal; Step 72: When the quality index is higher than the preset upper quality limit and continues for more than a preset number of cycles, the amplitude of the preset amplitude disturbance is gradually increased according to a preset proportional coefficient. When the quality index is lower than the preset lower quality limit and continues for more than a preset number of cycles, the amplitude of the preset amplitude disturbance is gradually reduced. This step ensures that the disturbance injection can provide sufficient sensitivity without causing excessive fluctuations in the spraying process. Step 73 updates the incident angle and spray distance based on the workpiece surface normal and curvature radius, and projects the updated incident angle and spray distance into a preset operating range using amplitude and speed limits. The workpiece surface normal reflects the local orientation of the workpiece surface, and the curvature radius reflects the curvature of the workpiece surface. By adjusting the target jet incident angle based on the workpiece surface normal, the nozzle attitude always maintains a reasonable angle with the workpiece curved surface. By adjusting the target spray distance based on the workpiece surface curvature radius, the distance between the nozzle and the workpiece surface meets the coverage and deposition thickness requirements. To ensure the physical feasibility and control stability of the target incident angle and spray distance values, the updated incident angle and spray distance are further projected into a preset operating range. The preset operating range is determined by the system's mechanical constraints and process requirements, and is projected using amplitude and speed limits. Amplitude limits ensure that the incident angle and spray distance do not exceed the set upper and lower limits, and speed limits ensure that the target change amplitude within adjacent control cycles does not exceed the allowable rate, thereby preventing overshoot or jitter in the actuator.
[0034] Through the 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.
[0035] It should be noted that the intervals and thresholds are set for ease of comparison. The threshold size depends on the amount of sample data and the cardinality 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 numerical calculations. These formulas are derived from software simulations of the most recent real-world conditions using large amounts of data. The preset parameters in these formulas are set by those skilled in the art based on actual conditions.
[0036] The above describes the embodiments of the present application, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are only illustrative but not restrictive, and the person of ordinary skill in the art can make many forms under the inspiration of the present embodiments, which all belong to the protection of the present embodiments.
Claims
1. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network, characterized in that: The following steps are involved: Step 1: Collect and calibrate device parameters to determine workpiece surface points and workpiece surface normals; Step 2: Collect the nozzle mechanical posture 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 plume main axis direction vector to obtain the fused plume direction vector; determine the spray distance and incident angle, and calculate the quality index; The nozzle mechanical attitude is expressed by attitude angle; Step 3: Based on the preset amplitude disturbance, online optimization is performed, a preset amplitude disturbance is applied to the attitude angle according to the quality index, and a sensitivity estimation result is output; the attitude angle is adjusted to obtain the optimized attitude angle and optimized spray distance; Step 4: Use BP neural network to perform disturbance feedforward compensation, construct a feature vector containing the difference between the fusion plume direction vector and the nozzle mechanical axis direction vector, the optimized spray distance and the incident angle, and input it into the BP neural network. Output the attitude angle disturbance correction value and the spray distance disturbance correction value to form the attitude feedforward value and the spray distance feedforward value; 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, proportional, integral, and differential adjustments are combined, and the desired attitude angle and desired spray distance are generated according to the optimized attitude angle, attitude feedforward, and spray distance feedforward. Step 6: Perform outer loop feedback control based on the quality index and adjust the preset amplitude disturbance, incident angle and spray distance.
2. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network according to claim 1, characterized in that: Determine workpiece surface points and workpiece surface normals, including: Step 11, placing a planar target plate having 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: Capture the image of the target plate through the camera, and perform spatial back-projection on the feature points in the target plate image using the internal and external parameters of the camera to obtain a planar point set in the workpiece coordinate system; Step 13: Perform least squares plane fitting on the plane point set to obtain workpiece surface points and workpiece surface normals.
3. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network according to claim 1, characterized in that: The jet observation data includes: plume main axis direction vector and jet width footprint intensity field; The quality index is the sum of spray width footprint uniformity, incident angle deviation and spray distance deviation.
4. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network according to claim 1, characterized in that: The process of determining the fusion plume direction vector includes: Step 21: Acquire the nozzle's mechanical posture and express it using posture angles, which include roll angle and pitch angle; calculate the nozzle's mechanical axis direction vector based on the posture angles and a preset coordinate transformation matrix as the nozzle's geometric orientation; Step 22: Collect jet observation data to obtain the plume main axis direction vector, 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 image effective signal intensity mean to the noise variance. The gating weight is obtained by dividing the signal-to-noise ratio by a preset constant and normalizing it. Step 23: linearly weight the nozzle mechanical axis direction vector and the plume main axis direction vector using the gated weight, and normalize the weighted result by dividing it by its modulus to obtain a fused plume direction vector of unit length.
5. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network according to claim 3, characterized in that: The calculation process of quality indicators includes: Step 31: Obtain the plume main axis direction vector based on the jet observation data, and take the arc cosine of the dot product of the plume main axis direction vector and the workpiece surface normal vector as the angle of incidence; and take the inner product of the vectors of the workpiece surface point and the nozzle exit point in the direction of the workpiece surface normal as the spray distance; Step 32: obtaining multiple intensity values based on the spray pattern intensity field sampling, calculating an average value, and calculating the ratio of the difference between each intensity value and the average value and the average value as a normalized deviation; squaring all normalized deviations and taking the average value to obtain the spray pattern uniformity; Step 33, calculate the ratio of the difference between the incident angle and the preset incident angle target value to the preset incident angle working range span 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 preset spray distance working range span to obtain the normalized result of the spray distance deviation; add the normalized result of the spray width footprint uniformity, the incident angle deviation and the normalized result of the spray distance deviation to obtain the quality index.
6. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network according to claim 1, characterized in that: The 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 indicator as input, synchronously demodulate the quality indicator and the sinusoidal disturbance signal within a preset time window to obtain a sensitivity estimation result; the synchronous demodulation is obtained by calculating the integral correlation between the quality indicator 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 region boundary to obtain the optimized attitude angle, and the spray distance is recalculated in combination with the workpiece surface point and the workpiece surface normal to obtain the optimized spray distance.
7. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network according to claim 1, characterized in that: The step 4 specifically includes: Step 51: construct a feature vector including a difference vector between the fused plume direction and the nozzle mechanical axis direction, an optimized spray distance, and an incident angle, wherein the difference vector is a vector obtained by subtracting the fused plume direction vector and the nozzle mechanical axis direction vector component by component after normalization, and the optimized spray distance and incident angle are normalized and concatenated with the difference vector to form a feature vector; Step 52: Input the feature vector into a trained BP neural network. The BP neural network is trained based on historical disturbance experimental data and corresponding attitude corrections, and outputs attitude angle disturbance corrections and jet distance disturbance corrections. The attitude angle disturbance corrections include roll angle corrections and pitch angle corrections. Step 53: superimpose the attitude angle disturbance correction amount with the optimized attitude angle to obtain an attitude feedforward amount, and superimpose the spray distance disturbance correction amount with the optimized spray distance to obtain a spray distance feedforward amount.
8. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network according to claim 1, characterized in that: The process of generating the desired attitude angle and the desired spray distance includes: Step 61: Calculate the angle between the nozzle mechanical axis direction vector and the fusion plume direction vector as the axial deviation, and convert the axial deviation into an attitude angle equivalent error including a roll angle error and a pitch angle error by linear mapping the direction cosine Jacobian matrix and the difference between the two vectors. Step 62, adding the optimized attitude angle and the attitude feedforward amount component by component to obtain an attitude reference amount; adding the optimized spray distance and the spray distance feedforward amount component by component to obtain a spray distance reference amount; Step 63: The difference between the attitude reference and the currently measured attitude angle, the difference between the spray distance reference and the currently measured spray distance, and the equivalent error together constitute a closed-loop control error, and the desired roll angle, desired pitch angle, and desired spray distance are calculated by linear combinations of proportional, integral, and differential 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 integral over time and the integral coefficient, and the differential term is the product of the rate of change of the closed-loop control error over time and the differential coefficient. Step 64 , projecting the desired roll angle, desired pitch angle, and desired spray distance into the feasible region boundary of the attitude angle and the spray distance, and constraining them to the boundary value by truncating them beyond the boundary, to obtain the final desired attitude angle and desired spray distance.
9. A method for dynamic correction of nozzle posture of a powder spraying machine based on BP neural network according to claim 1, characterized in that: Outer loop feedback control is performed based on quality indicators, and preset amplitude disturbances, incident angles, and spray distances are adjusted, including: Step 71, calculating a sliding mean of the quality index within a preset time window, and comparing it with a preset upper quality limit and a preset lower quality limit respectively; Step 72: When the quality indicator is higher than the preset upper quality limit and continues for more than a preset number of cycles, the amplitude of the preset amplitude disturbance is gradually increased according to a preset proportional coefficient; when the quality indicator is lower than the preset lower quality limit and continues for more than a preset number of cycles, the amplitude of the preset amplitude disturbance is gradually reduced; Step 73 : updating the incident angle and the spray distance according to the surface normal and the curvature radius of the workpiece, and projecting the updated incident angle and the 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
Image forming apparatus and image processing method
US20060214968A1