Research Journal of Applied Sciences, Engineering and Technology 4(2): 131-134,... ISSN: 2040-7467 © Maxwell Scientific Organization, 2012

advertisement
Research Journal of Applied Sciences, Engineering and Technology 4(2): 131-134, 2012
ISSN: 2040-7467
© Maxwell Scientific Organization, 2012
Submitted: September 23, 2011
Accepted: November 02 , 2011
Published: January 15, 2012
S-Curve Acceleration/Deceleration Algorithm Based on Reference Table
Xia Yubin and Wang Wei
School of Computer Science and Engineering, Beihang University, Beijing 100191, China
Abstract: To satisfy the need of bond speed and precision, S-curve acceleration/deceleration based on reference
table is used on LED bond-system. Compute the PVT data and store them in a table in advance. In actual
processes the PVT data which meet the requirements can be calculated by the data in the table. The results show
that the algorithm based on reference table can effectively reduce the computation time and satisfy our needs.
Key words: Numerical control systems, reference table, S-curve Acc/Dcc
INTRODUCTION
Segment VII, including accelerated acceleration, constant
acceleration, decelerated acceleration, constant velocity,
accelerated deceleration, constant deceleration and
decelerated deceleration. Li Xiaohui (Li et al ., 2007)
simplified the processes by removing the segment
constant acceleration and segment constant deceleration.
Here the process is further simplified by removing the
segment constant velocity as shown in Fig. 1. The
symbols of Fig. 1 are defined as follows:
The main function of LED high-speed bonding
system is to bond golden wire to a chip. Ultrasonic wave
is used to improve the bonding quantity. It demands that
the system can bond at least 18000 wires per hour.
Acceleration and deceleration control is the key to the
high speed, high precision system. Designing a simple
acceleration and deceleration algorithm that meets the
demand is the emphasis for research. The algorithm of
traditional methods such as linear and exponential
acceleration/deceleration control techniques (Xuguang et
al ., 2008) would like to bring about unnecessary shocks
and are not suitable for high speed, high precision
numerical systems. S-curve acceleration/deceleration
adopted in some advanced CNC systems at present
overcomes the weakness of linear and exponential
acceleration/deceleration control methods. But this
algorithm is relatively complicated and the procedure of
computing is time-consuming. The papers (Li et al., 2007;
Zhang et al., 2009; Hu et al., 2010) improve the s-curve
acceleration/deceleration control method in the aspects of
simplifying the sub-function, computing the acceleration
region and deceleration region. However there are still
cubic calculations in these algorithms. The procedure of
computation is also time-consuming. Polynomial
acceleration and deceleration control proposed in paper
(Xu et al., 2009) guarantees the acceleration are
continuous, but the computation becomes more
complicated and time-consuming.
Based on the solid facts discussed above, s-curve
acceleration/deceleration based on reference table is
proposed. The procedure of computation is easy and fast.
C
C
Tk(k = 0, ...3): The time of transitional point
Tk(k = 0, ...3): The duration of each segment
Suppose that the time from zero to maximum
acceleration is equal to that from the maximum
acceleration to zero, acceleration/deceleration rate is J. To
ensure that acceleration at the start of T0 is equal to
acceleration at the end of T1, T0 should be equal to T1.
For the same reason, T3 should be equal to T2. Given t1 =
2t0, t2 = 3t0, t3 = 4t0, then the formula of the acceleration,
the velocity and the position are given below:
S-CURVE ACCELERATION/DECELERATION
AND ITS FURTHER SIMPLIFICATION
The s-curve acceleration/deceleration process is
usually divided into seven segments form Segment I to
0  t  t0
 Jt
  J (t  t ) t  t  t

1 0
1
a (t )  

J
(
t

t
)
t

t

t
1 1
2

 J (t  2t1) t2  t  t3
(1)
J 2
2 t

 J ( t  t )2 
1
 2
v( t )  
J
 ( t  t )2 
1
 2
