Next Article in Journal
A Review of Electric Impedance Matching Techniques for Piezoelectric Sensors, Actuators and Transducers
Next Article in Special Issue
Control System in Open-Source FPGA for a Self-Balancing Robot
Previous Article in Journal
Multi-Points Cooperative Relay in NOMA System with N-1 DF Relaying Nodes in HD/FD Mode for N User Equipments with Energy Harvesting
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Spray Trajectory Optimization on Bézier Surface

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
*
Author to whom correspondence should be addressed.
Electronics 2019, 8(2), 168; https://doi.org/10.3390/electronics8020168
Submission received: 26 November 2018 / Revised: 9 January 2019 / Accepted: 18 January 2019 / Published: 1 February 2019
(This article belongs to the Special Issue Cognitive Robotics & Control)

Abstract

:
The trajectory optimization of automatic spraying robot is still a challenging problem, which is very important in the whole spraying work. Spray trajectory optimization consists of two parts: spray space path and end-effector moving speed. A large number of spraying experiments have proved that it is very important to find the best initial trajectory of spraying. This paper presents an automatic spray trajectory optimization that is based on the Bézier surface. Spray the workpiece for Bezier triangular surface modeling and find the best initial trajectory of the spraying robot, establish the appropriate spraying model, plan the appropriate space path, and finally plan the trajectory optimization along the specified painting path. The validity and practicability of the method presented in this paper are proved by an example. This method can also be extended to other applications.

1. Introduction

With the development of intelligence, multi-intelligence systems have received extensive attention and application. It can be seen that intelligent automation is widely used in painting robots [1,2]. Surface modeling of the sprayed workpiece is the first step in the trajectory optimization of the spray painting robot and the key to designing the spray path of the spray painting robot. At present, there are two main types of surface modeling methods of sprayed workpiece for off-line programming system of spray painting robot: (1) Surface modeling method based on CAD (Computer Aided Design) model. The modeling method based on the CAD model is that the CAD model data of the workpiece have been obtained before the surface modeling, and the spraying path of the spray painting robot can be planned according to the CAD model of the workpiece. (2) Surface modeling method based on the workpiece scanning system. If there is no CAD model data for a workpiece, or if the surface shape of actual workpiece does not match the CAD model data, then the workpiece needs to be scanned to obtain its new CAD data. The surface of the workpiece is approximated by a simple plane, sphere, cylinder, or other parametric surface, allowing spray path planning on these parametric surfaces.
In the previous work, we focused on the trajectory optimization of complex curved surface. In the reference [3], the Surface modeling method based on the CAD model is adopted. The CAD model data of the workpiece is obtained, and can plan the spraying path of the spraying robot according to the CAD model of the workpiece. The trajectory optimization of spray painting robot for complex curved surface based on the exponential mean Bézier method is proposed. The advantage is that it does not need to split the complex curved surface.
During the off-line programming operation for spray painting robot, after the surface modeling for the workpiece is finished, the following work is to optimize the trajectory of spray painting robot [4,5]. Since the point on the trajectory is a six-dimensional vector in the Cartesian coordinate system, it is very complicated to express it in mathematical expressions and the solving process is very difficult. Therefore, the general idea of trajectory optimization for spray painting robot is usually as follows: First, find the spatial path of the spray painting robot on the workpiece surface, and then find out the optimal time sequence along the specified spatial path. That is, the consistency of the paint thickness on the workpiece surface is the highest and the spray painting time is the shortest at what speed the end effector sprays along the specified spatial path. According to this idea, the optimized trajectory for spray painting consists of two parts: the spatial path of the spray painting operation and the moving speed of the end effector.
On the other hand, a large number of spray painting experiments have shown that the uniformity of the paint thickness can be significantly improved. That is, the spray painting effect can be improved by optimizing the initial trajectory of the spray painting robot in the initial stage of spray painting [6,7,8]. In other words, finding the best initial trajectory for spray painting is critical to the further trajectory optimization. Therefore, the trajectory optimization for spray painting robot can be divided into the following four steps: (1) Finding the optimal initial trajectory of spray painting robots. (2) According to the geometric features of sprayed workpiece surface, establish a suitable spray painting model. (3) Plan an appropriate spatial path for spray painting. (4) Plan trajectory optimization along the specified painting path.
The initial trajectory selection, the establishment of spraying model and path planning are all the bases of trajectory optimization. This research is based on the assumption that the workpiece CAD model was not acquired in advance. The innovation is that the Bézier triangular surface modeling method is adopted under the CAD model data without the workpiece. Firstly, the Bézier surface is analyzed and the method for searching the optimal initial trajectory of the spray painting robot is given according to the features of the Bézier triangular surface. Subsequently, the spray painting model of Bézier surface is established, and the mathematic expression of paint thickness at a certain point on the Bézier surface is given. Finally, the optimized trajectory of Bézier surface is obtained by using the ideal point method in the mathematical programming with the uniformity of paint thickness and the shortest spray painting time as optimization objectives along the specified spray painting path. The advantage of this method is that a good initial path of automatic spraying is determined at the beginning of the spraying process, which can significantly provide uniformity of coating thickness, that is, improve the spraying effect.

2. Bézier Triangular Surface Modeling Method of Sprayed Workpiece

