Path Planning for Spray Painting Robot of Workpiece Surfaces

A new optimization algorithm of the path planning for spray painting robot of workpiece surfaces is proposed. This paper first provides the paint deposition rate function on a plane according to the experiment data. And the model of film thickness on surface is discussed. A multiobjective constraint optimization problem is formulated. An optimal tool path with an optimal time and film quantity deviation is generated. And the min-max method is adopted here to calculate the values. A workpiece, which is a free-form surface, is used to test the scheme. The results of experiments have shown that the path optimization algorithm achieves satisfactory performance. This algorithm can also be extended to other applications.


Introduction
Painting robot is a kind of important and advanced spray equipment.It is widely used in automotive manufacturing.The figure of a product and the tool parameters can strongly influence the quality of painting.In order to achieve the new spraying operation standards, new painting models and tool planning algorithms are active research for many years.Automated tool path generation is the key technology of robotic offline programming method.At present, generating paint gun trajectories for plane and regular surfaces have achieved satisfactory results [1,2].However, it is very difficult to get the optimal tool trajectory with an optimal time and film quantity deviation for a free-form surface in practice.Due to the complex geometry of free-form surfaces, it is still a challenge to generate optimization trajectories of spray gun that satisfies paint uniformity requirements.Currently, automated tool planning has always caused a bottleneck for spray painting.Hence, it is essential to develop new automated tool path planning to replace past tool path planning.This challenging research topic has been receiving more and more attention from academia and industry [3][4][5].Some researchers developed modeling methods to model the material deposition for the spraying processes, such as parabolic, Gaussian, Cauchy, and Beta models.Since the spray painting process is much more complicated than the spray forming process, these models may not generate satisfactory paint paths to satisfy the paint distribution requirements [6][7][8][9].Chen et al. [10][11][12][13] developed an automatic tool path planning for a free-form surface.However, due to that the process is complex and very timeconsuming, their algorithms could not resolve robot trajectory optimization problem.The paint thickness function for free-form surfaces is not considered, and the optimal time is not satisfying.
In this paper, the paint thickness function for free-form surfaces is given.A multiobjective constraint optimization problem is formulated.An optimal tool trajectory with an optimal time and film quantity deviation is generated.And the min-max method is adopted here to calculate the values.The spray painting experiment demonstrates the feasibility and availability of the optimization algorithm.

The Path Planning on a Plane
In this paper, a model of paint deposition rate is established according to the experimental data.And assuming that the shape of spray painting from the gun is a cone, and the distribution model of spray is shown in [14].
The tool path can be defined as a series of points.There is a feasible method for determining the tool path.Firstly, the nonoptimal path and orientation of the tool should be designed.Then, the problem is transformed into how to find the optimal time sequence along this path when the objectives can be optimal.Therefore, the variable parameters which are six (the position and orientation of the paint gun) in path optimization problem are reduced to one.The key factor of this method is  which is the overlap distance of the two spray painting optimization paths.
Figure 1 shows the paint accumulation on a plane. is the distance of a point  in the spray cone radius to the first path. is the projection of the point . is the projection of gun center.The material thickness of the point  can be calculated as where  1 () and  2 () are the material thickness of the point  when the tool sprays on two adjacent paths. 1 () and  2 () can be calculated as where  1 and  2 are the half time of the tool spraying on two adjacent paths. 1 and  2 are the distance of a point  to the projection of gun center. is the time for the gun moving from the point  to .By (2), it can be calculated as   (, , V) = (1/V)(, ), where  is a function of  and .To find optimal velocity V and overlap distance , the mean square error of the thickness deviation from the average thickness   must be minimized: min A golden section method [15] is adopted here to calculate their values.

