Mathematical Problems in Engineering

Volume 2017, Article ID 4259869, 10 pages

https://doi.org/10.1155/2017/4259869

## Trajectory Optimization of Spray Painting Robot for Complex Curved Surface Based on Exponential Mean Bézier Method

^{1}School of Electronics and Information, Jiangsu University of Science and Technology, Zhenjiang 212003, China^{2}School of Automation, Southeast University, Nanjing 210096, China^{3}School of Science, Jiangsu University, Zhenjiang 212013, China

Correspondence should be addressed to Yang Tang; nc.ude.sju@711008yt

Received 22 May 2017; Revised 24 August 2017; Accepted 11 September 2017; Published 20 November 2017

Academic Editor: Shoudong Huang

Copyright © 2017 Wei Chen et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Automated tool trajectory planning for spray painting robots is still a challenging problem, especially for a large complex curved surface. This paper presents a new method of trajectory optimization for spray painting robot based on exponential mean Bézier method. The definition and the three theorems of exponential mean Bézier curves are discussed. Then a spatial painting path generation method based on exponential mean Bézier curves is developed. A new simple algorithm for trajectory optimization on complex curved surfaces is introduced. A golden section method is adopted to calculate the values. The experimental results illustrate that the exponential mean Bézier curves enhanced flexibility of the path planning, and the trajectory optimization algorithm achieved satisfactory performance. This method can also be extended to other applications.

#### 1. Introduction

Spray painting robot is an important advanced paint production equipment, which is widely used in the paint production line of automotive. The complex shape of the workpiece in the actual industrial production is often encountered. The basic steps of the existing method in the trajectory optimization for spray painting on this kind of complex curved surface are as follows:

After obtaining the CAD (Computer Aided Design) data of the workpiece surface, triangulation is directly performed on the surface. And the surface is modeled by the corresponding method.

After patching the complex curved surface according to the surface topology, each patch is approximated as a plane. Then the spray painting trajectory is optimized on each patch.

The spray painting trajectory at the junction between patches is optimized. It needs to be optimized according to the geometric position relation of the painting path on every two patches: PA-PA (parallel-parallel), PA-PE (parallel-perpendicular), and PE-PE (perpendicular-perpendicular) [1–3].

Perform the tool trajectory optimal integration on each patch. Specifically, we can use ant colony algorithm or genetic algorithm.

In general, such trajectory optimization method for spray painting on a complex curved surface can basically meet the requirement of spray painting. However, this method has many steps to perform, and it needs to undergo three optimization operations such as the trajectory optimization on patch, optimization for spray painting trajectory at the junction of every two patches, and the tool trajectory optimal integration on each patch in actual process [4–6]. The operation will be more troublesome, and a lot of system time will be consumed. In addition, when the area of complex curved surface is larger or with more patches, the following two problems will occur:

It is necessary to combine the optimized trajectories at the junction between the patches after the optimization for the painting path. The error will be larger, which will make the uniformity of the paint thickness at the junction of the patches worse. What is more, a lot of system execution time will be consumed in this process [7].

When the number of patches is large, the population size (this is the concept of ant colony algorithm) will increase when performing the tool trajectory optimal integration on each patch. In this case, the convergence speed of genetic algorithm or ant colony algorithm is slow, and the algorithm is easy to fall into different local optimum fields, which leads to poor spray painting effect and lower spray painting efficiency [8–10].

Because of the existence of the problems above, the spray painting effect of the complex workpiece surface is still not very satisfactory in the current spray painting operations. Under this background, a new trajectory optimization method on curved surface based on Bézier surface is proposed in this paper. The specific idea for this method is after modeling the complex curved surface by using the Bézier triangular surface modeling technique, the discrete point array on the equidistant surface of the complex curved surface is found by the calculation method for discrete point array on equidistant surface of Bézier surface. Then the spatial painting path generation method based on the exponential mean Bézier curve is used to obtain the spatial painting path on the complex curved surface. According to the new trajectory optimization method on the complex curved surface, the spray painting trajectory is optimized along the specified spatial path, and the complete optimized trajectory for spray painting on the complex curved surface is obtained. The advantage of this method is that it does not need to split the complex curved surface but makes the full use of the flexible regulatory property of exponential mean Bézier curve to plan for the spatial painting path. This method not only increases the flexibility in the optimization process, but also greatly simplifies the steps of spray painting operations on complex curved surfaces.

#### 2. Path Planning

Trajectory optimization of the spray painting robot consists of two parts, one is the path planning and the other is the spray speed optimization. The effect of spray painting on the complex curved surface workpiece is still not very satisfactory in the current spray painting operation. In the spray painting operation, the curvature of the workpiece surface is likely to be large due to the complexity of curved surface and the shape of the workpiece surface, which makes it more difficult to optimize the spray painting trajectory. In the first part of the description, the existing method is curved triangulation. In this method, Cubic Cardinal spline curves are used to connect the discrete point arrays on the equidistant surface of the Bézier surface, and each adjacent Cardinal spline curve is connected by Hermite spline curve [11–13]. Since both Cardinal and Hermite curves are parametric cubic polynomials, the local control properties for the curves are particularly poor and it is difficult to make a direct and geometric intuitionistic estimate of the geometry of the curve under normal circumstances.