Since the Bernstein polynomial has many superior properties, it is widely used in parametric polynomial curve surfaces of many forms. Based on the features of the sprayed workpiece surface, the Bézier triangular surface is constructed by using the Bernstein polynomial as the basis function.
Definition 1.
There is an arbitrary given triangle on the plane whose vertices T 1 T 2 , T 3 are in the counterclockwise direction. Point P is any point in the plane where the triangle T 1 T 2 T 3 is located.
Subsequently, we define:
u 1 = [ P T 2 T 3 ] [ T 1 T 2 T 3 ] , u 2 = [ T 1 P T 3 ] [ T 1 T 2 T 3 ] , u 3 = [ T 1 T 2 P ] [ T 1 T 2 T 3 ]
In the Equation (1), [ T 1 T 2 T 3 ] represents the directed area of the triangle T 1 T 2 T 3 ; When T 1 , T 2 , T 3 is counterclockwise, [ T 1 T 2 T 3 ] represents the area of the triangle T 1 T 2 T 3 , that is [ T 1 T 2 T 3 ] = S ; When T 1 , T 2 , T 3 is clockwise, [ T 1 T 2 T 3 ] represents the opposite number of the area of the triangle, that is, [ T 1 T 2 T 3 ] = S . Afterwards, we call ( u 1 , u 2 , u 3 ) as the area coordinate of Point P , recorded as P = ( u 1 , u 2 , u 3 ) . Triangle T 1 T 2 T 3 is also called as coordinate triangle, as shown in Figure 1.
Definition 2.
Suppose the area coordinate of point P on the coordinate triangle T is ( u 1 , u 2 , u 3 ) , and then we define:
B i , j , k n ( P ) = n ! i ! j ! k ! u 1 i u 2 j u 3 k , i + j + k = n
As the Bernstein basis function ( ( n + 1 ) ( n + 2 ) / 2 in all), They have the following properties:
(1)
Non-negative: B i , j , k n ( P ) 0 , P T , i + j + k = n ;
(2)
Normative: i + j + k = n B i , j , k n ( P ) = 1 ;
where, according to the triangular theorem we can have:
( a + b + c ) n = i + j + k = n n ! i ! j ! k ! a i b j c k , a , b , c R , n N
For any P , u 1 + u 2 + u 3 = 1 . Let a = u 1 , b = u 2 , c = u 3 , we can have i + j + k = n B i , j , k n ( P ) = 1 .
Use the any straight line parallel to one side of the triangle to equate the remaining two sides of the coordinate triangle T into n segments, then the three parallel lines will divide the triangle into n 2 small congruent triangles, thus we can make the n -time subdivision of the coordinate triangle T , recorded as S n ( T ) . Subsequently, we call each small triangle is the sub-triangle of S n ( T ) . The vertices of the sub-triangle ( ( n + 1 ) ( n + 2 ) / 2 in all) are called as the node that subdivides S n ( T ) . The coordinates of the sub-nodes are as follows:
( i n , j n , k n ) , i + j + k = n
Abbreviated as:
P i , j , k = ( i n , j n , k n )
Definition 3.
Suppose b i , j , k ( i + j + k = n ) is any real number, we call
B n ( P ) = B n ( u 1 , u 2 , u 3 ) = i + j + k = n b i , j , k B i , j , k n ( P )
As the n -time Bézier facet on the coordinate triangle T , b i , j , k ( i + j + k = n ) as the Bernstein coefficient of the Bézier triangular surface, P i , j , k = ( P i , j , k ; b i , j , k ) , i + j + k = n as the control vertice of the Bézier triangular surface. We call the patch linear continuous function, which is linear on the sub-triangle of S n ( T ) and is the value b i , j , k at node P i , j , k as the control grid of the Bézier triangular surface.
In particular, for any function f : T R , the Bernstein coefficient is taken as:
b i , j , k = f ( i n , j n , k n )
Then we call
B n ( P ) = B n ( u 1 , u 2 , u 3 ) = i + j + k = n f ( i n , j n , k n ) B i , j , k n ( P )
as the n-time Bernstein triangular polynomial of f on T .
Where, in order to simplify the derivation process, three shift operators E 1 , E 2 , E 3 are introduced, which are defined as:
E 1 b i , j , k = b i + 1 , j , k
E 2 b i , j , k = b i , j + 1 , k
E 3 b i , j , k = b i , j , k + 1
Subsequently, E 1 i E 2 j E 3 k b 0 , 0 , 0 = b i , j , k , and we have:
B n ( P ) = i + j + k = n n ! i ! j ! k ! u 1 i u 2 j u 3 k ( E 1 i E 2 j E 3 k b 0 , 0 , 0 )
With the trinomial expansion, Equation (12) can be expressed as:
B n ( P ) = ( u 1 E 1 + u 2 E 2 + u 3 E 3 ) n b 0 , 0 , 0
Accordingly, we have:
B n ( T 1 ) = E 1 n b 0 , 0 , 0 = b n , 0 , 0
B n ( T 2 ) = E 2 n b 0 , 0 , 0 = b 0 , n , 0
B n ( T 3 ) = E 3 n b 0 , 0 , 0 = b 0 , 0 , n
Here, we call point P n , 0 , 0 = ( 1 , 0 , 0 ; b n , 0 , 0 ) , P 0 , n , 0 = ( 0 , 1 , 0 ; b 0 , n , 0 ) , P 0 , 0 , n = ( 0 , 0 , 1 ; b 0 , 0 , n ) the corner points of the triangular surface.
When u 1 = 0 , u 3 = 1 u 2 . Substituting into Equation (6), then we have:
B i , j , k n ( P ) = n ! j ! ( n j ) ! u 2 j ( 1 u 2 ) n j = B j n ( u 2 )
Subsequently,
B n ( 0 , u 2 , 1 u 2 ) = j = 0 n b 0 , j , n j B j n ( u 2 ) , 0 u 2 1
The boundary of a triangular surface is the n-time Bézier curve with the boundary of triangular surface control grid as the control polygons.
According to the definition of Bézier triangular surface modeling, when n = 2 , the quadratic Bézier triangular surface generated by six control vertices is:
B 2 ( P ) = i + j + k = 2 b i , j , k 2 ! i ! j ! k ! u 1 i u 2 j u 3 k = u 1 2 b 200 + u 2 2 b 020 + u 3 2 b 002 + 2 u 1 u 2 b 110 + 2 u 1 u 3 b 101 + 2 u 2 u 3 b 011
The above Equation (19) can be further expressed as a quadratic form:
B 2 ( P ) = ( u 1 u 2 u 3 ) ( b 200 b 110 b 101 b 110 b 020 b 011 b 101 b 011 b 002 ) ( u 1 u 2 u 3 )
The resulting quadratic Bézier triangular surface and its control network projection are shown in Figure 2.
When n = 3 , the cubic Bézier triangular surface that was generated by ten control vertices is:
B 3 ( P ) = i + j + k = 3 b i , j , k 3 ! i ! j ! k ! u 1 i u 2 j u 3 k = u 1 3 b 300 + u 2 3 b 030 + u 3 3 b 003 + 3 u 1 2 u 2 b 210 + 3 u 1 u 2 2 b 120 + 3 u 1 2 u 3 b 201 + 3 u 1 u 3 2 b 102 + 3 u 2 u 3 2 b 012 + 3 u 2 2 u 3 b 021 + 6 u 1 u 2 u 3 b 111
The resulting cubic Bézier triangular surface and its control network projection are shown in Figure 3.