J
 ( t  2t1 )2
2
(2)
0  t  t0
J 2
t1
4
J 2
t1
4
t0  t  t1
t1  t  t2
t2  t  t3
Corresponding Author: Xia Yubin, School of Computer Science and Engineering, Beihang University, Beijing 100191
131
Res. J. Appl. Sci. Eng. Technol., 4(2): 131-134, 2012
s
v
T0
T1
t0
T2
t1
Table 1: Example of reference table
T1
T2
T3
T4
V1
V2
V3
V4
P1
P2
P3
P4
T3
t2
t3
t
t0
t1
t2
t3
t
t0
t1
t2
t3
t
J 2
0  t  t0
2t

J
 J
v (t )    (t  t1 )2  t12 t0  t  t1
4
 2
t1  t  t3
 v (2t1  t )


A
s(t1 ) 
0  t  t0
J 3
t t  t  t1
8 1 0
J 3
t1 t1  t  t2
8
Tn
Vn
Pn
(4)
To the position formula, there is conclusion: s (t1+))
= 2s(t1)-s(t1-)), and 0#)#t1.The conclusion can be proved
as follow:
Suppose that ª is a positive integer. If 0#)#t0, then
t0#t1-)#t0 and t1#t1+)#t2. t1+) and t1-) is symmetry
about the straight line t = t1.
Fig. 1: Four segments s-curve acceleration/deceleration
J 3
6t

  J (t  t ) 3  J t 2t 
1
 6
4 1
s( t )  
  J (t  t ) 3  J t 2t 
1
1
 6
4
J
J
 (t  2t1) 3  t13
4
6
…
…
…
Scope of sample points: As can been seen from Fig. 1,
the velocity line is symmetrical about straight line t = t1.
So the velocity at a time point in [t1, 2 t1] is equal to that
at symmetry point in [0, t1]. For this reason, a new
velocity formula can be described as (4):
V
a
T5
V5
P5
J 3 J 3 J 3
t1  t1  t1
4
8
8
J
J
J
(t1    t1 ) 3  t12 (t1   )  t13
6
4
8
J 3 J 2
J
2
 t1  t1   (  )
8
4
6
(3)
(5)
s(t1   )  
t 2  t  t3
(6)
J
J
J
(t1    t1 ) 3  t12 (t1   )  t13
6
4
8
(7)
J 3 J 3 J 2
J
3
 2( t1 )   t1  t1   (  ) 
8
4
6
8

s(t1   )  
As is shown from the formulae above, there are
square and cube calculations in the process of
computation and the formulae are complicated. So it will
take much time to compute the velocity and position.
It can be inferred from (5) (6) (7) that s (t1+)) =
2s(t1)-s(t1-)) .
If t0#)#t1, then 0#t1-)#t0 and t2#t1+)#t3. t1+) and
t1-) is symmetry about the straight line t = t1.
S-curve acceleration/deceleration based on reference
table: Square calculation, cube calculation and
complicate formulae make the process of computation
time-consuming. For this reason, S-curve
acceleration/deceleration algorithm based on reference
table is proposed.
s(t1   )  
J
(t1   ) 3
6
(8)
REFERENCE TABLE CONSTRUCTION
J
J
(t1    2t1 ) 3  t13
6
4
J
3
 J
 2( t13 )   t1    
8
 6

s(t1   )  
Firstly, set the parameters J and t1 specific values.
Then, sample some time points. In the end, compute the
velocity and position at the sampled time points and store
the results in a three-dimensional array. Store time points
in the first dimension of the array. Store velocity results
in the second dimension of the array. Store the position
results in the third dimension of the array.
For conveniences, call the array reference table. A
reference table example is shown in Table 1.
(9)
It can be inferred from (5), (8), (9) that s (t1+)) = 2s
t1 1)-s (t1-)). Prove up.
To sum up, there is relationship s(t1+)) = 2s (t1) s(t1-)) on the position line. For this reason, a new position
formula can be described as follows:
132
Res. J. Appl. Sci. Eng. Technol., 4(2): 131-134, 2012
J 3
6 t