In the current surface modeling technology of CAGD (Computer Aided Geometric Design) for free-form curved surface, Bézier theory and method have been widely used in the CAM/CAD system as a set of mature algorithm theories, which shows a strong vitality and practical value. The main reason is that Bézier method is easy to operate and it has good geometric properties. The traditional Bézier curve is defined as a convex combination of spatial position vector with the Bernstein basis function as weight, which is also a kind of average value. But the traditional Bézier curve has great limitations on describing the geometry of the entity, and its rational and polynomial form also have many shortcomings. Therefore, it is of vital importance to find the new basis functions of Bézier curves. In this section, Bézier curves are evenly combined with exponential mean, and the definition of exponential mean Bézier curves with parameter is put forward [14, 15]. The three basic properties of this kind of curves are given, such as the elevation, de Casteljau algorithm, and segmentation theorem which are applied to the method for generating the painting path in complicated surface. Finally, better results can be obtained.

##### 2.1. Definition and Properties of Exponential Mean Bézier Curves

The traditional arithmetic weighted Bézier curve is defined as follows:where basis Bernstein function , . is the control vertices. Since , can be seen as the weighted average of control vertices .

Make the exponential mean of control vertices on this basis; we can get the definition of exponential mean Bézier curve.

*Definition 1. *Definefor ; is called the -time -order exponential mean Bézier curve.

Obviously, -time first-order exponential mean Bézier curve is the Bézier curve in traditional sense. After introducing the displacement operator , difference operator , and unit operator motioned above, then we haveso, has the following operator representation:The derivative formula of is given as follows:obviously,

Note the exponential mean Bézier curves determined by the control vertices as . Then, it satisfies the interpolation properties at the endpoints, which isand when , from , we can obtainand when , similarly we can obtain

It can be seen that the exponential mean Bézier curve defined by the same control polygon is unique. The parametric cubic Hermite interpolation does not have the symmetry represented by the formula above.

In the Bézier curve design, the flexibility of curve designing can be improved by increasing the number of control vertices while keeping the curve shape unchanged, which is called elevation. The exponential mean Bézier curve is also a parametric polynomial curve segment with global properties. In the discrete point arrays on the equidistant surface of a complex curved surface, it is possible that the control vertices cannot reach the ideal curve (path) shape no matter how we adjust them. That is, the “rigidity” of the curve (path) is adequate while the “flexibility” is insufficient. The control vertices are added by elevation, which reduces the “rigidity” of the painting path on the complex curved surface, increases its “flexibility,” and enhances the potential flexibility of controlling the shape of the painting path on complex curved surfaces.

Theorem 2. *When , suppose a -time -order exponential mean Bézier curve is expressed asThe control vertices are ; -time -order exponential mean Bézier curve is expressed asand the control vertices are , and then -time curve can be elevated to -time curve and satisfies*

*Proof. *and ; thusand when , -time first-order exponential mean Bézier curve can be also elevated to -time first-order exponential mean Bézier curve .

In particular, when and ,and when ,where is the control point of the -time -order exponential mean Bézier curve and is the control point of the -time -order exponential mean Bézier curve after elevation.

In the process of selecting the control vertices according to the discrete point arrays on the equidistant surface of the complex curved surface, the geometric properties of the complex curved surfaces themselves determine that the geometrical properties of the Bézier curves obtained from these control vertices are also complex. The process of each intermediate vertex generated by the de Casteljau algorithm is linear interpolation. This algorithm can resolve a complex geometric computation problem into a series of linear operations. The algorithm is easy to program and the speed is quite fast. Also, it facilitates the rapid generation of spatial painting path on complex curved surface.

Theorem 3 (de Casteljau algorithm theorem). * is the -time -order exponential mean Bézier curve. Suppose that the control vertex and parameter are given. Then is defined as follows:and this satisfies , *

*Proof. *When ,while Let and ; then we haveWhen ,while and thereby thusLet and ; then we havede Casteljau’s algorithm theorem improves the rapidity of generating the spatial paths on complex curved surfaces. However, since the curvature of the complex curved surface itself changes greatly, in the actual spray painting operations, sometimes the entire painting path needs to be processed by segment. That is, the entire path curve needs to be divided into two subpath curve segments. The de Casteljau algorithm can not only determine a point on the path curve, but also introduce the path curve segmentation problem. There are two vertices sets and in the de Casteljau algorithm. We can get the two subcurve segments divided from the entire exponential mean Bézier curve by using the exponential mean Bézier curve determined by these two vertices sets as the control vertex.

Theorem 4 (path curve segmentation theorem). *Suppose and , for ; we have*

*Proof. *When ,When , it can be proved as the same token.

The aim of the segmentation theorem is actually to find the two control vertices on the subcurve segment of the painting path in order to get the two small control polygons, which are closer to the curve than the original control polygon.

##### 2.2. Spatial Path Generation of Exponential Mean Bézier Curves

Due to the large curvature changes of the complex curved surface studied in this paper, the Cardinal splines and the parametric polynomial expressions of the Hermite splines themselves determine that the local control is relatively poor. Therefore, the exponential mean Bézier curves with parameter are used in order to overcome these shortcomings. The discrete point arrays (-direction or -direction) are regarded as the experimental data point arrays, and an exponential mean Bézier curve is used to fit the data points. Then the control vertices of the curves are inverted to generate the spatial painting path, where the -direction spatial path of the surface is shown in Figure 1 and the -direction spatial path of the surface is shown in Figure 2.