3. Optimal Initial Trajectory Selection for Automatic Spraying on Bézier Surface

3.1. Bézier Surface Definition and Correlative Properties

In particular, the Bézier surface mainly includes a tensor product surface on a rectangular domain and a triangular surface on a triangular domain.
m × n -time Bézier surface can be represented as:
B ( u , v ) = i = 0 m j = 0 n B i , m ( u ) B j , n ( v ) V i , j
where, B i , m ( u ) , B j , n ( v ) are the u-direction m-time and v-direction n-time Bernstein basis function. V i , j ( i = 0 , 1 , , m ; j = 0 , 1 , , n ) is the control vertice or Bézier point of the curved surface. The control vertices form m + 1 and n + 1 control polygons along the v-direction and u-direction, respectively, which together form a curved control grid or a Bézier grid.
The properties of the Bézier surface are as follows:
(1)
The four corner points of the Bézier grid are the four corner points of the Bézier surface:
B ( 0 , 0 ) = V 0 , 0 , B ( 1 , 0 ) = V m , 0 , B ( 0 , 1 ) = V 0 , n , B ( 1 , 1 ) = V m , n
(2)
The outermost vertex of Bézier grid defines the four borders of the Bézier surface and it has the following characteristics at the boundary, as shown in Table 1:
(3)
Affine invariance: The Bézier surface is not changed under affine transformation.
(4)
’Symmetry’: The control vertices in opposite order define the same Bézier surface.
(5)
Convex hull: The Bézier surface is always located in the three-dimensional convex hull generated by its control vertex.
(6)
Move vertice V i , j , it will have the largest effect on the point B ( i / m , j / n ) , corresponding to u = i / m , v = j / n .

3.2. Optimal Initial Trajectory Selection