The Path Planning on a Surface
There are many methods to model a surface in CAD, such as Bezier method and B-splines method.But these methods are too complicated to model a free-form surface [16].In order to obtain uniform material thickness on a free-form surface, it can use "bounding box" method to design nonoptimal path as follows.
(1) A triangular approximation of a free-form surface is adopted in CAD modeling.
(2) The initial normal vector of each triangle is found.A seed triangle is chosen as the first triangle of a patch.Before adding a new neighbor triangle, a maximum deviation angle is calculated.After all triangles are found, they are taken as seeds, and new triangles are added into the patch.The process is repeated until no more neighbor triangles can be added into the patch.
(3) The overlap distance of the two spray painting optimization paths is calculated.And the non-optimal tool paths are planned.
Paths planning must consider the free-form surface geometric features.For example, the tool paths should parallel to the boundary of the patch.Sheng et al. [5] presented the rules of non-optimal tool paths planning.
Figure 2 shows paint accumulation on a surface. 1 is a reference plane, and  2 is a parallel plane which pass the point ;   is the angle of gun axis and the line of the point s to gun center; ℎ  is the actual tool height; ℎ is the desired tool height.Suppose the material sprayed on a small area  1 is projected to the area  2 .The relationship between the two areas is where   1 and   2 are the areas of  1 and  2 .Based on the assumption, the material thickness on  2 can be expressed as follows: where   and  2 are the material thickness on  1 and  2 , respectively.Figure 3(a) shows a circle  3 , which is perpendicular to the material emission direction.The material on  3 is projected  to the free-from surface with deviation angle   , as shown in Figure 4(b).The material thickness on  3 and  4 can be expressed as: Based on ( 5), ( 6), the material thickness on the free-form surface can be obtained as If the distance from the tool to the point  is   , ℎ  =   cos   .When the deviation angle   ≥ 90 ∘ , there is no material sprayed on a surface.Therefore, the material thickness on a free-form surface can be modeled as Since there are many parameters that need optimizing, such as time, material thickness uniformity, and material waste.
The process optimization of surface manufacturing is a multiobject optimization problem.The proposed technique for solving the optimal process planning problem is based on approximating the optimization parameters as a piecewise constant functions.Therefore, the path is divided into  segments.For each segment, we continue to divide the segment into  smaller segments and assume the parameters in the smaller segment do not change too much.  is the length of each segment;   is the spraying time on the kth segment.In the derivative of ( 8), with   = ℎ tan   .Suppose for each smaller segment, the spray angle   and deviation angel   do not change too much.Then, for the jth triangle on a free-form surface, its material thickness due to the kth segment can be written as where    is the spraying time on each segment.Thus, material thickness for the th triangle is This equation can be written as The total time to spray the free-form surface is For a given free-form surface, find the minimum time to spray the surface such that the given constraints are satisfied and material deviation from the required material thickness is minimized.Suppose the required average material thickness is   , and the max material thickness deviation is   .Then, the tool path optimization problems can be formulated as min  = ( where This is a constraint multi-objective optimization problem.There are different ways to perform multi-objective optimization problems, such as weighted-sum approach, nonlinear approach, and min-max approach.In order to reduce the calculation procedure, we use min-max approach to solve the problem as follows.
Step 2. Non-linear programming problem is solved.Variable parameter V is introduced, V > 0; V is ( = 1, 2) a common where  is the feasible region for .Then, the optimal solution ( * , V * ) can be obtained.

Experimental Verification
Suppose the required average material thickness is   = 50 m, and the max material thickness deviation is   = 10 m.The spray radius  = 60 mm.The material deposition rate is () = (1/15)( 2 −  2 ) m/s.
After optimizing the spray process on a plane, the tool velocity and the overlap distance are calculated as V = 256.6 mm/s,  = 50.2mm.
The material thickness of random chosen points on the workpiece are measured by coating thickness gauge.Figure 6(a) shows the result for non-optimal tool path planning.Figure 6(b) shows the result for optimal tool path planning.The results for non-optimal and optimal tool path planning are summarized in Table 1.

Conclusion
A general framework for optimal tool path planning on surfaces has been developed.A multiobjective constraint optimization problem has been formulated.Experiments are performed to measure the material thickness on a freeform surface for both optimal and non-optimal tool path.Experimental results show that the optimal tool path takes less process time compared with the non-optimal tool path.And the results demonstrate the advantages of the optimal path planning algorithm.This algorithm can also be extended to other applications such as optimal tool path for free-form surface of cleaning robot or grinding robot.

Figure 1 :
Figure 1: Paint accumulation on a plane.

Figure 2 :
Figure 2: Paint accumulation on a free-form surface.

Figure 4 :
Figure 4: (a) The workpiece.(b) The triangular approximation of the workpiece.

Figure 5 :Figure 6 :
Figure 5: (a) The part of generated gun path of the workpiece.(b) Robotic spray painting experiment.

Table 1 :
The results of non-optimal and optimal tool path planning.