J
J
 J
s( t )   ( t  t1 )3  t12t  t13
4
8
 6
2 s( t1 )  s( 2t1  t )


(15), (16) can be deduced from (2), (3), (13) (14).
0  t  t0
(10)
t0  t  t1
t1  t  t3
It can be seen from the conclusion above that the
function value of the velocity formula in the interval
[0, 2t1] could be computed by the function value of
velocity formula in the interval [0, t1]. So is the position
formula. So just sample points in the interval [0, t1] and
store them in the reference table. The last sample point
should be at t = t1.
New formulae deduction under three circumstances:
C Move certain distance in 2t1: Suppose that the
actual condition demands the machine moves Lb in
2t1. Given Lb = k*La. Under the circumstances set
sb(t) as a new position formula and sb (t) = k*s(t).
s(t) is the formula (3) above. It can be inferred sb
(2t1) = k*La. Calculate the derivative of sb(t) and the
corresponding velocity formula vb (t) can be
deduced. The result is vb (t) = sb (t) k*v (t).v (t) is
the formula (2) above. Then (11) (12) are the new
velocity formula and position formula.
C
(11)
snew  k  s(t )
(12)
C
Move La in certain time: Suppose that the actual
condition demands the machine moves La in 2d1 and
d1 = u*t1. (13) (14) are the velocity and position
formulas which are similar to (2) (3):
J 2
2 t

 J ( t  d )2 
1
 2
v d (t )  
J
 ( t  d )2 
1
 2
J
 ( t  2d1 )2
2
d1
2  t  d1
d1  t 
3d1
J 3
6 t

 J ( t  d )3  J d 2t 
1
1
 6
4
sd ( t )  
J
J
3
  ( t  d )  d 2t 
1
1
 6
4
J
J
 ( t  2 d1 )3  d13