A large number of spray painting practical applications show that in the beginning of the spray painting operation if we can determine a good initial trajectory of spray painting robot, the uniformity of paint thickness can be significantly improved. That is to say, the spray painting effect can be improved. It can also reduce the spray painting time, improve the spray painting efficiency, and reduce the rate of paint waste at the same time. At present, the optimal initial trajectory selection method of the existing painting robot is to use the plane cutting method to take the obtained cross line as the initial trajectory of the painting robot [9,10,11]. This method can improve the spray painting effect to a certain extent, but the randomness is large and the spray painting time cannot be optimized. In this paper, the initial trajectory selection method that is based on geodesic curvature can not only improve the spray painting effect (paint thickness uniformity), but also can improve the spray painting efficiency (reduce spray painting time).
The curvature of a certain point on the painting path can be divided into two kinds: The first one is used to characterize the bending degree of the painting path passing through the point along normal vector of the surface, which is called the normal vector curvature. The second is used to characterize the extent to which the spray trajectory bends to the boundary line of the surface, called geodesic curvature. As shown in Figure 4, Figure 4a is a zero-geometric curvature trajectory. That is, the paint thickness is uniform on the both side of the painting path. Figure 4b is the spray painting trajectory whose geodesic curvature is a constant. It is obvious that more paint is accumulated in the direction where the trajectory is bumped. Figure 4c shows the painting path of the variable geodesic curvature. The paint thickness on both sides of the trajectory is not uniform. It can be seen that the changing rate of the geodesic curvature at each point on the painting path has an influence on the paint thickness. In order to improve the consistency of the paint thickness, the changes in geodesic curvature at each point on the trajectory must be taken into account when selecting the initial spray painting trajectory.
From the example shown in Figure 4, it can be seen that the zero-geometric curvature curve should be selected when determining the initial trajectory, and the initial trajectory also determines the geodesic curvature of the subsequent trajectory. The process of selecting the initial trajectory for spray painting can be divided into two steps: 1) Determining the relative position of the initial spray painting trajectory and the boundary of the workpiece surface. 2) Selecting the direction of the initial spray painting trajectory. As shown in Figure 5a, the initial trajectory is a geodesic, but the geometric curvature is very high when the offset curve passes the area near the apex of the cube. In Figure 5b, the initial trajectory is also the geodesic, but the surface is symmetrically bisected into two parts with the same Gaussian curvature being integral. Thus, in determining the position of the initial trajectory, it is necessary to select a position that minimizes the geodesic curvature of the offset curve.

3.2.1. Determining the Relative Position of Initial Trajectory

As shown in Figure 6, let a segment on the smooth initial trajectory α 0 as C s t . We use α 0 ( t 0 ) and α 0 ( t 1 ) to represent the two endpoints of C s t . The offset curve of line segment C s t is generated by measuring the distance between the offset curve and the initial trajectory according to the geodesic lines γ t 0 and γ t 1 , which are perpendicular to the initial trajectory at points α 0 ( t 0 ) and α 0 ( t 1 ) . Assume that C o f is the offset curve with a distance Δ of C s t and the offset distance Δ is less than the focal length of α 0 . Here, we only need to consider the integration of the geodesic curvature along C o f . Accordingly, we can assume that the surface is continuous. Subsequently, we can assume that C o f , γ t 0 , and γ t 1 are all smooth curves. Assume that ϕ is a region enclosed by boundaries C s t , C o f , γ t 0 , and γ t 1 , and an arbitrary smooth curve connecting γ t 0 ( Δ ) and γ t 1 ( 0 ) is C dia . Suppose that the region bounded by C s t , γ t 0 , and C dia is ϕ 1 , its boundary ϕ 1 contains the curves C s t , γ t 0 , C dia , and their corresponding directions. Similarly, ϕ 2 denotes the region bounded by C o f , γ t 1 , and C dia , and ϕ 2 is the boundary of ϕ 2 .
By applying the Gauss-Bonnet formula to the triangular regions ϕ 1 and ϕ 2 , we can obtain that:
ϕ i K d σ + ϕ i k g d s = j = 1 3 θ i , j π ,   i = 1 , 2
In the expression above, K is the Gaussian curvature of the surface ϕ i . k g is the geometric curvature of the triangle boundary ϕ i . θ i , j is the j -th interior angle of the boundary ϕ i . As γ t 0 and γ t 1 are geodesic, so the integrals γ t 0 k g d s and γ t 1 k g d s are zero. Subsequently, we have:
ϕ 1 k g d s + ϕ 2 k g d s = ( C s t k g d s γ t 0 k g d s C dia k g d s ) + ( γ t 1 k g d s + C dia k g d s C o f k g d s )
ϕ 1 k g d s + ϕ 2 k g d s = C s t k g d s C o f k g d s
Obviously, ϕ 1 K d σ + ϕ 2 K d σ = ϕ K d σ , γ t 0 , and γ t 1 are perpendicular to the seed curve, so we have: θ 1 , 1 + θ 2 , 3 = θ 1 , 2 = π 2 , Substituting into expression (26), then we sum the triangular regions ϕ 1 and ϕ 2 :
C o f k g d s = ϕ K d σ + C s t k g d s
Finally, if the initial trajectory is a geodesic, then:
C o f k g d s = ϕ K d σ

3.2.2. Selecting the Direction of Initial Path

In order to ensure that the time along the initial trajectory is the least, when selecting the spatial direction of the initial trajectory, it is necessary to select a curve from numerous geodesic curvature and Gaussian curvature curve on the surface whose integrals are equal to that of an initial trajectory. We can give the definition of surface height first, and then determine the direction of the initial trajectory according to the definition. The surface height is the sum of the longest geodetic curve (straight geodesic) perpendicular to the initial trajectory that extends from the initial trajectory to both sides, as shown in Figure 7. The optimal initial trajectory is the initial trajectory corresponding to the minimum surface height of the surface. With the same spray painting distance, the reciprocating spray painting time along the optimal initial trajectory is the least (Figure 8). What is more, the paint consistency is the best and the paint consumption is also the least.

4. Automatic Spray Space Path Generation on Bézier Surfaces

