Method for optimizing irregular plane variable-inclination-angle spraying track based on boundary constraint
Technical Field
The invention relates to the technical field of robots, in particular to an optimization method of irregular plane variable-inclination-angle spraying tracks based on boundary constraint.
Background
The off-line programming track planning mode of the spraying robot has the advantages of not occupying the working time of the robot, being capable of planning complex tracks, freeing workers from toxic environments and the like, and is increasingly applied to the fields such as automobiles, ships, aerospace and the like. The spraying track optimization result directly influences the spraying quality, the spraying efficiency and the paint utilization rate after spraying, and has important significance for coating production. For the spraying of plane workpieces with irregular boundary shapes, for the sake of simplicity, the conventional spraying path planning method without considering the workpiece boundary constraint has the defects of long path and easy overspray at the boundary, so that unnecessary waste of coating and longer spraying time are caused, and the improvement of the coating utilization rate and the spraying efficiency is not facilitated. Considering the spraying path generated by the boundary constraint of the workpiece, although the path length is shortened to some extent and the overspray is reduced, because the generated spraying path is a free curve type, the uniformity of the coating generated by the traditional spray gun in a vertical posture along the path by dynamic spraying is not as good as the condition without the boundary constraint, the uniformity of the coating, the spraying efficiency and the utilization rate of the coating are difficult to be considered, and the new standard requirement of the current spraying operation can not be met.
Application number 201810316359.8 discloses a curved surface spraying track generation method and system based on curved surface parameterization, wherein the method comprises the following steps: s1, acquiring curved surface information to be sprayed, and acquiring a coating accumulation model and a plurality of gradient flow lines of the spray gun according to the curved surface information; s2, obtaining spray gun optimization parameters by combining the coating accumulation model and a preset optimization target; s3, acquiring the track information of the spray gun and the height information of the spray gun on each gradient flow line by combining the gradient flow lines and the spray gun optimization parameters; and S4, acquiring the track pose parameters of the spray gun by combining the curved surface information, the spray gun track information and the spray gun height information, thereby generating a curved surface spraying track. The method can be suitable for free curved surfaces with irregular shapes and relatively complex shapes, has uniform spraying and optimized paths, improves the efficiency and quality of curved surface spraying, and can be widely applied to the technical field of robots. However, the method does not consider the influence of the geodesic curvature of the generated spraying path on the uniformity of film thickness distribution, and when the generated spraying path is a curve, the geodesic curvature of the spraying path can cause the asymmetric distribution of the film thickness at the two sides of the path, thereby seriously influencing the uniformity of the film after spraying.
Disclosure of Invention
Aiming at the defects of the prior art in the spraying of the plane workpiece with irregular boundary, the method is based on the planned boundary constraint spraying path, and provides an optimization method of the irregular plane variable-inclination angle spraying track based on the boundary constraint. On the basis of a relatively short spraying path generated based on boundary constraint, a spraying inclination angle is used as a controllable parameter of a spray gun, a coating thickness model of the spray gun in dynamic spraying of a single arc spraying path is established based on an arc approximation thought in consideration of the fact that the spraying path may be in a free curve form, and an optimization method of coating thickness distribution on two sides of the arc path is further provided; by taking the coating uniformity on the surface of the whole workpiece as an optimization target, a coating thickness superposition model between two adjacent spraying paths on each intersection line of the spraying paths is established and generated, a global optimization algorithm of variable-inclination spraying track parameters of a spray gun on the surface of the whole workpiece is given, and the coating uniformity, the spraying efficiency and the coating utilization rate are improved at the same time.
In order to solve the problems of the prior art, the invention adopts the technical scheme that:
an optimization method of irregular plane variable-inclination spraying track based on boundary constraint comprises the following steps:
step1, based on the existing static vertical spraying coating growth rate model, establishing a static variable-inclination spraying coating growth rate model by using a differential geometry principle and taking a spraying inclination angle as a controllable parameter of a spray gun;
step2, according to the arc approximation idea, the free curve type spraying path generated based on the boundary constraint is equivalent to be composed of a plurality of arc sections, wherein a straight line can be regarded as an arc with infinite curvature radius;
step3, based on the established static variable-inclination-angle spraying coating growth rate model, establishing a coating thickness model for dynamic spraying of a spray gun on a single arc path, and further establishing an optimization model of coating thickness distribution on two sides of the single path to obtain a functional relation among the spraying speed, the spraying inclination angle and the spraying height;
and 4, considering the track parameter optimization of the overall spraying path on the irregular plane workpiece, establishing a coating thickness superposition model between two adjacent spraying paths on each section intersection line of the generated spraying path based on the established coating thickness model of the dynamic spraying of the spray gun on the single arc path, and establishing an optimization model by taking the coating uniformity between the two adjacent spraying paths as an optimization target so as to achieve the aim of optimizing the spraying effect.
The improvement is that the method for establishing the growth rate model of the static variable-inclination spraying coating in the step1 is as follows:
101. let the static vertical spray coating growth rate model of a spray gun be a parabolic model, which can be expressed as
(unit: mum/s, A is constant), the space shape of the spray torch is a cone, and the flare angle of the cone is phi;
102. based on the static vertical spraying coating growth rate model, considering the spraying inclination angle α and the spraying height H of the spray gun as controllable parameters, adopting a differential geometric theory to establish the static spraying coating growth rate model of the spray gun at any point (x, y) in the spraying amplitude range:
if the spray gun is used for spraying at an inclined angle, the formed spray width range is an ellipse, and the expressions of the major axis and the minor axis a and b of the ellipse are respectively as follows:
wherein, in formula (2) and formula (3):
as an improvement, the step3 of establishing a coating thickness model for the dynamic spraying of the spray gun on the single arc path, and further establishing an optimization model for the coating thickness distribution on both sides of the single path to obtain a functional relationship between the spraying speed, the spraying inclination angle and the spraying height comprises the following steps:
301, setting the curvature radius of the arc path as ρ, the curvature center of the arc path as P, when the spray gun sprays along the dynamic inclination of the arc path track, the speed direction of the spray gun is the tangential direction of the arc path, the dynamic spraying speed of the spray gun on the arc path track is v, and the spraying speed of the spray gun on any point S in the swept spraying range is v
SThe radius of curvature of the arc in which the point S is located is rho
SEstablishing a rectangular coordinate system by taking the curvature radius direction of the circular arc path as an X axis and the speed direction of the spray gun as a Y axis, wherein
The arc length of a point S swept by the spray gun in the spray amplitude range is represented, and based on the formula (1), by integrating the time t, a coating thickness model of the spray gun dynamic spraying on a single arc path can be represented as follows:
the speed of any point swept by the spray gun along the direction of the curvature radius of the path in the spray amplitude range is different, and the speed is in direct proportion to the curvature radius of the circular arc track where the point is located, so that the spray velocity on any point S in the spray amplitude range is vSCan be expressed as:
the y-axis coordinate value of the point S is as follows:
arc length of point S swept by the lance
And the elapsed time t may be expressed as:
in formula (9):
ρs=ρ-x (11)
in equation (12):
in equation (13):
in equation (14):
d=|a1-a2|
substituting the formula (8) and the formula (10) into the formula (6) to establish a coating thickness model expression of the dynamic spraying of the spray gun on the single arc path;
302, dynamically spraying the coating along a curved path track by a spray gun in a posture vertical to the surface of a workpiece, wherein for a single spraying path, the reason that the coating uniformity effect of the surface of the whole workpiece is poor is that the peak value of the coating is not on the spraying path, the peak value of the coating is deviated to one side of the path which is concave inwards, the uneven thickness of the two sides is more obvious along with the increase of the curvature of an arc, and the uniformity effect of the sprayed coating is poorer; the coating thickness peak value appears on the concave side of the arc path, so the direction of the spraying dip angle is deviated to the convex side of the path, the size of the spraying dip angle needs to be calculated and determined on the spraying path according to the set coating thickness peak value, and the target value of the coating thickness can be determined according to the dynamic spraying coating thickness model solving spraying speed;
setting the target value of the coating thickness as TdWhen the coating thickness peak value appears on the spraying path, namely at the original point of the X axis, firstly, the formula (6) is derived to obtain the coordinate value X of the X axis where the coating thickness peak value is located0Let x again0And this is taken into equation (6), specifically expressed as follows:
from the above equation, v and α are functions of H, and if the spray height H is known, the optimized spray velocity v and spray inclination angle α can be obtained by solving the above equation system.
As an improvement, in step4, the establishing generates a coating thickness superposition model between two adjacent spraying paths on each cross-sectional line of the spraying paths, and establishes an optimization model with the coating uniformity between the two adjacent spraying paths as an optimization target, including the following steps:
step 401, according to the requirements of the target coating thickness and the peak position of the coating thickness, by optimizing the dynamic dip angle spraying tracks of the free curve path, a rate function and a dip angle function on each spraying track relative to the spraying height H can be obtained, so that the peak value of the coating thickness on each spraying track reaches a target value, but the overall optimization of the coating uniformity among the spraying tracks on the whole workpiece surface is not yet performed, because the generated spraying path based on the boundary constraint is generated by adopting a series of bisection line bisection methods, the distance between two adjacent paths on each bisection line is determined and equal, and because the spraying height and the path distance have a direct relation, the spraying height at the position of the spraying path where each intersecting line is located can be solved through optimization, so that the coating thickness superposition among the adjacent paths reaches uniformity;
and (3) setting n cross-sectional lines for generating the spraying paths, wherein m coating thickness superposition intervals exist in the spraying paths, and according to the coating thickness superposition principle between adjacent paths, the coating thickness model of any point S in the jth superposition interval on the ith cross-sectional line can be represented as follows:
step 402, after a coating thickness superposition model between two adjacent spraying paths on each intersection line of the generated spraying paths is established, an optimization function is established according to the minimum variance between the coating thickness and the target coating thickness value at any point on each intersection line and in each superposition interval, and the optimization function is expressed as follows:
in the above formula HminAnd HmaxRespectively representing the minimum value and the maximum value of the allowable spraying height, wherein n multiplied by m variables are needed to be solved, and a mode search method can be adopted to solve the optimization problem with constrained multivariable.
The specific steps for solving the pattern search method are as follows:
step1 gives the initial point x(1)=(1,1,…,1)TN coordinate directions e1,e2,…,enThe initial step λ is 1, the acceleration factor ζ is 1, the reduction rate τ is 0.25, the allowable error ∈ is 0.1, and y is set(1)=x(1),k=1,j=1;
Step2 if E (y)(j)+λej)<E(y(j)) Then let y(j+1)=y(j)+λejPerforming step 4; otherwise, step3 is carried out;
step3 if E (y)(j)-λej)<E(y(j)) Then let y(j+1)=y(j)-λejPerforming step 4; otherwise, let y(j+1)=y(j)Performing step 4;
step4, if j is less than n, setting j to j +1, and turning to Step 2; otherwise, step5 is carried out;
step5 if E (y)(n+1))<E(x(k)) Step6 is performed; otherwise, step7 is carried out;
step6 place x(k+1)=y(n+1)Let y(1)=x(k+1)+ξ(x(k+1)-x(k)) Setting k to k +1 and j to 1, and switching to step 2;
step7, if lambda is less than or equal to epsilon, stopping iteration to obtain a point x(k)(ii) a Otherwise, let λ ═ τ λ, y(1)=x(k),x(k+1)=x(k)K +1 and j 1, step 2.
Has the advantages that:
compared with the prior art, the method for optimizing the irregular plane variable-inclination spraying track based on the boundary constraint has the following advantages: for a plane workpiece with an irregular boundary, a spraying path generated based on boundary constraint has the advantages of less coating waste and shorter spraying time, but the uniformity effect of the sprayed coating is poor, and the uniformity effect of the coating dynamically sprayed by a spray gun along a free curve path can be effectively improved by adopting a spraying track optimization method with a variable inclination angle, so that the coating waste and the spraying time are reduced, and meanwhile, the better spraying effect can be ensured.
Drawings
FIG. 1 is a space model of a torch of the spray gun;
FIG. 2 is a schematic view of a spray gun for dynamic spray coating along a circular arc path trajectory;
fig. 3 shows the overall optimization principle of the spray trajectory.
Detailed Description
The invention is further described with reference to specific examples.
An optimization method of irregular plane variable-inclination spraying track based on boundary constraint,
the method comprises the following specific steps:
step1, based on the existing static vertical spraying coating growth rate model, establishing a static variable-inclination spraying coating growth rate model by using a differential geometry principle and taking a spraying inclination angle as a controllable parameter of a spray gun;
step2, according to the arc approximation idea, the free curve type spraying path generated based on the boundary constraint is equivalent to be composed of a plurality of arc sections, wherein a straight line can be regarded as an arc with infinite curvature radius;
step3, based on the established static variable-inclination-angle spraying coating growth rate model, establishing a coating thickness model for dynamic spraying of a spray gun on a single arc path, and further establishing an optimization model of coating thickness distribution on two sides of the single path to obtain a functional relation among the spraying speed, the spraying inclination angle and the spraying height;
and 4, considering the track parameter optimization of the overall spraying path on the irregular plane workpiece, establishing a coating thickness superposition model between two adjacent spraying paths on each section intersection line of the generated spraying path based on the established coating thickness model of the dynamic spraying of the spray gun on the single arc path, and establishing an optimization model by taking the coating uniformity between the two adjacent spraying paths as an optimization target so as to achieve the aim of optimizing the spraying effect.
In step1, the method for establishing the growth rate model of the static variable-inclination spray coating specifically comprises the following steps:
101. let a static vertical spray coating growth rate model of a spray gun be a parabolic model, which can be expressed as:
(unit: μm/s, A is constant), the space shape of the spray torch is a cone, and the flare angle of the cone is phi, as shown in figure 1;
102. based on the static vertical spraying coating growth rate model, considering the spraying inclination angle α and the spraying height H of the spray gun as controllable parameters, adopting a differential geometric theory to establish the static spraying coating growth rate model of the spray gun at any point (x, y) in the spraying amplitude range:
if the spray gun is used for spraying at an inclined angle, the formed spray width range is an ellipse, and the expressions of the major axis and the minor axis a and b of the ellipse are respectively as follows:
wherein, in formula (2) and formula (3):
step3, establishing a coating thickness model for the dynamic spraying of the spray gun on the single arc path, and further establishing an optimization model for the coating thickness distribution on two sides of the single arc path to obtain a functional relation among the spraying speed, the spraying inclination angle and the spraying height, and the method comprises the following steps:
301. as shown in fig. 2, let ρ be the radius of curvature of the circular arc path, P be the center of curvature of the circular arc path, when the spray gun performs dynamic dip coating along the circular arc path trajectory, the velocity direction of the spray gun is the tangential direction of the circular arc path, v is the dynamic coating velocity of the spray gun on the circular arc path trajectory, v is the coating velocity of the spray gun at any point S in the swept spray width range
SThe radius of curvature of the arc in which the point S is located is rho
SThe arc path curvature radius direction is taken as an X axis, and the spray gunA rectangular coordinate system is established for the Y axis in the speed direction, wherein
The arc length of a point S swept by the spray gun within the spray amplitude range is represented, and based on formula (1), a coating thickness model of the spray gun dynamic spraying on a single arc path by integrating the time t can be represented as follows:
as can be seen from FIG. 2, the speed at which any point in the spray width range is swept by the spray gun along the direction of the radius of curvature of the path is different, and the speed is in direct proportion to the radius of curvature of the circular arc track where the point is located, so that the spraying speed at any point S in the spray width range is vSCan be expressed as:
the y-axis coordinate value of the point S is as follows:
arc length of point S swept by the lance
And the elapsed time t may be expressed as:
in formula (9):
ρs=ρ-x (11)
in equation (12):
in equation (13):
in equation (14):
d=|a1-a2|
substituting the formula (8) and the formula (10) into the formula (6) to establish a coating thickness model expression of the dynamic spraying of the spray gun on the single arc path;
302. the spray gun dynamically sprays along a curved path track in a posture vertical to the surface of a workpiece, for a single spraying path, the fact that the coating uniformity effect of the surface of the whole workpiece is poor is that the coating thickness peak value is not on the spraying path, the coating thickness peak value is deviated to one side with the concave path, the uneven thickness of the two sides is more remarkable along with the increase of the curvature of the arc, and the uniformity effect of the sprayed coating is poor. Therefore, the characteristic that the position of the peak value of the coating thickness can be changed by utilizing the spraying inclination angle is utilized, and the direction and the size of the spraying inclination angle are reasonably adjusted, so that the peak value of the coating thickness after the spray gun dynamically sprays along the track of the arc path appears on the spraying path, the uniform distribution of the coating thickness at the two sides of the path is realized, and the aim of improving the spraying effect is finally achieved. The coating thickness peak value appears on the concave side of the arc path, so the spraying dip angle direction is deviated to the convex side of the path, the spraying dip angle needs to be calculated and determined on the spraying path according to the set coating thickness peak value, and the coating thickness target value can be determined according to the dynamic spraying coating thickness model solving spraying speed.
Setting the target value of the coating thickness as TdWhen the coating thickness peak value appears on the spraying path, namely at the original point of the X axis, firstly, the formula (6) is derived to obtain the coordinate value X of the X axis where the coating thickness peak value is located0Let x again0And this is taken into equation (6), specifically expressed as follows:
from the above equation, v and α are functions of H, and if the spray height H is known, the optimized spray velocity v and spray inclination angle α can be obtained by solving the above equation system.
In step4, the building generates a coating thickness superposition model between two adjacent spraying paths on each section line of the spraying paths, and builds an optimization model by taking the coating uniformity between the two adjacent spraying paths as an optimization target, and the building method comprises the following steps:
401. according to the requirements of the target coating thickness and the position of the peak value of the coating thickness, by optimizing the dynamic dip angle spraying tracks of the free curve path, a speed function and a dip angle function related to the spraying height H on each spraying track can be obtained, so that the peak value of the coating thickness on each spraying track reaches a target value, but the coating uniformity among the spraying tracks on the whole workpiece surface is not globally optimized. Because the generated spraying paths based on the boundary constraint are generated by adopting a series of bisection line bisection methods, the distance between two adjacent paths on each bisection line is determined and equal, as shown in fig. 3, and because the spraying height and the path distance have a direct ratio relationship, the spraying height at the position of the spraying path where each bisection line is located can be solved through optimization, so that the coating thickness superposition between the adjacent paths is uniform.
And (3) setting n cross-sectional lines for generating the spraying paths, wherein m coating thickness superposition intervals exist in the spraying paths, and according to the coating thickness superposition principle between adjacent paths, the coating thickness model of any point S in the jth superposition interval on the ith cross-sectional line can be represented as follows:
402. after the coating thickness superposition model between adjacent paths is established, an optimization function is established by the minimum variance between the coating thickness and the target coating thickness value at any point on each intersection line and in each superposition interval, and the optimization function is expressed as follows:
in the above formula HminAnd HmaxRespectively representing the minimum value and the maximum value of the allowable spraying height, wherein n multiplied by m variables are needed to be solved, and for the optimization problem with constrained multivariable, a mode search method can be adopted for solving, and the algorithm steps are as follows:
step1 gives the initial point x(1)=(1,1,…,1)TN coordinate directions e1,e2,…,enThe initial step λ is 1, the acceleration factor ζ is 1, the reduction rate τ is 0.25, the allowable error ∈ is 0.1, and y is set(1)=x(1),k=1,j=1;
Step2 if E (y)(j)+λej)<E(y(j)) Then let y(j+1)=y(j)+λejPerforming step 4; otherwise, step3 is carried out;
step3 if E (y)(j)-λej)<E(y(j)) Then let y(j+1)=y(j)-λejPerforming step 4; otherwise, let y(j+1)=y(j)Performing step 4;
step4, if j is less than n, setting j to j +1, and turning to Step 2; otherwise, step5 is carried out;
step5 if E (y)(n+1))<E(x(k)) Step6 is performed; otherwise, step7 is carried out;
step6 place x(k+1)=y(n+1)Let y(1)=x(k+1)+ξ(x(k+1)-x(k)) Setting k to k +1 and j to 1, and switching to step 2;
step7, if lambda is less than or equal to epsilon, stopping iteration to obtain a point x(k)(ii) a Otherwise, let λ ═ τ λ, y(1)=x(k),x(k+1)=x(k)K +1 and j 1, step 2.
The embodiments of the present invention have been described in detail with reference to the drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention. Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.