4
6
3d1
(13)
2
2  t  2d1
d
0  t  12
J
8
J
8
d13
d1
d13
d1  t 
3d1
2  t  d1
3d1
d
sd ( m * d1 )  ( 1 )3  s( m * t1 )  u3  s( m * t1 )
t1
(16)
vnew (t ) 
vd (t 0)
u3
(17)
snew (t ) 
sd (t )
u3
(18)
Move certain distance in certain time: Suppose
that the actual condition demands the machine moves
Lb in 2d1 and Lb = k*La, d1 = u*t1. It can be inferred
from the analyses in a) and b) that (19) (20) are the
new velocity and position formulae:
vnew (t ) 
k
vd (t )
u3
(19)
snew (t ) 
k
sd (t )
u3
(20)
Use reference table to compute a new PVT table: First
the values of parameters d1 and Lb should be obtained.
The values of t1 and La can be calculated from reference
table. Then the values of k and u can be calculated by the
formulae k = Lb/La, u = d1/t1. From the analyses in 2.1
and 2.2, every point Ti, Vi and Pi can be computed by
referring to reference table and doing some simple
calculations. Store the data Ti, Vi and Pi in a new array. At
last let Ti = Ti/u, Vi = Vi*k/u, Pi = Pi*k. To reduce time
further, the result of k/u could be calculated in advance
and store it in a variable (given that the variable is named
w, w = k/u). Then Vi = Vi*k/u can be described as Vi =
Vi*w. The data in the new array guarantees the machine
moves Lb in 2d1.
d
0  t  12
J 2
d1
4
J 2
d1
4
(15)
As can be seen from (15) (16), if the sample points of
(2) (3) are t = m*t1 (m*t1 is in the interval [0, 2t1])
and the sample points of (13) (14) are t = m*d1 (m*d1
is in the interval [0, 2d1]), then the velocity computed
by (13) is u2 times of the velocity computed by (2)
and the position computed by (14) is u3 times of the
position computed by (3). In order to change the
movement position in 2d1, multiply (13) (14) by 1/u3,
respectively, which is proved in a). (17) (18) are the
new velocity and position formulae.
How to use reference table: The data in reference table
is calculated at specific parameters J and t1. Given that the
position calculated from the reference table at t = 2t1 is
La. That is to say the machine moves La in 2t1. However
the request may change at actual conditions.
vnew  k  v (t )
d
2
v d ( m * d1 )  ( 1 )2  v ( m * t1 ) = u C (m*t1)
t1
(14)
2
Advantage of the algorithm: The most significant
advantage of s-curve acceleration/deceleration based on
reference table is that it reduces much time taken by
2  t  2 d1
133
Res. J. Appl. Sci. Eng. Technol., 4(2): 131-134, 2012
Table 2: Rreference table for test
0
10
20
0
500
2000
0
1
13
30
4500
45
40
8000
106
50
12500
208
Table 3: Values of d1 and Lb in experiments
Group 1 Group 2
Group 3 Group 4 Group 5
Group 6
d1 = t1/2
d1 = t1/2 d1 = t1
d1 = 2t1
d1 = 4t1
d 1 = t1
Lb= La
Lb = La
Lb = 2La Lb = 3La/2 Lb = 3La/2 Lb = 3La/4
60
17000
356
0.42
56
56
61
56
0.41
110
110
98
56
100
25000
1250
0.44
0.43
98
90
24500
1001
0.45
Use formula
97
80
23000
763
0.46
Use reference table
98
70
20500
545
0.40
0.39
65
1
2
3
4
5
6
Fig. 3: Time reduction rate
1
2
3
4
5
formulae. Then time reduction rate is defined as (tf-tt)/tf.
The time reduction rate of the experiments is shown in
Fig. 3.
6
Fig. 2: Results of experiments
calculating every point Ti, Vi and Pi. There is only simple
subtraction, multiplication in the process of computation.
Square calculation, cube calculation and complicated
formulae which make the process of computation timeconsuming are avoided. The algorithm also could meet
the needs of actual conditions.
CONCLUSION
S-curve acceleration/deceleration based on reference
table guarantees the movement of machine is smooth.
Meanwhile the algorithm reduces the time taken by
calculating PVT data. The implement of the algorithm is
simple. It meets the demands of LED high-speed bonding
system.
The comparison of using reference table and using
formula on efficiency: To test the algorithm, set J =
10000000, t1 = 100 ms. Then reference table as is shown
in Table 2 can be obtained from (1) (2) (3). Values in the
first column of the table are arbitrary. These values would
not be used in the process of calculation. Units of
measurement in reference table are as follows:
REFERENCES
Hu, L., S.L. Lin, J.M. Xu and H. Dong, 2010. A new
speed control algorithm for s-curve acceleration
deceleration. Modular Machine Tool Automatic
Manufacturing Technique, 1: 22-26.
Li, X., Y. Wu and H. Leng, 2007. Research on a new Scurve acceleration and deceleration control method.
Modular Machine Tool Automatic Manufacturing
Technique, 10: 50-53.
Xuguang, S., X. Bugong, X. Wei and L. Boren, 2008.
Design and Implementation of S-shape
Acceleration/Deceleration Algorithm based on
Rounding Error Compensation Tactic.
Zhang, B., W. Gao, L. Shen and Q. Yan, 2009. The study
of new s-curve accelaration/decelaration arithmetic.
Machine Tool Hydraulics, 10: 27-29.
Time: ms, velocity: count/s, position: count
In order to make a comparison comprehensively, six
experiments in which parameters d1 and Lb are deferent
are made. Values of parameters in the experiments are
shown in Table 3. The results of the experiments are
shown in Fig. 2. Unit of time in Fig. 2 is millisecond.
As can be seen from Fig. 2, the time taken by
computing PVT data by means of reference table is much
shorter than that by means of formula.
Donate tt as the time taken by computing PVT data
by means of reference table and tf as that by means of
134
Download