Under normal circumstances, using the Bézier method to generate the surface is more complex. It is more complex if we perform optimization of spraying trajectory directly on Bézier surface. On the other hand, during the spraying operation, the distance between the end effector and the workpiece surface is always constant and perpendicular to the workpiece surface. In this case, the end effector of the spray equipment is essentially reciprocating on the isometric surface of the workpiece surface. Therefore, according to this idea, we can first find its isometric surface according to the shape of the surface and then perform optimization of spraying trajectory on the isometric surface. It should be noted that, strictly speaking, it is the discrete point array of the isometric surface of the Bézier surface but not the isometric surface of Bézier surface that we will find out according to this method. In the spatial path planning of the spray painting robot, we only need to find the discrete points on the path essentially and then fit out the spray path using the corresponding mathematical methods according to the accuracy requirements.
A U-direction or V-direction Bézier curve on the Bézier surface boundary is used as a benchmark and it is discretized under a certain precision. Subsequently, specify a constant painting distance h and find the equidistant point of the discrete points on the Bézier surface in the direction of the normal vectors of the discrete points along the curve. After connecting these equidistant points with a smooth curve, we can find an equidistant line of a Bézier curve on the boundary line of the Bézier surface. By the same token, the Bézier curves with the same distance are specified on the Bézier surface (which is the distance between two adjacent painting paths). In the same way, the same method can be used to find the discrete point array of the equidistant surfaces of the Bézier surface. Afterwards, we use the cubic Cardinal spline curves to connect each discrete point array. The adjacent two segments of cubic Cardinal spline curve segments are connected by a Hermite spline curve, so that the specified painting path can be obtained.

5. Trajectory Optimization on the Bézier Surface

In the actual off-line programming process of spray painting robot, the following factors should be taken into consideration when performing the trajectory optimization for spray painting robot on curved surface: (1) Mathematical model of surfaces. (2) Spray painting model on curved surface. (3) The expression of paint thickness at a point on the surface. (4) Mathematical expression of optimized trajectory on surface and its solution. In essence, the trajectory optimization for spray painting robot is actually a multi-objective optimization problem with constraints. There are many constraints in this problem, such as the error of paint thickness, the path of the end effector, the moving speed, the surface shape of the sprayed workpiece, parameters of the end effector, air pressure, paint viscosity, and so on. Accordingly, how to deal with the constraint function effectively in order to guide the algorithm searching is the key of trajectory optimization problem [12,13,14,15]. On the other hand, there are many optimization objectives, such as minimum spray painting time, smallest variance of paint thickness, minimum paint consumption, the highest paint utilization rate, the least inflexion of the robot path, and so on. In these spray painting optimization objectives, the objective function of the trajectory optimization is not independent of each other. They are often coupled with each other and in a state of competition. As a result, it is very difficult to obtain the exact solution of the multi-objective trajectory optimization problem of spray painting robot.
In order to obtain high-efficient painting path, the ideal method is to make certain assumptions. That is, in the case that the error is allowed, a number of parameters are assumed to remain unchanged in the process of spray painting. Only the main factors in the spray painting process are taken into account. Such kind of idea makes the trajectory optimization of spray painting robot greatly simplified and it also makes the multi-objective optimization of spray painting trajectory with constraints being easy to be solved.
When solving the optimization problem of spray painting trajectory on Bézier surfaces, we will simplify and solve the problem according to the ideal above. The specific idea is as follows: After the Bézier triangular surface modeling method is used to obtain the parametric surface, a simple paint deposition rate model is established. On this basis, a general spray painting model on the Bézier surface is derived and the mathematical expression of paint thickness at an arbitrary point is also derived. Finally, the optimal spray painting speed and spray painting time are selected as optimization objectives. After the multi-objective optimization function of the spray painting robot on Bézier surface is derived, the appropriate mathematical programming method is used to obtain the solution and the optimized trajectory of spray painting robot on Bézier surface can also be obtained.
The spatial distribution model of coating, the cumulative rate of coating function diagram and free surface trajectory optimization method have been described in the previous work [3,16]. After spraying a curved surface S, assuming that the average thickness of the surface is q d , the coating thickness at any point s is q s , the deviation of the maximum coating thickness is q w , and then we have:
max s S ( | q d q s | ) q w
Assuming that the maximum coating thickness is q max and the minimum coating thickness is q min , the maximum deviation angle between the normal vector of all sampling points and the normal vector of the surface is β t h , then the coating thickness at any point s can satisfy the following inequality:
q min cos β t h q s q max
The coating thickness at any point s satisfies the requirement (29), then we have:
| q s q d | q w , s S
then:
q max q d q w
Further:
q d q min cos β t h q w
If Equation (32) can be satisfied, then the maximum deviation angle β t h can be calculated with Equation (33). That is, for any surface, if the deviation angle β satisfies β β t h , then the coating thickness at any point on the curved surface can satisfy Equation (29).

6. Experimental Part

6.1. Experimental Verification

