Procedia Manufacturing Volume XXX, 2015, Pages 1–10 43rd Proceedings of the North American Manufacturing Research Institution of SME http://www.sme.org/namrc Exponential and Sigmoid-Interpolated Machining Trajectories Christopher DiMarco1*, John C. Ziegert2†, and Christopher Vermillion3‡ 1,2,3 The University of North Carolina at Charlotte, Charlotte, NC, USA. cdimarc1@uncc.edu, jziegert@uncc.edu, cvermill@uncc.edu Abstract In single-point metal turning and boring processes, a chip nest can often be created that is a hazard to part and operators alike. In order to mitigate this, a process called modulated tool path (MTP) machining was developed that superimposes a sinusiodal motion tangent to the feed direction onto the tool feed path to break chips. The sinusoidal motions are created under CNC control in the part program. In the current implementation, the sinusoidal motion is approximated as a series of short linear moves. Linear Interpolation is currently used to create position and velocity commands to the axis servomotors at each control loop closure. Linear interpolation is a computationally heavy and dated method that is not well tailored to a sinusoidal trajectory. In this paper a new method called the sigmoidal interpolator is introduced that honors all physical constraints of a machining system while offering better tracking performance and lower accelerations than the linear interpolator, all while reducing the number of possible state transitions of the implemented software from approximately 17 to 4. Keywords: Machining, Trajectory Planning, Tool Path Generation, Interpolation Techniques 1 Introduction Metal turning and boring processes can often lead to a 'chip nest,' or a long strand of metal that can wrap around the tool tip or part. A chip nest can damage the part finish and also presents a safety hazard, as machine operators removing the nest can be injured by the razorsharp strand (see Figure 1). One solution to this issue Figure 1: A chip nest forming on a machine is called Modulated Tool Path (MTP) machining, a process by which the tool tip is oscillated in the tool during a turning operation. After a few moments of cutting, these razor sharp strands become tangled with the tool and workpiece. * Graduate Research Student, Center for Precision Metrology Instructor, Center for Precision Metrology ‡ Instructor, University of North Carolina at Charlotte † Selection and peer-review under responsibility of the Scientific Programme Committee of NAMRI/SME c The Authors. Published by Elsevier B.V. 1 Exponential and Sigmoid-Interpolated Machining Strategies Dimarco, Ziegert, and Vermillion Position (units) direction of the instantaneous tool feed motion. A new chip is formed each time the tool enters and exits the cut (Woody, et al., 2012). In a single-axis tool path where a normal cutting motion is a position versus time ramp, the oscillation is added by superimposing a sinusoid on the ramp. The frequency and amplitude of the oscillation, as well as the spindle speed, control the length of the chip that is removed and can also have an impact on the surface finish of the part (Berglind & Ziegert, 2013). The NC part program generally only provides the start and end coordinates of linear moves along with the desired feed rate during that move. The servo-control system requires a position and velocity to be specified at each closure of the control loop. These intermediate points and velocities are generated by an interpolation algorithm built into the controller. There are many interpolator implementations. When smooth and vibration-free motions are desired, it is common to use an algorithm that places limits on allowable jerk, while simultaneously respecting the physical acceleration and velocity capabilities of the machine. This algorithm is outlined by Altintas (Altintas, 2012). When it is desired to maximize fidelity to the nominally commanded path, the jerk curve is rectangular with only three values for jerk, j(t): ±jlim, or zero. This in turn leads to a trapezoidal-shaped acceleration profile with no discontinuities that would require instantaneous changes in the force or torque. The velocity and position profiles take on parabolic and cubic characteristics respectively. A maximum acceleration may also be instituted, but often it is directly evaluated from the maximum allowable jerk (Altintas, 2012). A sample singleaxis trajectory is shown below in Figure 2. Linearly Interpolated Trajectories 4.5 The linear interpolator is the subject of a significant body of literature. 4 Researchers seeking to improve machine 3.5 positioning performance have investigated advanced controller design (Koren & Lo, 3 1992), improving contour accuracy (Lee, 2.5 2005) (Ramesh, et al., 2005), input 2 shaping (Peleaz, et al., 2004), and high performance (Kim & Chung, 2005). While 1.5 the linear interpolator is conceptually 1 simple, practical implementation relies on Interpolated Trajectory 0.5 a large network of if/then statements to Target Trajectory determine at what times during each move 0 0 0.2 0.4 0.6 0.8 1 to switch from one jerk value to another in Time (s) order to assure the axis reaches the desired Figure 2: A sample linear interpolated movement. The green future positions and velocities without overshoot. This requires approximately 17 line is the desired movement as provided by the NC program. The different branching conditions for all blue curve is the jerk-limited linear interpolator output. possible states of position, velocity, acceleration, and jerk. Since branch conditions are the most expensive processes in terms of computing time, this invariably leads to large computation time costs. Secondly, there is often an interpolator delay created by the acceleration and jerk limitations that is never recouped. In Figure 2, this is readily seen by the growing time differential between the desired curve (green) and the interpolated curve (blue). Typical linear interpolator implementations accept that the idealized motions embodied in the part program are physically unrealizable because the instantaneous velocity changes would require infinite acceleration, and make no attempt to bring the actual tool trajectory back onto the idealized motion when away from the transients at the beginning and end of each segment. This paper reviews strategies for jerk and acceleration limited trajectory planning called the exponential interpolator developed by Rymansaib (Rymansaib, et al., 2013), and proposes a sigmoidal interpolator to replace the planning previously done by linear interpolators at transitions. This technique 2 Exponential and Sigmoid-Interpolated Machining Strategies Dimarco, Ziegert, and Vermillion will be shown to be more appropriate for periodic inputs, as well as being useful for standard machining processes, and requiring fewer branching conditions. 2 Sigmoidal Interpolators Conceptually, the proposed interpolator works by multiplying the nominal motions described in the NC part program by a sigmoidal, or S-shaped, “blending” function that smoothly transitions from zero to one, one to zero, or zero to one and back to zero. The result is a continuously differentiable curve that obeys the initial conditions of the commanded motion and reaches the desired nominal trajectory when the value of the function reaches one. Many sigmoid-type functions exist, including the logistic function, the arctangent, the hyperbolic tangent, and the error function. Slightly different implementations are used for the case of startup from rest, and transition from one commanded velocity to another. 2.1 Startup For Modulated Tool Path machining, each motion segment is composed of a linear component for nominal feed and a superimposed sinusoidal component for chip breaking. Making use of superposition, these two components can be evaluated separately and then summed to get position, velocity, acceleration, and jerk values. Linear Component. The linear component of the exponential interpolator is detailed here, as well as by Rymansaib (Rymansaib, et al., 2013). The baseline path for the interpolator to match is given by the linear equation in (1) below, where x is the resulting position and m is the linear slope: x = mt + b (1) For initial startup, the equation for the sigmoid interpolator, SL is: 3 SL = 1 − e−αt (2) where α is a time constant, and t is the time. The order of the time variable t is chosen as 3 to maintain a zero value at t=0 for acceleration, as will be shown below. This leads to a sigmoid interpolated position value xL of: 3 xL = xSL = (mt + b)(1 − e−αt ) (3) Note that at t = 0 and for sufficiently large values of t, x L= x. The velocity, ẋL, is: 3 𝑥̇ 𝐿 = m − e(−αt ) (m − 3αmt 3 − 3αbt 2 ) (4) The velocity is equal to 0 at t=0, and asymptotically approaches the commanded feedrate, m. The value of α determines how quickly this occurs. Differentiating a second time, the acceleration, ẍL, is equal to: 3 𝑥̈ 𝐿 = e−αt (−9α2 b𝑡 4 − 9α2 m𝑡 5 + 6αbt + 12αmt 2 ) (5) Again, at t=0, the acceleration is equal to zero. With ẍL limited to a physically realizable maximum acceleration and the values of t known for the movement, the maximum allowable value for α can be determined using a numeric solver. 3 Exponential and Sigmoid-Interpolated Machining Strategies The linear paths generated by the interpolator are shown below in Figure 3. Note that the sigmoidal interpolator causes the feedrate of the tool to exceed the desired value for some period of time and it tries to “catch up” to the commanded trajectory. As α increases, the planned trajectory more quickly reaches the desired path. Dimarco, Ziegert, and Vermillion Sigmoidal Interpolator - Linear Component 10 9 8 Position (units) 7 6 5 4 3 Sinusoidal Component. The desired sinusoidal motion is given by: Target =1 =3 =5 2 1 x = A sin(ωt) (6) 0 0 0.5 1 1.5 2 Time (s) 2.5 3 3.5 where A is the sine wave amplitude and ω Figure 3: The linear exponential component of the is the angular frequency. As with the linear interpolator. As α increases, the trajectory more rapidly component, the sinusoidal component is approaches the desired path (the black dashed line). multiplied by a sigmoidal function to control velocity and acceleration. The form is similar: 2 SS = 1 − e−αt (7) However, the order of t is decreased to 2 as it is not required to be increased to maintain zero acceleration at time step zero once coupled with the sinusoid. Multiplying these together yields the position equation for the sinusoidal component: 2 xS = xSS = (A sin(ωt))(1 − e−αt ) (8) Differentiating twice yields the velocity and acceleration equations, respectively: 2 2 𝑥̇𝑆 = 2Aαte−αt sin(ωt) − Aωe−αt cos(ωt) + Aω cos(ωt) 2 2 𝑥̈𝑆 = −𝐴𝑒 −𝛼𝑡 [4𝛼 2 𝑡 2 sin(𝜔𝑡) + 𝜔2 𝑒 𝛼𝑡 sin(𝜔𝑡) − 2𝛼 sin(𝜔𝑡) − 4𝛼𝜔𝑡𝑐𝑜𝑠(𝜔𝑡) − 𝜔2 sin(𝜔𝑡)] (10) At t=0, both velocity and acceleration are zero. As with the linear component, since all values other than α are known, a maximum feasible can be computed numerically ensuring that the resulting trajectory does not exceed acceleration or velocity limits. An example of the interpolated trajectory for α values from 1 to 5 is shown in Figure 4. Sigmoidal Interpolator - Sinusoid Component 0.2 0.15 0.1 Position (units) (9) 0.05 0 -0.05 Target =1 =3 =5 -0.1 -0.15 -0.2 0 0.5 1 1.5 2 Time (s) 2.5 3 The linear component and sinusoidal components are combined to create an MTP path, as shown below in Figure 5. 3.5 Figure 4: The sinusoidal exponential component of the interpolator, shown with three α values. 4 Exponential and Sigmoid-Interpolated Machining Strategies Dimarco, Ziegert, and Vermillion 2.2 Sigmoid Interpolator at Transitions At a transition point where a change in the feed velocity or direction is desired, a different approach can be used since the desired trajectory is a continuous curve. The interpolator utilizes two sigmoids to create a composite function that sweeps smoothly and asymptotically from 0 to 1 and back again to zero. The sigmoid equation is: Sigmoidal Interpolator - Combined 10 9 8 Position (units) 7 6 5 4 3 Target =1 =3 =5 2 1 S= 1 1 (11) + e−α(t−c) where c is the transition point (in time) when the function equals one, and α is again the time constant that controls how Figure 5: Combined linear/sinusoidal exponential fast the transitions occur. A positive α is components. Higher α more rapidly approaches the desired path used for the increasing portion of the curve (black dashed line). and a negative one for the outgoing. At t=c, both curves contribute exactly half of their total value to the position at c, guaranteeing the correct transition point is reached. Unfortunately, this does not ensure a zero velocity at the transition point, which is imperative for direction switching. To counteract this a correction term must be solved for and added to the sigmoid: 0 0 0.5 1 1.5 2 Time (s) 2.5 3 Sin = Sout = 3.5 𝑎 (12) a+e−α(t−c) 𝑏 𝑏 + e−α(t−c) (13) where a and b are the incoming and outgoing correction coefficients, respectively. The input and output trajectories each have a separate correction term that is derived from twoCrossover constraints Sigmoid @ c = to 5 be enforced on 1 the transition. Firstly: 0.83 0.9 a-Sigmoid (14) S𝑖𝑛 (c) + S𝑜𝑢𝑡 (c) = 1 3 0.8 b-Sigmoid Transition Time 0.7 Sigmoid Value Values of a and b can be chosen to shape the blending of the incoming and outgoing curves, where a = b = 1 will reflect an even blending throughout the transition, a > b will reflect a late transition, and b > a will reflect an early transition. In particular, values of a and b can be chosen by first selecting the desired blending ratio at the transition midpoint c as R = Sin^des(c) / Sout^des(c). Since Sin (c) = a/(1+a) and Sout (c) = b(1+b), we can achieve Sin(c) / Sout(c) = R by selecting a and b as shown below: 0.6 0.5 0.4 0.16 7 0.3 0.2 0.1 0 0 2 4 6 8 10 Time (s) Figure 6: Corrected Sigmoid Values at Transition – The blue curve is the value of the incoming segment and the green curve is the outgoing segment. 5 Exponential and Sigmoid-Interpolated Machining Strategies Dimarco, Ziegert, and Vermillion 𝑎=𝑅 𝑏= (15) 1 (16) 𝑅 Note that these values are unaffected by α, and that velocity and acceleration Incoming Trajectory 5 may increase even if the outgoing Outgoing Trajectory Sigmoid Curve trajectory is decreasing. Also, it is 4 unnecessary to perform this correction on 3 trajectories continuing in the same 2 direction. An example of a sigmoid 1 calculated in this manner is shown in Figure 6. Using these Sin and Sout values, an 0 acceleration and jerk-limited curve passes -1 smoothly through the transition point and -2 does not overshoot or gouge the part in any -3 portion of the transition, as shown below in Figure 7. -4 0 2 4 6 8 10 As for the sinusoidal component of the Time (s) path, care must be taken so that the Figure 7: Sigmoid transition from 1:5 slope to -1:1 slope. At time t=5, the transition has achieved its target point and does not oscillation does not gouge the part when nearing transition points. To prevent this, exceed it. using (12) and (13) with a c value away from the transition point coupled with an a or b value that is very small (but not zero) will remove the sine component from the transition trajectory. This method can also be used to end a move. Sigmoid Transition X Position (units) 6 3 Results 3.1 Exponential Interpolation of MTP Paths As shown in the figures below, the two methods of trajectory interpolation produce vastly different results, especially at low acceleration limits. Figures 8-11 show that tracking is similar between the two at high acceleration limits, but a time delay still exists from the intended path. Linear Interpolator - High Acceleration Limit Linear Interpolator - Low Acceleration Limit 3.5 4 Linear Interpolator Target Trajectory 3.5 3 2.5 Position (units) Position (units) 3 Linear Interpolator Target Trajectory 2.5 2 1.5 2 1.5 1 1 0.5 0.5 0 0 0.5 1 1.5 2 Time (s) 2.5 3 3.5 Figure 9: Linear Interpolator Trajectory with a low acceleration limit. 6 0 0 0.5 1 1.5 2 2.5 Time (s) 3 3.5 4 Figure 8: Linear Interpolator Trajectory with a high acceleration limit. Exponential and Sigmoid-Interpolated Machining Strategies Sigmoid Interpolator - High Acceleration Limit Sigmoid Interpolator - Low Acceleration Limit 3.5 3.5 Target Trajectory Sigmoid Interpolator 3 3 Target Trajectory Sigmoid Interpolator 2.5 Position (units) 2.5 Position (units) Dimarco, Ziegert, and Vermillion 2 1.5 2 1.5 1 1 0.5 0.5 0 0 0.5 1 1.5 2 Time (s) 2.5 3 0 0 3.5 Figure 10: Sigmoid Interpolator with a low acceleration limit. 0.5 1 1.5 2 Time (s) 2.5 3 3.5 Figure 11: Sigmoid Interpolator with a high acceleration limit. 3.2 Quantitative Performance Analysis In order to provide a fair, quantitative performance comparison of the baseline linear interpolator and the new sigmoidal interpolator, we defined a performance index, J, comprised of two terms, namely the tracking error and the tool acceleration. With the main concern being tracking error, a high value was placed on properly following the desired trajectory. A secondary concern was the acceleration of the system. This lead to a total performance index of the form: 𝑇 𝐽 = ∫0 [𝑘𝑒 (𝑦𝑑𝑒𝑠 − 𝑦𝑎𝑐𝑡 )2 + 𝑘𝑎 𝑎𝑐𝑐𝑒𝑙 2 ] 𝑑𝑡 (17) Cost Function Value (Tracking Error2) where T is the run time, ydes is the position to achieve, yact is the interpolated value passed to the controller at each loop closure, and accel is the instantaneous acceleration value. ke and ka are the weighting Linear Interpolator vs. Sigmoid Interpolator - Tracking/Acceleration coefficients for the error tracking and acceleration 3000 costs, respectively. A value of 1.7x107 was Linear Interpolator Sigmoid Interpolator chosen for ke, and ka was set to 1. The data below 2500 was generated for a ramped sinousoid of slope 3, amplitude 0.15, and frequency of 2Hz. 2000 1500 1000 500 0 0 50 100 150 200 250 300 Acceleration Limit (units/s2) Figure 12: Tracking Error – Linear vs. Sigmoid Interpolator. The sigmoid interpolator is the lower green curve, the linear interpolator is the upper blue curve. Error Tracking. Taken separately, the error tracking showed an improvement when compared to the linear interpolator over a range of acceleration limits. The exponential/sigmoidal interpolator has a significant advantage in error tracking at low acceleration limits; but as that value is increased, both interpolators tend toward similar cost values. The results are shown in Figure 12. 7 Exponential and Sigmoid-Interpolated Machining Strategies Dimarco, Ziegert, and Vermillion Achieved Acceleration ((max-achieved)2) 6 Acceleration Costs. As expected, both Linear vs. Sigmoid - Acceleration x 10 4 interpolators performed similarly with respect Linear Interpolator to acceleration costs, as they are both tracking 3.5 Sigmoid Interpolator similar curves. The sigmoid interpolator does 3 function slightly better as limits are increased, however. This can be attributed to the fact that 2.5 the linear interpolator is always chasing a 2 maximum value of acceleration and jerk, while the sigmoid is merely tracking what the 1.5 curve needs to be achieved. This leads to 1 continuous jerk profiles as opposed to the positive/negative/zero profile used by the 0.5 linear interpolator. The result is shown below 0 in Figure 13. 0 200 400 600 800 1000 When these two indices are combined and Acceleration Limit (units/s2) corrected with the ke and ka values, the result Figure 13: Achieved acceleration. The sigmoid curve is is shown in Figure 14 and paints a clear picture the lower, more efficient green curve. of the improved performance of the sigmoid interpolator. 6 Linear vs. Sigmoid - Combined Performance Combined Performance - (error2+accel2) 4 x 10 Alpha Value. The α value for the sigmoidal interpolator determines how quickly the planned trajectory approaches the desired path. For any particular path, an alpha value can be chosen that minimizes the cost of the movement. Plotting total cost vs. α value gives the curve shown below in Figure 15. The green line shows the cost associated with the linear interpolator for the same movement. As shown here, the minimized cost is less than a third of that of the linear interpolator. Linear Interpolator Sigmoid Interpolator 3.5 3 2.5 2 1.5 1 0.5 0 0 200 400 600 800 1000 Sigmoid Transition. At transition points, the sigmoid blend also performed well. For a back Figure 14: Combined tracking error and and forth movement of equal distances and acceleration achieved values for both interpolators. speeds (10 inches and 10 in/s, respectively) the linear interpolator displayed its two main problems: tracking error, and not reaching the intended position. With an acceleration max of 500 in/s, the sigmoid’s maximum allowable α was 50. Using similar values of ke, and ka, the performance difference was drastic. By this performance index, the sigmoidal transition was 30 times more efficient at tracking the target trajectory and lowering overall acceleration. See Figures 16 and 17 for detail. Acceleration Limit (units/s2) 4 Conclusion In this paper, an alternative to the linearly interpolated trajectory planner was proposed. The combined exponential and sigmoidal interpolator derived here has the capability to follow a prescribed path, honor physical (position, velocity, acceleration, jerk) constraints, and handle transitions without overshoot. It was compared against the linear interpolator in a single axis for a span of acceleration limits. In terms of tracking error, the sigmoid interpolator showed a 60% reduction in error for low 8 Exponential and Sigmoid-Interpolated Machining Strategies Sigmoid Performance vs. -Value Dimarco, Ziegert, and Vermillion Transitions - Sigmoid vs. Linear 785.14 10 9 785.12 8 785.1 7 785.08 Position (in) Performance Value (error2+accel2) Sigmoid Interpolator 785.06 785.04 6 5 4 3 785.02 2 785 784.98 Target Linear Interpolator Sigmoid Interpolator 1 0 X: 10 Y: 785 100 200 -Value 300 400 Figure 15: Sigmoid performance by alpha values 0 0 10 Position (in) 9.8 9.6 9.4 9.2 Target Linear Interpolator Sigmoid Interpolator 0.8 0.9 1 Time (s) 1.1 1.2 1 Time (s) 1.5 2 Figure 16: Sigmoid Transition vs. Linear Interpolator Transitions Transitions - Sigmoid vs. Linear 9 0.5 1.3 Figure 17: Sigmoid Transition vs. Linear Interpolator close-up acceleration maximums. As the limit of acceleration was increased, however, sigmoid interpolator error trended towards a similar value as the linear interpolator. Achieved acceleration was similar for both interpolators, at low acceleration limits, but as acceleration limits increase the sigmoid interpolator becomes increasingly more efficient, showing a 12% improvement in performance at 1000 units/s2 acceleration. When these metrics are combined it can be shown that the sigmoid interpolator has a better performance index across the tested range of acceleration limits. Using the sigmoid interpolator at a transition point with the same maximum acceleration limit (and calculating an optimal alpha value) as the linear interpolator showed a 30-fold improvement in performance. 4.1 Continued Work Future work in the exponential/sigmoidal interpolator can be done to improve transitions, to coordinate multi-axis moves, and validate this model on a live system. The proposed interpolator scheme has the potential to improve contouring accuracy and reduce cycle times. 9 Exponential and Sigmoid-Interpolated Machining Strategies Dimarco, Ziegert, and Vermillion References Altintas, Y. (2012). Manufacturing Automation: Metal Cutting Mechanics, Machine Tool Vibrations, and CNC Design, 1st Ed.. In: UK: Cambridge University Press, pp. 105-124. Berglind, L. & Ziegert, J. (2013). Chip Breaking Parameter Selection for Constant Surface Speed Machining. ASME 2013 International Mechanical Engineering Congress and Exposition Vol. 2B, p. V02BTO2A039. Kim, M. & Chung, S. (2005). A Systematic Approach to Design High Performance Feed Drive Systems. International Journal of Machine Tools and Manufacture, V45, pp. 1421-1435. Koren, Y. & Lo, C. (1992). Advanced Controllers for Feed Drives. CIRP Annals, Manufacturing Technology V41 N2, pp. 689-698. Lee, J. (2005). Design of Controllers for Improving Contour Accuracy in a High-Speed Milling Machine. PhD. Dissertation, Dept. Mech. Eng., University of Florida. Peleaz, G. et al. (2004). Input Shaping Reference Commands for Cartesion Machines. Control Engineering Practice, V13, pp. 941-958. Ramesh, R., Mannan, M. & Poo, A. (2005). Tracking and Contour Error Control in CNC Servo Systems. International Journal of Machine Tools and Manufacture, V45, pp. 301-326. Rymansaib, Z., Iravani, P. & Sahinkaya, M. (2013). Exponential Trajectory Generation for Point to Point Motions. Wollongong, Austrailia, s.n., pp. 906-911. Woody, B. et al. (2012). Methods and systems for chip breaking in turning applications using CNC toolpaths. USA, Patent No. 8,240,434. 10
© Copyright 2024