# Path Planning for Spray Painting Robot of Workpiece Surfaces

Authors: Wei Chen; Dean Zhao
Journal: Mathematical Problems in Engineering
 (2013)

---

## Abstract

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.


---

## Body

## 1. 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–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–9]. Chen et al. [10–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.


## 2. 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 isd which is the overlap distance of the two spray painting optimization paths.Figure1 shows the paint accumulation on a plane. x is the distance of a point f in the spray cone radius to the first path. F is the projection of the point f.  O is the projection of gun center. The material thickness of the point f  can be calculated as
(1)qf(x)={q1(x),0≤x≤R-d,q1(x)+q2(x),R-d<x≤R,q2(x),R<x≤2R-d,
where  q1(x)and q2(x)are the material thickness of the point f when the tool sprays on two adjacent paths.  q1(x)and q2(x)can be calculated as
(2)q1(x)=2∫0t1f(r1)dt,0≤x≤R,q2(x)=2∫0t2f(r2)dt,R-d≤x≤2R-d,t1=R2-x2v;t2=R2-(2R-d-x)2v,r1=(vt)2+x2;r2=(vt)2+(2R-d-x)2,
where t1 andt2 are the half time of the tool spraying on two adjacent paths. r1 and r2 are the distance of a point f to the projection of gun center. t is the time for the gun moving from the point O to F. By (2), it can be calculated as qf(x,d,v)=(1/v)J(x,d), where J is a function of x and d. To find optimal velocity v and overlap distance d, the mean square error of the thickness deviation from the average thickness qd must be minimized:
(3)mind∈[0,R],vE(d,v)=∫02R-d(qd-qs(x,d,v))2dx.Figure 1
Paint accumulation on a plane.A golden section method [15] is adopted here to calculate their values.


## 3. 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.Figure2 shows paint accumulation on a surface. P1 is a reference plane, and P2 is a parallel plane which pass the point s; θi is the angle of gun axis and the line of the point s to gun center; hi is the actual tool height; h is the desired tool height. Suppose the material sprayed on a small area c1 is projected to the area c2. The relationship between the two areas is
(4)Sc2=(hih)2Sc1,
where Sc1 and Sc2 are the areas of c1 and c2. Based on the assumption, the material thickness on c2 can be expressed as follows:
(5)q2=qf(hhi)2,
where qfand q2  are the material thickness on c1 and c2, respectively.Figure 2
Paint accumulation on a free-form surface.Figure3(a) shows a circle c3, which is perpendicular to the material emission direction. The material on c3 is projected to the free-from surface with deviation angle γi, as shown in Figure 4(b). The material thickness on c3 and c4 can be expressed as:
(6)q3=q2cosθi,qs=q3cosγi.Material projection.
(a)
(b)(a) The workpiece. (b) The triangular approximation of the workpiece.
(a)
(b)Based on (5), (6), the material thickness on the free-form surface can be obtained as(7)qs=qf(hhi)2cosγicosθi.If the distance from the tool to the points is li,hi=licosθi. When the deviation angle γi≥90°, there is no material sprayed on a surface. Therefore, the material thickness on a free-form surface can be modeled as
(8)qs={qf(hli)2cosγicosθi,γi<90°,0,γi≥90°.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 intoP segments. For each segment, we continue to divide the segment into m smaller segments and assume the parameters in the smaller segment do not change too much. dk is the length of each segment; tk is the spraying time on the kth segment. In the derivative of (8),
(9)dqsdt=dqfdt(hli)2cosγicos3θi=f(ri)(hli)2cosγicos3θi,
with ri=htanθi. Suppose for each smaller segment, the spray angle θi and deviation angel γi 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
(10)qjk=∑i=1mf(htanθi)(hli)2cosγicos3θitk′,where  tk′ is the spraying time on each segment. Thus, material thickness for the ith triangle is
(11)qj=∑k=1p∑i=1mf(htanθi)(hli)2cosγicos3θitkm.
This equation can be written as
(12)qj=∑k=1pdkmvk∑i=1mf(htanθi)(hli)2cosγicos3θi.
The total time to spray the free-form surface is
(13)T=∑k=1ptk=∑k=1pdkvk.
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 qd, and the max material thickness deviation is qw. Then, the tool path optimization problems can be formulated as
(14)minL=(L1,L2),s.t.|qj-qd|≤qw,
where
(15)L1=∑k=1pdkvk,L2=∑j=1N(qj-qd)2,qj=∑k=1pdkmvk∑i=1mf(htanθi)(hli)2cosγicos3θi.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 1.
Weights are given.ωi>0 and ∑i=12ωi=1.Step 2.
Non-linear programming problem is solved. Variable parameterv is introduced, v>0;v  is  (i=1,2) a common upper bound of ωifi(x). The following auxiliary problem can be formulated as
(16)minv;s.t.ωifi(x)≤v(i=1,2),x∈D,where  D is the feasible region for x. Then, the optimal solution (x*,v*) can be obtained.


## 4. Experimental Verification

Suppose the required average material thickness isqd=50 μm, and the max material thickness deviation is qw=10 μm. The spray radius R=60 mm. The material deposition rate is f(r)=(1/15)(R2-r2) μm/s.After optimizing the spray process on a plane, the tool velocity and the overlap distance are calculated asv=256.6 mm/s, d=50.2 mm.The workpiece, shown in Figure4(a), is used to test the algorithm. The triangular approximation of the workpiece is shown in Figure 4(b). The parameters in the algorithm are as follows:  qw=10×10-6 mm; R=60 mm; h=100 mm; N=586; P=192;dk=50 mm; m=10; ω=(0.5,0.5)T. The non-optimal tool path is generated using “bounding box” method. The part of generated gun path is shown in Figure 5(a). And Figure 5(b) shows the robotic spray painting experiment.(a) The part of generated gun path of the workpiece. (b) Robotic spray painting experiment.
(a)
(b)The material thickness of random chosen points on the workpiece are measured by coating thickness gauge. Figure6(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.Table 1
The results of non-optimal and optimal tool path planning.
Optimal
Non-optimal
Average (μm)
49.3
48.8
Maximum (μm)
55.6
58.8
Minimum (μm)
45.8
41.5
Process time (S)
49.6
57.8Material thickness of random chosen points on the workpiece: (a) nonoptimal tool path planning; (b) optimal tool path planning.
(a)
(b)


## 5. 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 free-form 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.



---

*Source: 659457-2013-08-20.xml*