The sprayed workpiece is shown in Figure 9. According to the topology of the spray workpiece, the workpiece is divided into three parts for processing, which are basin bottom, basin side, and basin edge, respectively. In the three parts, the basin bottom and the basin edge are all flat, and the surface of these parts can be directly generated by the control vertice. The basin side needs to be divided into two patches for processing, which are both arc. Where 10 control vertices are taken at different positions on each patch, and the cubic Bézier triangular surfaces are generated using the algorithm in Part 2. The Bézier triangular surface generation software system is written in VC ++ language. The curved surface modeling diagram of the workpiece is shown in Figure 10.
After the sprayed workpiece is modeled by the Bézier triangular surface technique, the U-direction spatial path and the V-direction spatial path of the workpiece surface are obtained according to the method for generating the spatial path of the spray painting robot on the Bézier surface that is presented in this paper. U-direction Spatial Path and V-direction Spatial Path as shown in Figure 11 and Figure 12.
Assuming that the ideal paint thickness is qd = 50 µm, the error of the maximum paint thickness is qw = 10 µm, the bottom radius of the conical paint sprayed by the end effector R = 60 mm. According to the Spatial distribution model of coating, after performing the spray painting experiment on the plate, the paint deposition rate obtained by the experimental data is:
f ( r ) = 1 15 ( R 2 r 2 )   μ m / s
After obtaining the optimized trajectory on the plane, the spray painting rate (at uniform speed) of the spray painting robot can be obtained as: V = 256 mm/s.
After obtaining the spatial painting path, trajectory optimization is carried out along the specified painting path according to the trajectory optimization method for spray painting robot on the Bézier surface in Section 5. At the same time, according to the initial trajectory selection method for spray painting robot on the Bézier surface in Section 3, the initial trajectory is selected. There are 432 discrete points in the discrete point array in U-direction, and the path between every two discrete points is divided into 10 segments. There are 402 discrete points in the discrete point array in the V-direction, and the path between every two discrete points is divided into 10 segments. The parameters of the algorithm are as follows: the ideal paint thickness qd = 50 µm, maximum allowable error qw = 10 µm, painting radius R = 50 mm, painting distance h = 100 mm, numbers of triangular facets N = 1566, the length of each segment dk = 50 mm, number of the subdivided segments m = 10, and weight vector ω = ( 0.5 , 0.5 ) T . When the gun paints at uniform speed, v = 256 mm/s (the optimization speed on the plane). Take v = 256 mm/s as the initial value of the algorithm iteration when performing optimized spray painting. The following optimization experiments are carried out in the U-direction path and the V-direction path, respectively. The process of spray painting experiment in the laboratory is shown in Figure 13. After the spray painting experiment, the paint thickness is measured by a paint thickness gauge. The paint thickness curve of the 432 sampling points along the U-direction path is shown in Figure 14 and the paint thickness curve of the 402 sampling points along the V-direction path is shown in Figure 15. The experimental results are shown in Table 2.
After the analysis of the experimental results, we can learn that spray painting along the U-direction and the V-direction can both meet the spray painting requirement after the optimization of spray painting trajectory. That is, the error of paint thickness is within the allowable range. However, it can be seen that the spray painting effect along the U-direction path is better and the spray painting efficiency is higher for the workpiece. It also can be seen that the shape of the workpiece surface should be fully considered in the planning of painting path, and the direction of the painting path may have a certain impact on the spray painting effect and efficiency.

6.2. Spray Painting Experiment

Taking a certain brand of automobile body as the spraying target, the feasibility of automatic spraying trajectory optimization on the Bézier surface was simulated. As shown in Figure 16, taking the automotive body of a brand as the paint objective and taking the U direction as the spraying direction. Four ABB robots are using for painting at the same time. After the painting is completed, the coating thickness of the sample points on the surface of the car body is measured by the paint drying and the professional coating thickness tester.
In the spray experiment, the ideal paint thickness is qd = 50 µm, maximum allowable error qw = 10 µm, painting radius R = 50 mm, painting distance h = 100 mm, and painting speed V = 256 mm/s (the optimization speed on the plane) when performing uniform spray painting. We take 400 discrete points evenly on the workpiece surface after the spray painting operation. The paint thickness curve is shown in Figure 17 after using a paint thickness gauge to measure the paint thickness at the discrete points.
Based on the analysis of the experimental results, it can be seen that the average spray thickness is 51.1 μm, the thickness of the maximum coating is 58.1 μm, the minimum coating thickness is 44.2 μm, and the spray time spent by the robot is about 99 s, which is better than the general spraying robot. After the spraying trajectory is normalized based on the Bézier surface, the spraying requirements can be met along the path spraying, that is, the coating thickness deviation is within the allowable range.

7. Conclusions

In this paper, an automatic spray trajectory optimization method on Bezier surface is proposed. Firstly, the Bézier surface is analyzed and the method for searching the optimal initial trajectory of the spray painting robot is given according to the features of the Bézier triangular surface. Subsequently, the spray painting model of Bézier surface is established, and the mathematic expression of paint thickness at a certain point on Bézier surface is given. Finally, the optimized trajectory of Bézier surface is obtained by using the ideal point method in the mathematical programming with the uniformity of paint thickness and the shortest spray painting time as optimization objectives along the specified spray painting path. The biggest advantage of this method is that a good initial path of automatic spraying is determined at the beginning of the spraying process, which can significantly provide uniformity of coating thickness, that is, improve the spraying effect. Finally, the effectiveness and practicability of the proposed method are verified by an example verification and spraying experiment.

Author Contributions

W.C. and Y.T. conceived and designed the experiments; W.C. performed the experiments; H.G. analyzed the data; J.L. contributed reagents/materials/analysis tools; J.L. wrote the paper.

Funding

This research is supported by the Postgraduate Research & Practice Innovation Program of Jiangsu Province (KYCX18_2332), National Natural Science Foundation of China (51505193, 61503162), Project funded by China Postdoctoral Science Foundation (2016M601691), Industrial Foresight Project of Zhenjiang City (GY2018018) and The six highest peak of talent in Jiangsu Province (2016-GDZB-021).

Conflicts of Interest

The authors declare no conflict of interest.

Annotation

T 1 , T 2 , T 3 Clockwise vertex of any given triangle.
P Any point in the plane where the triangle T 1 T 2 T 3 is located.
[ T 1 T 2 T 3 ] Represents the directed area of the triangle T 1 T 2 T 3 .
T The interior of the triangle T 1 T 2 T 3 with the boundary.
S n ( T ) Make the n -time subdivision of the coordinate triangle T .
B i , m ( u ) , B j , n ( v ) The u-direction m-time and v-direction n-time Bernstein basis function.
B ( 0 , 0 ) , B ( 1 , 0 ) , B ( 0 , 1 ) , B ( 1 , 1 ) The four corner points of the Bézier grid.
V 0 , 0 , V m , 0 , V 0 , n , V m , n The four corner points of the Bézier surface.
α 0 The smooth initial trajectory.
C s t A segment on the smooth initial trajectory.
α 0 ( t 0 ) , α 0 ( t 1 ) The two endpoints of C s t .
γ t 0 , γ t 1 The geodesic lines.
C s t The offset curve of line segment.
Δ The offset distance.
C o f The offset curve with a distance Δ of C s t
ϕ A region enclosed by boundaries C s t , C o f , γ t 0 and γ t 1
C dia Any smooth curve connecting γ t 0 ( Δ ) and γ t 1 ( 0 )
ϕ 1 The region bounded by C s t , γ t 0 and C dia
ϕ 2 The region bounded by C o f , γ t 1 and C dia
ϕ 1 The boundary of ϕ 1
ϕ 2 The boundary of ϕ 2

References

  1. Li, J. Distributed cooperative tracking of multi-agent systems with actuator faults. Trans. Inst. Meas. Control 2015, 37, 1041–1048. [Google Scholar] [CrossRef]
  2. Li, J.; Li, C.; Yang, X.; Chen, W. Event-triggered containment control of multi-agent systems with high-order dynamics and input delay. Electronics 2018, 7, 343. [Google Scholar] [CrossRef]
  3. Chen, W.; Liu, J.; Tang, Y.; Huan, J.; Liu, H. Trajectory optimization of spray painting robot for complex curved surface based on exponential mean Bézier method. Math. Probl. Eng. 2017, 2017, 4259869. [Google Scholar] [CrossRef]
  4. Li, F. Trajectory optimization of spray painting robot based on CAD. Trans. Chin. Soc. Agric. Mach. 2010, 41, 213–217. [Google Scholar]
  5. Gong, D. Trajectory optimization of spray painting robot for natural quadric surfaces. China Mech. Eng. 2011, 22, 282–290. [Google Scholar]
  6. Huang, W.H. Optimal line-sweep-based decompositions for coverage algorithms. In Proceedings of the IEEE International Conference on Robotics and Automation, Seoul, South Korea, 21–26 May 2001; Volume 1, pp. 27–32. [Google Scholar]
  7. Kim, T.; Sarma, S.E. Optimal sweeping paths on a 2-manifold: A new class of optimization problems defined by path structures. IEEE Trans. Robot. Autom. 2003, 19, 613–636. [Google Scholar]
  8. Gasparetto, A.; Vidoni, R.; Pillan, D.; Saccavini, E. Automatic path and trajectory planning for robotic spray painting. In Proceedings of the 7th German Conference on Robotics, Munich, Germany, 21–22 May 2012; pp. 1–6. [Google Scholar]
  9. Zhao, J. The Influence of initial configura tion on trajectory planning algorithms for redundant robots. Mech. Technol. 2000, 19, 249–251. [Google Scholar]
  10. Chen, W.; Tang, Y.; Zhao, Q. A novel trajectory planning scheme for spray painting robot with Bézier curves. In Proceedings of the Control and Decision Conference, Yinchuan, China, 28–30 May 2016; pp. 6746–6750. [Google Scholar]
  11. Chen, H.; Fuhlbrigge, T.; Li, X. A review of CAD-based robot path planning for spray painting. Microelectron. Reliab. 2009, 42, 343–347. [Google Scholar] [CrossRef]
  12. Posa, M.; Cantu, C.; Tedrake, R. A direct method for trajectory optimization of rigid bodies through contact. Int. J. Robot. Res. 2013, 33, 69–81. [Google Scholar] [CrossRef] [Green Version]
  13. Shao, Z.J.; Shao, Z. Precise Trajectory Optimization for Articulated Wheeled Vehicles in Cluttered Environments; Elsevier Science Ltd.: Amsterdam, The Netherlands, 2016. [Google Scholar]
  14. Tang, Y.; Chen, W. Surface modeling of workpiece and tool trajectory planning for spray painting robot. PLoS ONE 2015, 15, e0127139. [Google Scholar]
  15. Liang, X.; Wan, L.; Blake, J.I.R.; Shenoi, R.A.; Townsend, N. Path following of an underactuated AUV based on fuzzy backstepping sliding mode control. Int. J. Adv. Robot. Syst. 2016, 13, 1. [Google Scholar] [CrossRef]
  16. Chen, W.; Liu, H.; Tang, Y.; Liu, J. Trajectory optimization of electrostatic spray painting robots on curved surface. Coatings 2017, 7, 155. [Google Scholar] [CrossRef]
Figure 1. The Area Coordinate of Point P on the Coordinate Triangle.
Figure 1. The Area Coordinate of Point P on the Coordinate Triangle.
Electronics 08 00168 g001
Figure 2. Quadratic Bézier Triangular Surface and Its Control Network Projection.
Figure 2. Quadratic Bézier Triangular Surface and Its Control Network Projection.
Electronics 08 00168 g002
Figure 3. Cubic Bézier triangular surface and its control network projection.
Figure 3. Cubic Bézier triangular surface and its control network projection.
Electronics 08 00168 g003
Figure 4. The Influence of Geodesic Curvature on the Consistency of Paint Thickness.
Figure 4. The Influence of Geodesic Curvature on the Consistency of Paint Thickness.
Electronics 08 00168 g004
Figure 5. The Influence of the Relative Position of Geodesic Curve and Surface Boundary on Subsequent Trajectory.
Figure 5. The Influence of the Relative Position of Geodesic Curve and Surface Boundary on Subsequent Trajectory.
Electronics 08 00168 g005
Figure 6. The Relationship between the Curvature Integral of Geodesic Surface and the Gaussian Curvature of Surfaces.
Figure 6. The Relationship between the Curvature Integral of Geodesic Surface and the Gaussian Curvature of Surfaces.
Electronics 08 00168 g006
Figure 7. Surface Height Measurement Method.
Figure 7. Surface Height Measurement Method.
Electronics 08 00168 g007
Figure 8. Relationship between Surface Height and Reciprocating Spray Time.
Figure 8. Relationship between Surface Height and Reciprocating Spray Time.
Electronics 08 00168 g008
Figure 9. Sprayed Workpiece.
Figure 9. Sprayed Workpiece.
Electronics 08 00168 g009
Figure 10. The Curved Surface Modeling Diagram of the Workpiece.
Figure 10. The Curved Surface Modeling Diagram of the Workpiece.
Electronics 08 00168 g010
Figure 11. U-direction Spatial Path.
Figure 11. U-direction Spatial Path.
Electronics 08 00168 g011
Figure 12. V-direction Spatial Path.
Figure 12. V-direction Spatial Path.
Electronics 08 00168 g012
Figure 13. Spray painting Experiment in the Laboratory.
Figure 13. Spray painting Experiment in the Laboratory.
Electronics 08 00168 g013
Figure 14. The Paint thickness Curve Spray painting along the U-direction Path.
Figure 14. The Paint thickness Curve Spray painting along the U-direction Path.
Electronics 08 00168 g014
Figure 15. The Paint thickness Curve Spray painting along the V-direction Path.
Figure 15. The Paint thickness Curve Spray painting along the V-direction Path.
Electronics 08 00168 g015
Figure 16. The robotic spray painting experiment.
Figure 16. The robotic spray painting experiment.
Electronics 08 00168 g016
Figure 17. Material Thickness of Random Chosen Points for U-direction Trajectory.
Figure 17. Material Thickness of Random Chosen Points for U-direction Trajectory.
Electronics 08 00168 g017
Table 1. Characteristics at the Boundary of Bézier Grids.
Table 1. Characteristics at the Boundary of Bézier Grids.
(0,0)(1,0)(0,1)(1,1)
B V 0 , 0 V m , 0 V 0 , n V m , n
B u m Δ 1 , 0 V 0 , 0 m Δ 1 , 0 V n 1 , 0 m Δ 1 , 0 V 0 , n m Δ 1 , 0 V m 1 , n
B v n Δ 0 , 1 V 0 , 0 n Δ 0 , 1 V m , 0 n Δ 0 , 1 V 0 , n 1 n Δ 0 , 1 V m , n 1
Table 2. The Experimental Results of Spraying.
Table 2. The Experimental Results of Spraying.
Optimized Spray Painting along U-Direction PathOptimized Spray Painting along V-Direction Path
Average (μm)51.252.1
Maximum (μm)56.258.3
Minimum (μm)45.143.0
Painting time (s)8395

Share and Cite

MDPI and ACS Style

Chen, W.; Liu, J.; Tang, Y.; Ge, H. Automatic Spray Trajectory Optimization on Bézier Surface. Electronics 2019, 8, 168. https://doi.org/10.3390/electronics8020168

AMA Style

Chen W, Liu J, Tang Y, Ge H. Automatic Spray Trajectory Optimization on Bézier Surface. Electronics. 2019; 8(2):168. https://doi.org/10.3390/electronics8020168

Chicago/Turabian Style

Chen, Wei, Junjie Liu, Yang Tang, and Huilin Ge. 2019. "Automatic Spray Trajectory Optimization on Bézier Surface" Electronics 8, no. 2: 168. https://doi.org/10.3390/electronics8020168

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop