Prediction and Reduction of Cycle Time for Five-Axis CNC Machine Tools by Sneha Tulsyan B.Tech.(Hons.), Indian Institute of Technology Kharagpur, India, 2011 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF Master of Applied Science in THE FACULTY OF GRADUATE AND POSTDOCTORAL STUDIES (Mechanical Engineering) THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) November 2014 © Sneha Tulsyan, 2014 ii Abstract The growing demand for high speed machining in aerospace, automotive and die and mold industry has directed the interest of research community towards prediction and reduction of machining cycle time. In this thesis, a cycle time prediction scheme is proposed for milling operations based on identified CNC machine dynamics in exact-stop and continuous mode. Various system identification techniques are utilized to identify the implemented trajectory generation and corner smoothing technique and feed drive dynamics of the CNC system. An analytical approach for predicting cycle time based on the identified CNC system dynamics and given part program is presented. It is shown that the cycle time of NC machining process is predominantly affected by trajectory generation and corner smoothing techniques implemented on CNC systems. The closed-loop feed drive dynamics does not have much influence on the cycle time, since the tracking delay is insignificant in position control servos. The proposed algorithm is validated in experiments and experimental results has shown that the cycle time prediction error remains within 5% for various 2-axis, 3-axis and 5-axis toolpaths. In the later half of the thesis, a new decoupled approach for five-axis corner smoothing is presented to reduce the cycle time of milling operations. Toolpath position and orientation are smoothed by inserting quintic and normalized septic micro-splines, respectively between the adjacent linear toolpath segments. Optimal control points are calculated for position and orientation splines to achieve continuity at the junctions between the splines and the linear segments while respecting user-defined corner position tolerance and orientation tolerance limits. Synchronization of position and orientation splines is carried out. After geometrical modification of the toolpath, feedrate planning is performed using continuous cubic acceleration feedrate profile to preserve jerk continuity in toolpath motion. The proposed continuous toolpath motion is compared against the unsmooth and continuous motion in experiments and simulations to show improvements in cycle time, tracking accuracy and smoothness throughout the toolpath. iii Preface This dissertation is original intellectual property of the author, Sneha Tulsyan, under supervision of Professor Yusuf Altintas. This work has been completed in the Manufacturing Automation Laboratory at the University of British Columbia. A version of Chapter 3 is presented in Machine Tool Technologies Research Foundation (MTTRF) IAM-CNC Annual Meeting 2014. The work is also published in the proceedings of MTTRF 2014 meeting [Tulsyan S, Yuen A, Altintas Y. Estimation of NC Cycle Time for Free-Form Milling Operations on Commercial CNC Machining Centers. The Proceedings of MTTRF 2014 Meeting, pp.239-244]. I was the lead investigator, responsible for experiment design, data collection and the major development of identification algorithm and manuscript. Alexander Yuen was responsible for editing the manuscript. Professor Yusuf Altintas was the supervisory author on this project and was involved in problem statement formulation, supervision throughout the project and manuscript editing. A version of Chapter 4 is going to be submitted for publication. iv Table of contents Abstract .......................................................................................................................................... ii Preface ........................................................................................................................................... iii Table of contents .......................................................................................................................... iv List of tables................................................................................................................................. vii List of figures .............................................................................................................................. viii Acknowledgements ...................................................................................................................... xi Chapter 1: Introduction ................................................................................................................1 Chapter 2: Literature review ........................................................................................................3 2.1 Overview ......................................................................................................................... 3 2.2 Cycle time prediction for CNC milling operation .......................................................... 3 2.2.1 Using NC program information .................................................................................. 4 2.2.2 Using material removal rate ........................................................................................ 4 2.2.3 Using machine characteristics and part program ........................................................ 5 2.3 Geometrical toolpath smoothing ..................................................................................... 8 2.3.1 Global toolpath smoothing .......................................................................................... 8 2.3.2 Local toolpath smoothing ......................................................................................... 10 2.3.2.1 Three-axis corner smoothing ............................................................................ 10 2.3.2.2 Five-axis corner smoothing............................................................................... 11 2.4 Summary ....................................................................................................................... 12 Chapter 3: Cycle time prediction for milling process...............................................................14 v 3.1 Overview ....................................................................................................................... 14 3.2 Modeling dynamics of CNC systems ........................................................................... 15 3.2.1 Identification of trajectory parameters ...................................................................... 18 3.2.2 Prediction of corner smoothing technique ................................................................ 27 3.2.3 Identification of closed-loop feed-drive dynamics ................................................... 28 3.3 Cycle time estimation ................................................................................................... 36 3.4 Experimental validation ................................................................................................ 41 3.5 Summary ....................................................................................................................... 45 Chapter 4: Five-axis corner smoothing for CNC system .........................................................47 4.1 Overview ....................................................................................................................... 47 4.2 Toolpath position smoothing ........................................................................................ 48 4.2.1 Parametric position micro-spline .............................................................................. 48 4.2.2 Optimal control point calculation for position micro-spline ..................................... 53 4.2.2.1 Acceleration and jerk continuity at junctions ................................................... 54 4.2.2.2 Pre-defined position error tolerance limit, εpos ............................................... 59 4.3 Toolpath orientation smoothing .................................................................................... 62 4.3.1 Parametric orientation micro-spline .......................................................................... 64 4.3.2 Optimal control point calculation for orientation micro-spline ................................ 66 4.3.2.1 Velocity, acceleration and jerk continuity at junctions ..................................... 67 4.3.2.2 Pre-defined orientation error tolerance limit, εori ............................................ 74 4.3.2.3 Synchronisation of position and orientation spline ........................................... 75 4.4 Feedrate planning .......................................................................................................... 78 vi 4.5 Experimental results...................................................................................................... 84 4.6 Summary ....................................................................................................................... 93 Chapter 5: Conclusions and future work ..................................................................................95 5.1 Conclusions ................................................................................................................... 95 5.2 Future research directions ............................................................................................. 97 Bibliography .................................................................................................................................98 vii List of tables Table 3.1 Trust region parameter estimates .................................................................................. 24 Table 3.2 Identified closed loop feed-drive dynamics of Mori Seiki NMV5000 CNC system.... 34 Table 3.3 Experimental and predicted cycle time ......................................................................... 45 Table 4.1 Plant parameters for Fadal VMC 2216 ......................................................................... 86 Table 4.2 PID controller parameters ............................................................................................. 86 Table 4.3 Percentage improvement in tracking error .................................................................... 93 viii List of figures Figure 3.1 Flow of commands in Commercial CNC System ....................................................... 15 Figure 3.2 Feedrate profile for exact-stop and continuous mode ................................................. 16 Figure 3.3 Configuration of Mori Seiki NMV5000 DCG commercial machining center [29] .... 17 Figure 3.4 Kinematic profiles of Mori Seiki NMV5000 .............................................................. 19 Figure 3.5 Convergence of cost function in Trust-region algorithm ............................................ 23 Figure 3.6 Convergence of Trust-region size in Trust-region algorithm ...................................... 23 Figure 3.7 Experimental feedrate profile in (i) Exact-stop mode, (ii) Continuous mode ............. 27 Figure 3.8 Predicted feedrate profile in Continuous mode ........................................................... 28 Figure 3.9 Control block diagram of Mori Seiki NMV5000 feed-drive system .......................... 29 Figure 3.10 Experimental velocity loop FRF of X-drive of Mori Seiki NMV5000 DCG CNC system ........................................................................................................................................... 30 Figure 3.11 Experimental and identified closed loop frequency response function of X-axis ..... 33 Figure 3.12 Experimental and identified closed loop FRF ........................................................... 35 Figure 3.13 Overview of proposed cycle time prediction scheme................................................ 40 Figure 3.14 Test 2-axis toolpath profile ........................................................................................ 41 Figure 3.15 Effect of closed loop feed-drive system on feedrate profile and cycle time ............. 42 Figure 3.16 Experimental and predicted feedrate profiles in exact stop mode ............................. 43 Figure 3.17 Experimental and predicted feedrate profiles in continuous mode ........................... 43 Figure 3.18 Experimental and predicted trajectory profiles ......................................................... 44 Figure 4.1 Trajectory generation for five-axis corner smoothing ................................................. 49 ix Figure 4.2 Decoupled method of five-axis corner smoothing ...................................................... 50 Figure 4.3 Plot of basis function corresponding to different control points for quintic B-Spline .... ....................................................................................................................................................... 52 Figure 4.4 Toolpath position smoothing using quintic B-spline .................................................. 54 Figure 4.5 Constraints for acceleration and jerk continuities at junctions .................................... 55 Figure 4.6 Location of position control points based on continuity and error tolerance constraints....................................................................................................................................................... 61 Figure 4.7 Toolpath orientation smoothing using Normalized Heptic B-Spline .......................... 63 Figure 4.8 Basis functions of Heptic and Normalized Heptic B-Spline ....................................... 65 Figure 4.9 Constraints for velocity, acceleration and jerk continuities at junctions for orientation spline ............................................................................................................................................. 66 Figure 4.10 Synchronization of position and orientation spline ................................................... 76 Figure 4.11 Lengths of toolpath segments .................................................................................... 78 Figure 4.12 Cubic acceleration feedrate profile ............................................................................ 80 Figure 4.13 Different methods of interpolating along a given spline toolpath ............................. 81 Figure 4.14 Adaptive approach of formulating feed correction spline u(s) ................................. 82 Figure 4.15 Kinematic configuration of 5-axis CNC machining center ....................................... 84 Figure 4.16 Experimental test bed consisting of the Fadal VMC 2216, Nikken 130-AX compact tilting table and dSPACE open real-time controller ..................................................................... 85 Figure 4.17 Control law and modelled plant for five-axis corner smoothing experiments .......... 87 Figure 4.18 Test toolpath for five-axis corner smoothing experiments ........................................ 87 Figure 4.19 Toolpath position and orientation error in reference command generation............... 88 x Figure 4.20 Experimental tangential feedrate profile before and after corner smoothing ............ 90 Figure 4.21 Jerk of axis reference commands for experiments .................................................... 91 Figure 4.22 Experimental average axis tracking error from encoder measurements ................... 92 xi Acknowledgements I would like to express my sincere gratitude towards my supervisor Prof. Yusuf Altintas for the valuable guidance and support he has provided throughout my research and course work. As this is my first research experience, I would also like to thank him for enlarging my vision and mentoring me in the process of becoming an excellent researcher. I would also like to thank my colleagues in Manufacturing Automation Laboratory for sharing their knowledge and experience with me, especially in the initial few months when I was not very familiar with the lab equipment. I would particularly like to thank Gurbachan S Sekhon and Alexander Yuen to help me carrying out experiments. Finally, I would like to thank my family and friends for their endless moral support during my abroad study. I would like to dedicate this thesis to my beloved parents. This research was sponsored by Natural Science and Engineering Research Council of Canadian Network for Research and Innovation in Machining Technology (NSERC CANRIMT) and Machine Tool Technologies Research Foundation (MTTRF). Chapter 1: Introduction 1 Chapter 1: Introduction Five-axis computer numerical control (CNC) machine tools are widely used for manufacturing of sculptured surfaces in aerospace, die and mold industries. It facilitates machining of complex surfaces which are otherwise difficult to machine using conventional three-axis CNC machine tools. In the context of five-axis CNC machining, there is a growing demand for the increased productivity as the manufacturing cost of the final product is directly proportional to the time taken to manufacture it. The prediction and optimization of cycle time for milling free form surfaces is therefore essential in comparing the performances of various five-axis machine tools. Cycle time which essentially is the sum of primary cutting and auxiliary non-cutting motions for manufacturing a specific part, depends upon a number of factors such as toolpath, commanded feedrate, feedrate planning, geometry modification algorithm, CNC machine capabilities in terms of maximum achievable feedrate, acceleration, jerk, etc. Knowing the exact cycle time in advance leads to more accurate production process planning which in turn, greatly affects the performance of a shop floor from production economics perspective. Besides, it can also be used by product designers to improve and optimize the design of products and to find optimal tool path strategy to machine a component. Parallel to cycle time prediction, research interest in the field of cycle time optimization has also gained momentum. Reducing the manufacturing cycle time has benefits including reduced cost, lower inventory, improved flexibility and faster response to customer order. One of the ways to address this is to improve the feedrate, acceleration and jerk limits of the drive. Other possibility is to optimize the toolpath. For a given machine tool and toolpath, the cycle time can be further improved by geometrical smoothing of the path which is otherwise, generally composed of a series of linear toolpath segments, also called as G01 commands. Traditionally, tool motion is allowed to cease at all the block transitions which results in higher cycle time and productivity suffers. It should be noted that if the tool is commanded to maintain its speed across the corners, Chapter 1: Introduction 2 discontinuities are created in velocity, acceleration and jerk commands due to geometrical discontinuities in the toolpath which will result in high impact load on the feed drives causing machine tool vibrations and poor surface quality. In order to maintain a non-zero feedrate across corners while respecting feed drive acceleration and jerk bounds, the toolpath geometry needs to be smoothed such that the modified toolpath has finite curvature over its entire extent. Commercial CNC systems appear to have some corner smoothing algorithms such as injecting circular path at sharp corners. However, the smoothing needs to ensure that velocity, acceleration and jerk limits of the servo drives must not be violated. The objective of this research work is to develop models to predict and optimize machining cycle time of five-axis CNC machine tools by considering smooth trajectory transitions at sharp corners. The rest of the thesis is organized as follows: The review of relevant literature in the field of cycle time prediction and toolpath smoothing is presented in chapter 2. In chapter 3, a new cycle time prediction algorithm based on NC program, trajectory profile, drive limits, geometry modification algorithm and machine characteristics is proposed for accurate estimation of machining time for milling free form surfaces. This is followed by a novel decoupled approach to achieve local corner smoothing by inserting micro-splines between adjacent linear toolpath segments for five-axis CNC machine tools. Constraint equations are formulated to ensure continuity (continuous jerk) throughout the toolpath while respecting user-defined position and orientation corner tolerance as presented in chapter 4. Chapter 5 concludes the thesis stating the summary, contributions and possible future research direction. Chapter 2: Literature Survey 3 Chapter 2: Literature review 2.1 Overview This chapter is dedicated to present an overview on state of the art in the field of cycle time prediction for milling free form surfaces and cycle time optimization by local toolpath smoothing for three-axis and five-axis machine tools. Cycle time prediction techniques available in the literature can be broadly classified into three categories (1) Cycle time prediction based on NC program, (2) Using material removal rates to forecast machining time and (3) Cycle time prediction considering machine characteristics and part program. Due to the inconsistent nature and unacceptable prediction error caused by first two approaches, most of the work in past decade is based on the third approach. Section 2.2 presents a more descriptive overview on various cycle time prediction techniques available in the literature. This is followed by Section 2.3 which covers the existing literature on toolpath smoothing techniques. Various global and local toolpath smoothing techniques are available in the literature. Although global smoothing techniques can be employed to reduce the machining time and generating smooth toolpath across given CAM points, the main disadvantage of this technique is the mathematical complexity involved to control and evaluate the exact fitting error. The challenge with the local smoothing approach however, is to ensure continuity at the junction between the corner rounding curve and the linear segment while respecting pre-defined error tolerance limit. Due to the relative maturity of three-axis local toolpath smoothing techniques, corner smoothing techniques that are present in literature for three-axis toolpath are reviewed first. This revision is extended to five-axis machine tools in the following subsection. The conclusions of the literature survey are presented in section 2.4. 2.2 Cycle time prediction for CNC milling operation Cycle time prediction for free-form milling operation has received strong attention during past decades. Cycle time can be defined as the sum of primary cutting and auxiliary non-cutting motions for manufacturing a specific part. It depends upon a number of factors such as toolpath, Chapter 2: Literature Survey 4 commanded feedrate, feedrate planning, geometry modification algorithm, CNC machine capabilities in terms of maximum achievable feedrate, acceleration, jerk, etc. Various cycle time prediction strategies were developed which can be broadly categorized into three groups i.e., (1) Using NC program information, (2) Using material removal rate and (3) Considering machine characteristics and part program. 2.2.1 Using NC program information Conventionally, the machining time has been evaluated by NC code and improved by increasing commanded feedrate. The ordinary CAM software estimates the machining time considering that the feedrate is kept constant as set in the NC program ignoring the limitations of machine tool [1]. However, CNC machining centers are widely used for high-speed cutting operations nowadays with commanded feedrates as high as 20,000 mm/min [2]. A study of an NC program used for mold cutting shows that the error in the evaluation by a conventional facility exceeds 36% when the commanded feedrate is 3000 mm/min or higher and the average per-block feed distance is about 4mm [3]. This is because for high speed operations, the feedrate varies considerably along the toolpath due to mechanical (inertia) limitations of machine tool, feedrate profiling and limitations implemented by machine tool manufacturers to protect machine tool from damage during high-speed motion. 2.2.2 Using material removal rate Othmani et al. [4] presented a method to calculate cutting time for complex geometry of contouring using linear or circular interpolation. The calculation method of cutting time is based on the ratio of the machined volume by the removed material rate during the contouring operation. This approach has been validated only for linear or circular interpolation. Hbaieb et al. [5] built an NC machining time forecasting model, using material removal rates to calculate rough machining time of a part in 2.5D milling operation. The proposed approach considered the roughing cutting time as the ratio of the pocket volume by removed material rate. The pocket is divided into volume distributed according to the real radial depth. However, the method is applicable only for pocket Chapter 2: Literature Survey 5 milling operation. Jung [6] developed a feature based machining time estimation system for machined parts. For this, manufacturing features are classified in four categories i.e., (i) rotational features, (ii) prismatic features, (iii) slab features and, (iv) revolving features. Machining time corresponding to each feature is estimated based on material removal rates. It must be noted that none of the above mentioned geometry based methods were able to predict cycle time for all range of milling operations consistently as trajectory generation algorithm used in CNC system is completely ignored. 2.2.3 Using machine characteristics and part program The cycle time prediction methods in this category can be further classified into three types. They are (1) Analytical evaluation, (2) Empirical evaluation and (3) Mechanistic evaluation. (1) Analytical evaluation: In this approach, machine parameters are obtained from machine configuration files and are then used to simulate machine working conditions. Dugas et al. [7] developed a machining simulator which estimated real feedrate in two stages. In static look ahead stage, feedrate limits are calculated for a given toolpath and CNC controller. In dynamic look-ahead stage, feedrate profile is calculated based on given look ahead value assuming trapezoidal feedrate profile. Yan et al. [8] calculated cycle time based on factors such as command feedrate, block feed distance and feed acceleration/deceleration. Mou et al. [9] discovered the weakness of commercial software tools like VeriCut in terms of NC program machining simulation, analyzed the acceleration and deceleration principle of 840D Siemens numerical control system and developed a new NC program machining time simulation algorithm. So et al. [10] presented a machining time estimation algorithm based on feed angle, NC block processing time and ratio of translational to rotational motion for five-axis machine tools. However, the main disadvantage of analytical approach of time modeling is the need of the model parameters, such as drive time constants and gains. Such model parameters are set by the CNC manufacturer and might not be directly available to the machine tool user. The information about CNC implementation on the machines is also Chapter 2: Literature Survey 6 difficult to get. It can be related to the acceleration profile, moving accuracy, and positional precision and it interferes directly with machines capacity to move at high speed. Even when suppliers specify the block processing time and the time required for the CNC to close its control loop, overall time required for machining a free-form path at high speed can depend on other parameters: the combination of these, and the way it was implemented on the machine controller. Even similar machines could have different processing capabilities, in terms of feed rate, since some features of the CNC can be set differently for different machine. All information required to develop an analytical model for machining time prediction can become quite difficult to obtain, which may lead to very limited results. (2) Empirical evaluation: Empirical models are based on linear regression models that fit a polynomial expression to a cloud of experimental data. However, the major disadvantage of this approach is the large number of the experiments needed to capture the phenomenon. (3) Mechanistic evaluation: Mechanistic models are the middle ground between analytical models and empirical models. The mechanistic approach utilizes the knowledge about the underlying mechanisms to propose models with some calibration constants. The values of these constants are found through experimentation. Monreal et al. [11] studied the influence of the toolpath strategy on the cycle time of machining products. A mechanistic approach based on the comparison between the ideal cycle time and the experimental cycle time was proposed. However, this approach was validated only for pocketing operation with zig-zag toolpath. Taking this work as background, Coelho et al. [1] proposed a mechanistic approach to identify real capacity of any CNC machine configuration. The method considered a variable called machining response time (MRT) which characterizes the real CNC machine’s capacity to move in high feedrates in free-form geometries. MRT of a specific CNC machine is obtained by conducting a series of experiments with the machine. This method is suitable for machining time prediction of surfaces whose curvature radius changes greatly. However, the proposed technique is valid only for toolpath consisting linear segments. Siller et al. [12] proposed a mechanistic approach for Chapter 2: Literature Survey 7 cycle time estimation in high speed milling of sculptured surfaces. The mechanistic model construction was based on: (a) the frequency distribution (histogram) of linear interpolation path lengths in the CNC program and (b) a characterization of the machine tool for brisk (large changes in tool path direction) and smooth movements (small changes in tool path direction). However, the proposed model resulted in upto 22% cycle time prediction error. Heo et al. [13] presented an NC machine time estimation model for machining sculptured surfaces, considering dynamic characteristics of the machine. The proposed estimation model used several factors, such as the distribution of NC blocks, angle between the blocks, federates, acceleration and deceleration constants, classifying tool feed rate patterns into four types based on the acceleration and deceleration profile, NC block length, and minimum feed rate. They are profiles having (i) only acceleration section, (ii) only deceleration section, (iii) acceleration and deceleration sections and (iv) acceleration, constant feedrate and deceleration sections. However, the lack of the measurement equipment or tools to gauge an exact minimum feed rate leads to an inaccuracy in the results. Moreover, it was assumed that acceleration limited feedrate profile is implemented on the CNC machine. This might not be the case considering various CNC controller manufacturers in the world. From the above presented brief survey on available literature in the field on cycle time prediction, it can be concluded that none of the present approaches could predict cycle time for all range of milling operations within acceptable prediction error consistently because most of them ignore the effect of trajectory generation and corner smoothing algorithm implemented on the CNC system. To address this problem, a cycle time prediction technique based on part program, identified trajectory generation and corner smoothing algorithm and feedrate, acceleration and jerk limits of the drive is proposed in this thesis which can be applied for time modelling of all range of milling operations involving 2-axis, 3-axis and 5-axis machining within 7-8 % prediction error. Chapter 2: Literature Survey 8 2.3 Geometrical toolpath smoothing In the literature, several articles deal with the smoothness of motion along the toolpath. Considering machine tool axes have acceleration and jerk limitations, geometrical smoothing of the toolpath profile needs to be achieved first to ensure the smooth motion. Once geometry is smoothed, feedrate planning can be performed using jerk continuous trajectory planning to produce a smooth motion along the toolpath. Depending on the context, the geometrical toolpath smoothing techniques available in literature can be broadly categorised into two groups i.e., (1) Global smoothing and (2) Local smoothing. If a portion of the tool path is composed of a high density of short segments, it is possible to approximate all the segments by a curve. On the other hand, if the tool path is composed of long segments, it is important to follow precisely these segments and thus each transition has to be locally smoothed. 2.3.1 Global toolpath smoothing Global smoothing has been widely studied in 3-axis and 5-axis cases. Different solutions can be used to smooth the orientation. Some of the suggested techniques are global toolpath smoothing using quaternions [14], drive movement smoothing [15], NURBS path interpolation [16] and decoupled position and orientation smooth curves [17] [18]. Ho et al. [14] proposed tool orientation smoothing technique using quaternion interpolation technique. For this, the initial representative tool orientations were assigned at crucial areas. This was followed by smooth interpolation of tool axis directions at general areas from the representative tool axis directions using the vector interpolation algorithm. In case interferences occurred, the representative tool axis directions were rearranged and new tool axis directions were interpolated. This process was repeated until all the tool axis directions passed the interference checking. Beudaert et al. [15] proposed a toolpath smoothing algorithm based on drive constraints. Velocity, acceleration and jerk limits of each drive were employed to compute an evaluation of the maximum Chapter 2: Literature Survey 9 reachable feedrate which was then used to localize the areas where the tool path had to be smoothed. These areas of high curvature were then smoothed iteratively in Machine Coordinate System (MCS) based on three parameters i.e., the tolerance on axis movement, the axis which has to be smoothed and the zone where it had to be smoothed. An N-buffer technique was also used to control the geometrical deviations on the part. Lei et al. [14] presented non-uniform rational B-spline (NURBS) path interpolation method to generate smooth toolpath along discrete CAM points. Fleisig and Spence [17] interpolated the toolpath position and orientation with independent quintic B-Spline and quintic spherical Bezier spline respectively. To prevent feed fluctuations on the position and orientation, the quintic splines representing position and orientation are optimized using near arc length parameterization technique. Since the position and orientation spline may have different lengths, an orientation re-parameterization spline is required to synchronize the interpolation of the position and orientation spline to a single parameter. The synchronizing spline is generated by assuming the path length as a linear chord, resulting in inaccuracies in orientations along highly curved path positions. Yuen et al. [18] presented a similar approach where the tool tip position and orientation was smoothed by fitting the position and orientation data to quintic splines in a decoupled fashion. The non-linear relationship between spline parameters and displacement along the path was approximated with ninth order and seventh order feed correction splines respectively. It is evident that global smoothing techniques are widely employed to reduce the machining time and generating smooth toolpath across given CAM points. However, it is mathematically complex to control and evaluate the exact fitting error in global toolpath smoothing technique. Moreover, global smoothing techniques cannot be directly applied for local corner rounding because several requirements cannot be fulfilled. First the contour and orientation modifications have to be controlled locally and precisely avoiding oscillations. Second, the continuity at the junction between the newly introduced corner rounding curve and the linear segment needs to be ensured for local smoothing technique. Chapter 2: Literature Survey 10 2.3.2 Local toolpath smoothing Local toolpath smoothing also called as “corner smoothing” is widely used to generate smooth and non-stop motion along the toolpath. In this technique, polynomial curves or splines are inserted between two adjacent linear segments to blend them together. The challenge with the local smoothing approach is to ensure continuity at the junction between the corner rounding curve and the linear segment while respecting pre-defined error tolerance limit. Several techniques have been presented in the literature for three-axis corner smoothing. Some of them are presented as follows. 2.3.2.1 Three-axis corner smoothing Local position smoothing has been widely studied for 3-axis machine tools. Indeed, different methods which give similar results are detailed in the literature. Some of the three-axis corner smoothing techniques available in literature are based on inserting cubic spline [19] [20] [21], quartic spline [22], quintic splines [23] [24] and conic smoothing segments [25] between adjacent linear toolpath segments. A continuous non-uniform cubic B-Spline with eight control points is used by Pateloup et al. [19] to adapt to the linear and circular interpolation of the toolpath segments. Zhao et al. [20] developed a methodology for generation of curvature continuous cubic B-spline with five control points as transition curve. continuity along the toolpath and real-time performance are considered simultaneously in this approach. Bi et al. [21] used cubic Bezier curves defined by four control points to round the corner. The curvature radii of all transition curves were globally optimized to pursue the high feed speed by a linear programming model. Yutkowitz and Chester [22] registered a patent with original assignee as Siemens Energy and Automation, Inc. describing a 3-axis corner rounding method based on inserting micro-spline between the adjacent linear toolpath segments. The inserted spline curve consists of two 4th order polynomial curves in parameter . Near-arc length parameterization technique was utilised. The constraint equations are formulated to ensure the magnitude of the curvature vector of the modified Chapter 2: Literature Survey 11 toolpath equals zero at the transition point between the linear toolpath and the inserted polynomial curve and it is maximum at the point of nearest approach to the sharp corner. Sencer et al. [26] developed curvature-continuous smoothing scheme which fitted minimum curvature quintic B-splines to blend adjacent lines for three-axis tool motion. The proposed transition scheme ensured continuity transitions and a minimum curvature geometry delivering the fastest cycle time without violating the axis acceleration limits for 3-axis motion. The cornering error was controlled analytically allowing the user to set the desired cornering tolerance. Erkorkmaz et al. [23] also used a 5th order quintic spline curve to smoothen the sharp transitions in the toolpath. Two spline fitting strategies i.e., (1) Under-corner approach, and (2) Over-corner approach were developed for smoothening sharp corners. While the under-corner approach can be employed where the objective is to reduce the toolpath length, and therefore the cornering time, the over-corner approach which was based on stretching out the sharp corner with a smooth curve, can be mostly used where the ‘undercut’ caused by the large phase lag in low bandwidth servo controllers needs to be counteracted. Ernesto et al. [25] employed a Bezier conic and optimized the feedrate along the curve under acceleration bounds. Each corner was smoothed by replacing a subset of the path that contains it with a conic “splice” segment such that the newly inserted segment respected the user-defined error tolerance limit. The feedrate variation on this segment was determined by minimizing the traversal time, under the constraint of the axis acceleration bounds. The properties of Bernstein-form polynomials were then exploited to approximate the problem as a straight forward linear programming problem. Most of the existing three-axis corner smoothing techniques give a satisfying corner rounding curve in terms of respecting corner tolerance error and continuity or smoothness of toolpath. However, none of these papers tried to extend their solution to 5-axis tool path which brings new challenges. 2.3.2.2 Five-axis corner smoothing While several local smoothing approaches are presented for three-axis toolpaths, there are still very limited works in the field of local toolpath smoothing for five-axis machine tools due to Chapter 2: Literature Survey 12 difficulties related to smoothing of orientation. To the best of the author’s knowledge, the only available work in the field of five-axis corner smoothing is presented by Beudaert et al. [27]. Buedaert et al. [27] presented five-axis corner smoothing method which was based on the representation of five-axis toolpath by a bottom curve defining the tooltip movement and by a top curve defining the tool orientation. Both the top and the bottom curves are smoothed separately to ensure second order acceleration continuity while respecting the user defined position and orientation tolerance limits. The spline parameter of the bottom curve is found by arc length parameterization technique. An optimization problem is formulated to evaluate to ensure smooth orientation connection. However, it was found that the proposed solution is very sensitive to even a tiny variation of the parameter which results in huge drop in feedrate. As the problem of five-axis corner smoothing is not well addressed in literature so far, a novel local toolpath smoothing technique is proposed in this thesis for five-axis machine tools where the objective is to achieve continuity at the junctions between the splines and the linear segments while respecting user-defined corner position tolerance () and orientation tolerance () limits. 2.4 Summary An overview of existing literature in the field of cycle time prediction and toolpath smoothing for three-axis and five-axis machine tools are presented in this chapter. Cycle time prediction techniques available in the literature is classified into three categories (1) Cycle time prediction based on NC program, (2) Using material removal rates to forecast machining time and (3) Cycle time prediction considering machine characteristics and part program. Due to the inconsistent nature and unacceptable prediction error caused by first two approaches, most of the work in past decade is based on the third approach which can be further classified into three categories i.e., (1) Analytical evaluation, (2) Empirical evaluation and (3) Mechanistic evaluation of cycle time. The main disadvantage of analytical approach of time modeling is the need of the model parameters, such as drive time constants and gains. Such model parameters are set by the CNC controller manufacturer and might not be directly available to the machine tool user. Empirical models Chapter 2: Literature Survey 13 which are based on linear regression models that fit a polynomial expression to a cloud of experimental data needs large number of the experiments to capture the phenomenon. However, the mechanistic models which are middle ground between analytical and empirical models are most commonly used for time modeling of milling operations. However, the mechanistic approaches available in literature could not predict cycle time for all range of milling operations within acceptable prediction error consistently. To address this problem, a cycle time prediction technique is proposed in this thesis which can be applied for time modelling of all range of milling operations involving 2-axis, 3-axis and 5-axis machining within 7-8 % prediction error. Toolpath smoothing techniques available in the literature can be broadly classified into two categories (1) Global toolpath smoothing, (2) Local toolpath smoothing. Although global smoothing techniques can be employed to reduce the machining time and generating smooth toolpath across given CAM points, the main disadvantage of this technique is the mathematical complexity involved to control and evaluate the exact fitting error. The challenge with the local smoothing approach however, is to ensure continuity at the junction between the corner rounding curve and the linear segment while respecting pre-defined error tolerance limit. While several local smoothing approaches are presented for three-axis toolpaths, there are still very limited works in the field of local toolpath smoothing for five-axis machine tools due to difficulties related to smoothing of orientation. To address this problem, a novel local toolpath smoothing technique is proposed in this thesis for five-axis machine tools where the objective is to achieve continuity at the junctions between the splines and the linear segments while respecting user-defined corner position tolerance () and orientation tolerance () limits. Chapter 3: Cycle time prediction for milling process 14 Chapter 3: Cycle time prediction for milling process 3.1 Overview The production scheduling for machining process involves the sequence of operations and their input times along with other major decision factors, in order to avoid overloading a machine with multiple assignments at the same time. It is not an easy task to design an exact production schedule due to unexpected demands and complexity of the process, namely modification and reproduction. The actual production schedules are customarily modified by a production planning engineer who co-ordinates the whole working process and schedule it in real time [13]. However, knowing the exact machining time in advance can lead to more accurate production process planning which in turn, greatly affects the performance of a shop floor from production economics perspective. Besides, machining time is one of the most important metric to analyze CNC machine tool capabilities. It can also be used by product designers to improve and optimize the design of products and to find optimal tool path strategy to machine a component. Conventionally, the machining time has been evaluated by NC code and improved by increasing commanded feedrate. This has worked well for conventional low-speed machining process. However, for high speed operations, the feedrate varies considerably along the toolpath due to mechanical (inertia) limitations of machine tool and limitations implemented by machine tool manufacturers to protect machine tool from damage during high-speed motion which leads to higher machining time prediction error. In this chapter, a cycle time prediction algorithm based on various factors including NC program, feedrate planning, geometry modification algorithm and machine characteristics is proposed for accurate estimation of machining time for milling free form surfaces. For this, simple sets of experiments have been conducted in Mori Seiki NMV5000 DCG commercial CNC machine to identify the implemented trajectory generation and corner smoothing techniques used, and feed Chapter 3: Cycle time prediction for milling process 15 drive dynamics of the CNC system as described in section 3.2. An analytical approach for predicting cycle time based on the identified CNC system dynamics and given part program is presented in section 3.3. In the last section, the experimental and predicted feedrate profiles and cycle time are compared for various 2-axis, 3-axis and 5-axis toolpaths to validate the proposed cycle time estimation strategy. O001T02 M6G90 G54G0 G61 X10 Y10 S1000 M03G01 X20 Y20 F2000…...M30Position ToleranceOrientation TolerancetimeDisplacementFeedrateAccelerationJerkFeed Drive ServoAxis Control LawFeedback MeasurementCAD Model G- CodeGeometry ModificationTrajectory GenerationClosed-loop Feed-drive systemMachined PartCommercial CNC System Figure 3.1 Flow of commands in Commercial CNC System 3.2 Modeling dynamics of CNC systems Flow of commands in a CNC machining process is shown in figure 3.1. CAD/ CAM system generates reference toolpath in the form of part program which is loaded into the CNC machines where each block passes through geometry modification and trajectory generation algorithm. Here, Chapter 3: Cycle time prediction for milling process 16 discrete displacement commands are generated for each axes at every control interval. These drive commands are passed on to closed-loop feed-drive system for each axis where the control law shapes the final drive positions. Most of the commercial CNC machine can be operated in exact stop mode (G61) and normal cutting mode (G64) [28]. In exact stop mode, the toolpath motion ceases at each block transition points as shown in figure 3.2. In this case, geometry modification module is deactivated and in-position status is checked for each block. On the other hand, the toolpath planning for cutting/ continuous mode is done to ensure smooth path transitions between consecutive blocks containing path movements which results in rounded corners as shown in figure 3.2. Position ToleranceOrientation Tolerancetime [sec]Feed [mm/sec]Transitions across CAM points are smooth and continuousFeed [mm/sec]Must stop at each CAM transition pointtime [sec]Exact-Stop Mode Continuous Mode Figure 3.2 Feedrate profile for exact-stop and continuous mode Chapter 3: Cycle time prediction for milling process 17 To forecast NC cycle time accurately in exact stop mode, "real" feedrate needs to be predicted which depends on multiple factors including programmed feedrate, length of toolpath blocks, directional changes in the toolpath, machine performance parameters such as feedrate, acceleration and jerk limits of the drives, feedrate interpolation method and closed loop feed-drive dynamics. In cutting/ continuous mode, the NC cycle time depends on corner smoothing technique in addition to all the above-mentioned factors which affect cycle time in exact stop mode. Z-Axis twin driveY-Axis twin drive1 motor for X-AxisZXYBC Figure 3.3 Configuration of Mori Seiki NMV5000 DCG commercial machining center [29] Chapter 3: Cycle time prediction for milling process 18 NC part program contains programmed feedrate and toolpath related information such as block length, directional changes in toolpath, etc. The feedrate, acceleration and jerk limits of the drives are often provided by the manufacturer. Most modern CNC machines also provide users with feedrate profile options such as linear and exponential feedrate profile in the acceleration/ deceleration range [13]. However, the parameters related to the feedrate profiles, corner smoothing technique and closed-loop feed drive dynamics are not revealed to end users which need to be identified for accurate prediction of machining time. For identification purpose, simple sets of experiments are performed on NMV5000 DCG vertical machining center by Mori Seiki Co. Ltd. This CNC machine has Fanuc 30i controller and five-axis kinematic configuration with B/C axis rotary table [30] as shown in figure 3.3. Both B and C axes are driven by direct drive (DD) motors and has rotation range of 340 and 360 degrees respectively. Each of the Y and Z axes are driven by two synchronously controlled ball-screw drives and have axis travel range of 510 mm. However, X-axis is driven by a single ball-screw drive with axis travel range of 730 mm. Part program (G-code) is fed to the machine using Mapps IV interface [31] and experimental data is measured online at a sampling time, = 1 using Fanuc servo guide software (version 6.00) installed on a laptop which is connected to the NC system using ethernet cable. 3.2.1 Identification of trajectory parameters For identification of trajectory parameters, the machine tool is commanded to move in linear toolpath segments (G01 command) of varying length at a range of programmed feedrates. The high-precision contour control mode is turned off as it activates various sub-programs which results in modification of feedrate profile generated by the trajectory generation module of CNC machine tool. The experiments are carried out in exact-stop mode to avoid the effect of smoothing technique in trajectory generation process. The experimental conditions are summarized below: Block length: 1, 2, 5, 10, 50 and 100 mm Commanded feedrate: 1000, 2000, 3000, 4000, 5000 and 6000 mm/min High-precision contour control: off Chapter 3: Cycle time prediction for milling process 19 Mode: Exact stop (G61) Figure 3.4 Kinematic profiles of Mori Seiki NMV5000 0 100 200 300 400 500 600 700 800 900020 !" !# !$ time Acceleration Feedrate Jerk Acceleration Constant Feedrate Deceleration Chapter 3: Cycle time prediction for milling process 20 Feedrate data %() is measured using servo guide software at discrete time steps ∀ ' = 1,2, … , + such that (,- − ) = and / = !" + !# + !$ (see figure 3.4). Acceleration 1() and jerk 2() along the toolpath can be calculated on a fly using digital differentiation technique. 1() = %() − %(3-) ∀ ' = 2,3, … , + ; 2() = 1() − 1(3-) = %() + %(3) − 2%(3-)() , ∀ ' = 3,4, … , + ; (3.1) Figure 3.4 shows the pattern of feedrate, acceleration and jerk profiles of Mori Seiki NMV5000 DCG as measured by servo guide software. For further investigation, the acceleration, constant feedrate and deceleration sections of the feedrate profile are analyzed separately. As NMV5000 DCG machine is set to follow the exponential feedrate profile [32], the initial model of the feedrate profile for acceleration section is chosen as %() = 893/;< + =93/;> + (3.2) To estimate the values of the unknown parameters 8, =, , ?- and ?, an unconstrained optimization problem is formulated where the objective is to find the optimal value of (5 × 1) vector B = C8, =, , ?-, ?D;such that the scalar cost function E(B) which can be expressed as sum of square of residuals is minimized. minB E(B) = ∑ I%() − J893 KLM< + =93 KLM> + NOP- (3.3) Where = !" is the acceleration time (see Fig 3.4). For this, trust region non-linear least-square optimization technique as explained in [33], [34], [35] is used. It is a global convergence algorithm. The first step is to specify the initial guess BQ = C8R, =R, R, ?-R, ?RD; and initial trust-region size ∆R. Trust-region size can be defined as the radius of sphere with BT as center where the solution can lie. At any iteration U, the value of the step size VT = C∆8W, ∆=W, ∆W, ∆?-W, ∆?WD; is calculated. It should be ensured that modulus of step size VT must be less than the trust-region size ∆W at the UX iteration. The optimal value of VT which minimizes cost function is given by: VT = −(Y(BT) + Z[)3"\(BT) (3.4) Chapter 3: Cycle time prediction for milling process 21 where \(BT) is (5 × 1) vector which represents the gradient of cost function E(B) at the current iteration point BT. It can be formulated as \(BT) = ]E]B^BPBT = _`]E]8 ]E]= ]E] ]E]?- ]E]?a;bcBPBT , (3.5) Y(BT) is (5 × 5) symmetric matrix of second derivatives (Hessian Matrix) of the cost function E(B) at BT. It can be expressed as Y(BT) =deeeef]E]8 ⋯ ]E]8]?⋮ ⋱ ⋮]E]?]8 ⋯ ]E]? jkkkklmmBPBT (3.6) and Z is a positive scalar value such that ‖VT‖ = p−(Y(BT) + Z[)3"\(BT)p ≤ ∆W (3.7) If the trust region size ∆W shrinks to less than 103, it implies the current solution can be trusted and the algorithm terminates. Otherwise, the value of BT and trust-region size ∆W needs to be updated for next iteration. For this, reduction ratio t9uW is evaluated. t9uW = E(BT) − E(BT + VT)W(Q) − W(VT) (3.8) where, W(V) = E(BT) + V;\(BT) + 12V;Y(BT)V (3.9) If the reduction ratio is large, the trust-region size is increased in the next iteration. If the reduction ratio is too small, the trust-region size is decreased in the next iteration. Otherwise, it is kept the same. Chapter 3: Cycle time prediction for milling process 22 ∆W,-= xyzy{ 14 ∆W if t9uW < 14min(2∆W, ∆~) if t9uW > 34∆W otherwise (3.10) Furthermore, a step VT will only be accepted if the reduction ratio is not too small. BT," = I BT + VT if t9uW > 1/8BT otherwise (3.11) As Trust-region is a global optimization technique, the initial guess BQ does not have much effect on the final result. For our purpose, the initial guess BQ is chosen as C10,10,10,0.1,0.2D;. The maximum step length ∆~ and initial trust-region size ∆R are chosen as 100 and 10, respectively. For identification of trajectory profile, tool is commanded to move 100 mm in x-direction at commanded feedrate of 6000 mm/min and feedrate data is collected at a sampling time of 1 ms. The data corresponding to the acceleration region only is used for identification purpose. The trust-region algorithm converges in 21 iterations in this case. The plot showing the cost function and trust-region size in each iteration are shown in figure 3.5 and 3.6 respectively. The optimal value of unknown parameters in this case are found as 8 = 207.25 /9E, = = −304.14 /9E, = 99.96 /9E, ?- = 0.033 and ? = 0.049 . Next, the procedure is repeated for other five sets of experiments in which tool is commanded to move 100 mm in x-direction at commanded feedrate of 1000, 2000, 3000, 4000 and 5000 mm/min respectively. Trust-region algorithm is applied to the collected feedrate data for all the five cases separately to estimate the values of the parameters 8, =, , ?- and ?. The result of trust region optimization is tabulated in table 3.1. Chapter 3: Cycle time prediction for milling process 23 Figure 3.5 Convergence of cost function in Trust-region algorithm Figure 3.6 Convergence of Trust-region size in Trust-region algorithm 2 4 6 8 10 12 14 16 18 20 2200.511.52x 105Iteration numberCost function c(x) (mm/sec)10 12 14 16 18 20 2202468102 4 6 8 10 12 14 16 18 20 22020406080100Iteration numberTrust−region sizeChapter 3: Cycle time prediction for milling process 24 Table 3.1 Trust region parameter estimates Commanded feedrate (%) (mm/sec) Values of estimated parameters 8 (mm/ sec) = (mm/sec) (mm/sec) ?- (sec) ? (sec) 16.67 36.8 -53.65 16.5 0.033 0.049 33.33 67.77 -101.06 33.2 0.0325 0.048 50 104.12 -155.13 48.6 0.033 0.05 66.67 137.5 -207.17 67 0.0332 0.0481 83.33 168.2 -254.8 82.8 0.033 0.049 100 207.25 -304.14 99.96 0.033 0.049 From trust-region parameter estimates, it is found that the values of time constants ?- and ? , estimated as 0.033 and 0.049 seconds respectively are independent of the commanded feedrate and constant for a machine. However, the values of other parameters vary. To express the parameters 8 , = and as functions of commanded feedrate (%), general linear model of regression analysis is used. For regression analysis, an over determined system is considered [36] as:- = ∀ ' = 1,2, … ,/P- (3.14) where linear equations are used to find + unknown coefficients, -, , … , /, with > +. It should be noted that and are known inputs and outputs respectively. Equation (3.14) can be written in matrix form as = , where = -- ⋯ -/⋮ ⋱ ⋮- ⋯ / , = -⋮/ , = -⋮ (3.15) Chapter 3: Cycle time prediction for milling process 25 Such a system of equations are solved by forming a minimization problem where the objective is to minimize the sum of square of errors, () which is formulated as () = (9)P- = −/P- P- (3.16) () is minimized by equating its gradient value to zero which gives the estimated value of the unknown parameters = (;)3-; (3.17) To express , and as functions of commanded feedrate (), it is assumed that = -, = , = (3.18) where , , and are (5 × 1) vectors as shown in table 1. Using linear regression, the unknown parameters -, and are computed as - = ;3-; = 2.057243 ≈ −?-?- − ? = ;3-; = −3.06615 ≈ ??- − ? = ;3-; = 0.99574 ≈ 1 (3.19) This brings us to the following results: 8 ≈ −% ?-?- − ? , = ≈ % ??- − ? , ≈ % (3.20) From equations (3.2) and (3.20), the feedrate equation corresponding to the acceleration section of the profile can be expressed as %() = J −% ?-?- − ?N 93/;< + J % ??- − ?N 93/;> + % ∀ 0 ≤ < - (3.21) Chapter 3: Cycle time prediction for milling process 26 where - is the acceleration time as shown in figure 3.4. Similarly, the feedrate equation corresponding to the deceleration section is formulated. The identified feedrate equation along the toolpath can be expressed as %() =xyyzyy{ −%?- − ? J?-93 ;< − ?93 ;>N + % , 0 ≤ < - % , - ≤ < - + %?- − ? _?-93(3<3>);< − ?93(3<3>);> b, - + ≤ ≤ - + + (3.22) Differentiating equation (3.22) with respect to time , the acceleration profile 1() is expressed as, 1() =xyyzyy{ %?- − ? J−93 ;< + 93 ;>N , 0 ≤ < - 0, - ≤ < - + %?- − ? −93(3<3>)/;< + 93(3<3>)/;>, - + ≤ ≤ - + + (3.23) Again, differentiating equation (3.23) with respect to time, the jerk profile 2() is obtained as, 2() =xyyzyy{ %?- − ? J 1?- 93 ;< − 1? 93 ;>N , 0 ≤ < - 0, - ≤ < - + %?- − ? J 1?- 93(3<3>)/;< − 1? 93(3<3>)/;>N, - + ≤ ≤ - + + (3.24) It should be noted that experiments have been conducted for different toolpath lengths under three circumstances: (1) linear: movement along one specific axis (X; Y; Z); (2) planar: toolpath involving two axes (XY; YZ; XZ); (3) spatial: three axes and five axes toolpaths. Experimental data reveals that the trajectory generation algorithm does not change as toolpath length or number of axis in movement changes. Chapter 3: Cycle time prediction for milling process 27 3.2.2 Prediction of corner smoothing technique For the prediction of corner smoothing technique implemented on the CNC system, a simple G-code command is sent to the system and the machine is commanded to operate in exact-stop mode. Feedrate data is measured using servo guide software. G-Code command: G61; G01 X4.455 F1000.; X2.327 F500.; X7.9 F2000.; X-4.55 F1000.; Then, the experiment is repeated in the continuous mode and feedrate data is recorded again. Figure (3.7) shows the experimental feedrate data for exact-stop and continuous mode. Figure 3.7 Experimental feedrate profile in (i) Exact-stop mode, (ii) Continuous mode Block 1 Block 2 Block 3 Block 4 Feedrate (mm/min) Time (sec) Feedrate (mm/min) Chapter 3: Cycle time prediction for milling process 28 Figure 3.8 Predicted feedrate profile in Continuous mode After carefully analyzing the feedrate data, it was predicted that unlike exact-stop mode, the execution of the next block starts as the feedrate of the current block starts decelerating in continuous mode as shown in the figure (3.8). Then, feedrate contributions by all the blocks at a specific time are added to compute the feedrate profile along the toolpath in continuous mode. The predicted feedrate profile in continuous mode is then compared with the experimental feedrate profile as discussed in section (3.4) to validate the prediction of corner smoothing technique. 3.2.3 Identification of closed-loop feed-drive dynamics Commercial CNC drive control systems have generally closed and propriety architecture and a detailed dynamic model including the controller is not provided to the users [37]. Therefore, an identification technique is required to estimate drive dynamics so that machine behavior can be simulated in the virtual environment accurately. Erkorkmaz et al [38] and Sencer et al [37] proposed a rapid closed loop identification technique by conducting a short G-code test. However, it is difficult to excite commercial CNC machines by G-code command leading to inaccuracy in measured FRF. Time (sec) Feedrate (mm/min) Feedrate profile along toolpath Block 3 Block 4 Block 1 Block 2 Execution of Block 2 starts as Block 1 starts decelerating Chapter 3: Cycle time prediction for milling process 29 In this section, a technique for identification of closed loop feed drive dynamics of NMV5000 DCG CNC system is presented where the closed loop feed drive system is excited by sending disturbance torque commands. The control block diagram of NMV5000 DGC feed-drive system is shown in figure 3.9. For identification of unknown velocity loop transfer function, the feed-forward block is deactivated. Position gain is set as 1 to prevent position loop effect. Figure 3.9 Control block diagram of Mori Seiki NMV5000 feed-drive system The velocity loop is then excited by sending disturbance torque in the frequency range of 1 to 1000 [rad/sec] and the output torque is measured using servo guide software. Having known the input and the output torque data, experimental frequency response function (FRF) of the velocity loop is computed by dividing the output response by the input command. The experimental velocity loop FRF of X-drive as measured by servo guide is shown in figure 3.10. From the experimental data, it is observed that two notch filters are implemented in the system at 200 Hz and 360 Hz respectively to block the harmonic component of the input command that coincides with the resonance frequency of the machine. The resonance elimination (RE) filters are designed based on the parameters provided in the manual [39]. The designed notch filters are ¡¢1 0 104.08 0 4£200 0 346.93 0 4£200, ¡¢2 0 4£360 0 188.4956 0 4£360 3.25 Feed Drive System Position Feedback B¤ B¥! Position Controller Velocity Controller Encoder Velocity Feedback Feed forward Current Loop Chapter 3: Cycle time prediction for milling process 30 Figure 3.10 Experimental velocity loop FRF of X-drive of Mori Seiki NMV5000 DCG CNC system Notch filters are ignored for drive identification process. The drive parameters are then estimated using continuous time model identification approach presented by Pintelon [40] [41] from the complex frequency response data ¦§¨W. ¦§¨W ©W9ª« ¡W 0 2[W 3.26 RE Filters (Notch filters) Chapter 3: Cycle time prediction for milling process 31 where ©W and ¬W represent experimentally measured magnitude and phase corresponding to angular frequency ¨W for U = 1,2, … ,. The frequency range 5 to 150 Hz (~10 to 950 [rad/sec]) is used for identification purpose as notch filters do not affect the data in this frequency range. The initial closed loop feed drive system is assumed as ¦(, ¯) = =(, ¯)8(, ¯) = °R + °- + ⋯+ °1R + 1- + ⋯+ 1// ∀ 1/ = 1 (3.27) where is Laplace operator and ¯ = C1/3-… 1R °… °RD;. The objective is to estimate the parameter vector ¯ of the continuous time plant model described in equation (3.27) from N sampled measurements of the angular frequencies and system response data ±² =³¨W; ¦§(¨W)´WP-µ . It is assumed that the orders n and m are known in advance. For simplicity, let us assume that the values of n and m are 2 and 1 respectively. Then, the closed loop plant model can be expressed as ¦(, ¯) = =(, ¯)8(, ¯) = °- + °R + 1- + 1R ; ¯ = C 1- 1R °- °RD; (3.28) The identification problem implies that we want to find ¶ such that it minimizes the cost function E(¯) = ·¦§(¨W) − ¦(2¨W, ¶)·µWP- (3.29) Thus, ¯ = min¯ ¸·8(2¨W, ¯)¦§(¨W) − =(2¨W, ¯)·|8(2¨W, ¯)| ºµWP- (3.30) It should be noted that the above minimization problem is non-linear in nature as the parameter ¯ which needs to be estimated comes in denominator. To linearize the problem, a known value 8∗(¨W) is substituted for 8(2¨W, ¯) term that occurs in denominator. Chapter 3: Cycle time prediction for milling process 32 ¯ = min¯ ¸·8(2¨W, ¯)¦§(¨W) − =(2¨W, ¯)·|8∗(¨W) | ºµWP- (3.31) Substituting the values of 8(2¨W, ¯), =(2¨W, ¯) and ¦§(¨W), we get ¯ = min¯ ¸·(¡W + 2[W)(¨W) − ³(−[W + 2¡W)¨W1- + (¡W + 2[W)1R − 2¨W°- − °R´·|8∗(¨W)| ºµWP- (3.32) ⇒ ¯ = min¯ |½W − T¯|µWP- where ½W = (¡W + 2[W)(¨W)8∗(¨W) ; W = ¾(−[W + 2¡W)¨W8∗(¨W) ¡W + 2[W8∗(¨W) −2¨W8∗(¨W) −18∗(¨W)¿ (3.33) The solution of the above least square problem can be evaluated as ¯ = (ÀÁ)3-ÀÁ±; ± = ½-½⋮½µÂµ Ã -; = "#⋮²Âµ Ã Ä (3.34) where ÀÁ represents conjugate transpose of the matrix. It should be noted here that some of the elements of ± vector and matrix are complex numbers. Thus, it is highly probable that the estimated value of coefficient vector ¯ = Å 1- 1R °- °RÆÇ; will be complex numbers as well. This can be avoided by adding negative frequencies. It can be shown that if ¦§(¨W) = ¡W + 2[W, then the value of ¦§(−¨W) = ¡W − 2[W. If for all the positive frequencies, the negative frequencies are also included, it is observed that the optimization problem gives real valued parameters. The initial estimate of denominator term 8∗(¨W) is assumed as 1 for all U. ¯ = Å 1- 1R °- °RÆÇ; is estimated using the least square optimization method as formulated in equation (3.33) and (3.34). Based on the estimated values of 1- and 1R, the value of denominator term is updated as Chapter 3: Cycle time prediction for milling process 33 8∗(¨W) = 82¨W, ¯ = (1R−¨W) + 2(1-¨W) (3.35) Using updated denominator value, ¯ is estimated again using least square optimization technique. This method is repeated until following convergence criteria is fulfilled for a small value . p¯È − ¯È3"p ≤ (3.36) Figure 3.11 Experimental and identified closed loop frequency response function of X-axis For the closed-loop identification of X-drive, the order of numerator and denominator of the transfer function is assumed as 3 and 4 respectively. Based on the described least square Chapter 3: Cycle time prediction for milling process 34 optimization method, the identified closed loop FRF (without notch filter) of X-drive is estimated as ¦É() = −3.288 + 3.24795 + 1.03698 + 4.08910Ä + 523.3 + 8.38195 + 1.7798 + 4.08910 (3.37) After that, the notch filters as designed in (3.25) were multiplied with ¦É() to find the closed loop response of the x-drive. The identified and experimental FRF of the x-drive are shown in figure 3.11. Similarly, closed-loop identification of Y, Z, B and C drives are carried out and results are presented in table 3.2 and figure 3.12. Table 3.2 Identified closed loop feed-drive dynamics of Mori Seiki NMV5000 CNC system Resonance Elimination Filter, ¡¢() Closed loop transfer function, ¦É() X-drive + 104.08 + 4£(200) + 346.93 + 4£(200) , + 4£(360) + 188.4956 + 4£(360) −3.288 + 3.24795 + 1.03698 + 4.08910Ä + 523.3 + 8.38195 + 1.7798 + 4.08910 Y-drive + 6.2838 + 4£(390) + 628.38 + 4£(390) , + 4£(260) + 188.4956 + 4£(260) −190.8 + 6.12695 + 2.69497 + 4.827910Ä + 894.9 + 9.33195 + 1.14398 + 5.59910 Z-drive + 6.2838 + 4£(530) + 628.38 + 4£(530) −375 + 1.66896 + 7.1698 + 9.60899Ä + 2365 + 2.64596 + 1.93899 + 9.0399 B-drive - 346.9Ä − 1.45896 + 2.22799 + 4.219911 + 5.02912Ê + 9155Ä + 6.4796 + 3.8799 + 7.535911 + 4.597912910 C-drive - 26.44 + 5.4494 + 1.6697 + 5.27399Ä + 306 + 2.0495 + 2.38497 + 5.31999 Chapter 3: Cycle time prediction for milling process 35 Figure 3.12 Experimental and identified closed loop FRF B-AxisY-Axis Z-AxisC-AxisFrequency (rad/sec) Frequency (rad/sec)Frequency (rad/sec) Frequency (rad/sec)Magnitude (dB)Magnitude (dB)Phase (degree)Phase (degree)Chapter 3: Cycle time prediction for milling process 36 3.3 Cycle time estimation After including the effect of the identified trajectory generation algorithm, corner smoothing technique and feed-drive dynamics in the prediction of cycle time, it is observed that the cycle time of NC machining process is predominantly depended upon trajectory generation and corner smoothing techniques implemented on the CNC system. The closed-loop feed drive dynamics however, does not have much influence on the cycle time. Thus, the effect of closed loop feed drive dynamics is ignored for the cycle time estimation. The schematic diagram of the proposed algorithm for cycle time estimation is shown in figure 3.11, with a brief description as follows. To predict the cycle time for a given toolpath, the acceleration, constant feedrate and deceleration time corresponding to each block of NC part program are calculated. Then, cycle time for the given toolpath is evaluated based on mode (Continuous or exact stop) chosen by the user. The default mode of operation for NMV5000 DCG CNC machine is units per minute feedrate mode in which an “F” word on NC block is interpreted to mean the controlled point should move at a certain number of millimeters per minute or degrees per minute, depending upon which axis or axes are moving [39]. In this case, to predict the feedrate along the toolpath, pseudo-distance Ë is calculated based on increments on the axis commands. Ë = ∆ + ∆Ì + ∆½ + ∆= + ∆- ⁄ ∀ ' = 1,2… , (3.44) Where ' represents current block number of NC part program and is the total number of blocks in the given NC program. ∆, ∆Ì and ∆½ are the incremental translational axis commands in [mm] and ∆= and ∆ are incremental rotary axis commands in [degrees] at 'X block. Initially, it is assumed that the pseudo block length Ë for the 'X NC block is long enough to allow the tool to reach the commanded feedrate %. As shown in figure 3.4, the tool reaches commanded feedrate % at the end of acceleration section. Thus, %(-) = −%?- − ? ?-93<L ;<⁄ − ?93<L ;>⁄ + % = % − (3.45) Similarly, the tool motion should cease at the end of deceleration section. Thus, Chapter 3: Cycle time prediction for milling process 37 %(- + + ) = %?- − ? ?-93ÎL ;>⁄ − ?93ÎL ;>⁄ = (3.46) where -, are block acceleration, constant feedrate and deceleration time respectively. It should be noted that the value of the left hand side of equation (3.45) and (3.46) converges to % and 0 respectively at infinite time. So, a small feedrate error (=0.0001 /min) needs to be introduced to get a finite value of block acceleration time - and deceleration time . Having known the commanded feedrate % for the 'X NC block and machine time constants ?- and ?, the block acceleration time - taken to reach the desired feedrate % starting from rest and block deceleration time taken to reach rest starting from % can be calculated by solving equation (3.45) and (3.46) respectively. However, equations (3.45) and (3.46) are non-linear is nature. Thus, numerical techniques are applied using Matlab’s fsolve command to solve them. Having known the block acceleration and deceleration time, tool displacement during acceleration and deceleration sections can be evaluated by integrating the feedrate profile equation. Ë- = Ï %()<LPR = −%?- − ? ¸−?- J93<L;< − 1N + ? J93<L;> − 1Nº + %-, Ë = Ï %()<L,>L,ÎLP<L,>L = %?- − ? ¸−?- J93ÎL;< − 1N + ? J93ÎL;> − 1Nº (3.47) Depending on the block pseudo length Ë, there can be following two cases: Case 1: Ë ≥ Ë- + Ë In this case, the block length is long enough to reach the commanded feedrate during the travel as shown in the figure (3.4). In this case the maximum feedrate attained during the travel is %. Thus, %~, = %. The distance travelled Ë in constant feedrate zone and constant feedrate time are calculated as Ë = Ë − (Ë- + Ë); = Ë%~, (3.48) Chapter 3: Cycle time prediction for milling process 38 Case 2: Ë < Ë- + Ë In this case, toolpath length is not long enough to allow the tool to attain or maintain the commanded feedrate % during the travel. Thus, Ë = = 0. Furthermore, the time corresponding to the acceleration and deceleration sections, - and needs to be recalculated. For this purpose, it is assumed that the maximum feedrate attained during the travel is %~, < % which is mathematically expressed as %(-) = −%?- − ? J?-93<L;< − ?93<L;> N + % = %~, (3.49) Reformulating equation (3.46) for this case, %(- + + ) = %~,?- − ? J?-93ÎL;< − ?93ÎL;> N = (3.50) Furthermore, the total displacement at the end of deceleration section should be equal to block pseudo length Ë, Ë = −%?- − ? ¸−?- J93<L;< − 1N + ? J93<L;> − 1Nº + %-+ %~,?- − ? ¸−?- J93ÎL;< − 1N + ? J93ÎL;> − 1Nº (3.51) Equations (3.49), (3.50) and (3.51) form system of non-linear equations which are solved iteratively using trust-region non-linear optimization technique explained in the section (3.2.1) to find the unknown values of acceleration time, -, deceleration time, , and the maximum feedrate attained, %~,. To summarize, for 'X block, the feedrate and displacement profiles are: %() =xyyzyy{ −%?- − ? J?-93 ;< − ?93 ;>N + % , 0 ≤ < - %~, , - ≤ < - + %~,?- − ? _?-93(3<L3>L);< − ?93(3<L3>L);> b , - + ≤ ≤ - + + (3.52) Chapter 3: Cycle time prediction for milling process 39 Ë()=xyyyzyyy{ −%?- − ? ¸−?- J93 ;< − 1N + ? J93 ;> − 1Nº + % , 0 ≤ ≤ - %~,( − -) + Ë(-) , - < ≤ - + %~,?- − ? ¸−?- _93(3<L3>L);< − 1b + ? _93(3<L3>L);> − 1bº + Ë(- + ) , - + < ≤ - + + (3.53) where ' = 1,2… ,. The pseudo toolpath length Ë and commanded feedrate % data are given in the part program, machine time constants ?- and ? are identified as 0.033 and 0.049 seconds respectively in section 3.2.1 and acceleration time -, constant feedrate time , deceleration time and maximum feedrate achieved %~, are calculated by equation (3.45) to (3.51). Having calculated the acceleration, constant feedrate and deceleration time corresponding to each block in NC part program, we can now proceed to evaluation of cycle time for the entire toolpath. This is based on the mode (exact-stop or continuous) selected by the user. Exact-stop mode: In this case, the tool is allowed to decelerate to zero velocity before the execution of the next block starts as shown in the figure 3.7. Cycle time in this mode will be the sum of the acceleration time, constant feedrate time and deceleration time of all the blocks of NC code. EEË9 '9Ñ~3 = (- + + )µP- (3.52) Continuous mode: When the machine is commanded to operate in continuous mode, the execution of the next block starts as the feedrate profile corresponding to the current block starts decelerating as shown in the figure 3.8. Thus, cycle time can be calculated by summing up the acceleration and constant feedrate time for all the blocks and the deceleration time of the last block of NC code. EEË9 '9/. = (- + )µP- + µ (3.53) Chapter 3: Cycle time prediction for milling process 40 Figure 3.13 Overview of proposed cycle time prediction scheme Read commanded feedrate % and position command from 'X NC block Initialize: Ò1Ë '9 = 0 Exact stop Continuous mode ?Ò. '9 = ?Ò. '9 + - + Calculate acc. time - to reach % from % = 0 mm/min and dec. time to reach %Ñ = 0 mm/min from % Calculate corresponding travel length Ë- and Ë Is Ë ≥ Ë- + Ë ? Yes No = Ë − (Ë- + Ë)% ©1Eℎ'+'+\ '9 = Ò1Ë '9 = 0 Recalculate -,/ÑÕ and ,/ÑÕ according to the block length Ë Calculate pseudo-distance: Ë = ∆ + ∆Ì + ∆½ + ∆= + ∆- ⁄ Exact-stop or Continuous Mode ? ?Ò. '9 = ?Ò. '9 + - + + End of Program ? Yes No ' = ' + 1 Chapter 3: Cycle time prediction for milling process 41 3.4 Experimental validation The validation of the proposed cycle time prediction method is done in two steps. First, the experimental and predicted feedrate, acceleration and jerk profiles are compared for short toolpaths. The Mori Seiki NMV5000 CNC machine is commanded to follow the test toolpath profile shown in figure 3.14 at a commanded feedrate of 500 mm/min. The feedrate profile prediction algorithm is based on identified trajectory and corner smoothing parameters as mentioned in section 3.3. To study the effect of closed-loop feed drive system on cycle time, the feedrate profiles are computed and plotted with and without including the drive dynamics as shown in the figure 3.15. Figure 3.14 Test 2-axis toolpath profile Chapter 3: Cycle time prediction for milling process 42 Figure 3.15 Effect of closed loop feed-drive system on feedrate profile and cycle time From the figure 3.15, it is observed that the cycle time of NC machining process is predominantly depended upon trajectory generation and corner smoothing techniques implemented on the CNC system. The closed-loop feed drive dynamics however, does not have much influence on the cycle time. Thus, the effect of closed loop feed drive dynamics is ignored for the cycle time estimation. The experimental and predicted feedrate profiles for the toolpath shown in figure 3.14 are then compared against each other when the CNC machine is operated in exact stop and continuous mode as shown in figures 3.16 and 3.17 respectively. Time (sec) Feedrate (mm/min) Commanded Feedrate = 500 mm/min Without FRF With FRF Chapter 3: Cycle time prediction for milling process 43 Figure 3.16 Experimental and predicted feedrate profiles in exact stop mode Figure 3.17 Experimental and predicted feedrate profiles in continuous mode Furthermore, the experimental acceleration and jerk profiles are compared against the predicted profiles. For this, the CNC machine is commanded to travel 100mm in x-direction at a feedrate of 6000 mm/min. The measured and predicted trajectory profiles are shown in figure 3.18. From the plotted graph, we can conclude that the predicted and actual kinematic profiles are in good match with each other. Time (sec) Feedrate (mm/min) Commanded Feedrate = 500 mm/min Simulated Profile Experimental Profile Time (sec) Feedrate (mm/min) Simulated Profile Experimental Profile Chapter 3: Cycle time prediction for milling process 44 Figure 3.18 Experimental and predicted trajectory profiles 0 200 400 600 800 1000 1200 1400 1600020406080Time (msec)Feedrate (mm/sec) PredictedExperimental200 400 600 800 1000 1200 1400 1600−5000500Time (msec)Acceleration (mm/sec2 ) 0 200 400 600 800 1000 1200 1400 1600 1800−6−4−20246x 10 4Time (msec)Jerk (mm/sec3 ) Chapter 3: Cycle time prediction for milling process 45 In the next step, the cycle time estimated by the proposed algorithm is compared with the measured cycle time for machining aerospace components in both exact-stop and continuous mode as shown in table 3.3. The first test model is corresponding to 3-axis toolpath provided by the Boeing Company. The error in cycle time prediction for this model is 2.3% and 4.5% in exact stop and continuous mode respectively. The second test model which involves 5-axis toolpath, has cycle time prediction error of 1.7% and 3.33% in the exact stop and continuous mode respectively. The comparatively higher prediction error in continuous mode is due to added error in modeling of corner feedrate. Table 3.3 Experimental and predicted cycle time Test models (3-Axis Toolpath) (5-axis Toolpath) Exact- stop mode Measured cycle time (sec) 16217 2001 Predicted cycle time (sec) 15842 1967 Prediction error (%) 2.3 1.7 Continuous mode Measured cycle time (sec) 3372 290 Predicted cycle time (sec) 3526 300 Prediction error (%) 4.5 3.33 3.5 Summary Estimation of cycle time for milling process is important for process planning and analysis of machine tool capabilities. In this chapter, we proposed a scheme to predict cycle time for milling free-form surfaces based on identified CNC machine dynamics in exact-stop and continuous mode. For this, simple sets of experiments have been conducted in Mori Seiki NMV5000 DCG commercial CNC machine to identify the implemented trajectory generation and corner smoothing technique and feed drive dynamics of the CNC system. From experimental data, it is concluded Chapter 3: Cycle time prediction for milling process 46 that the cycle time of NC machining process is predominantly effected by trajectory generation and corner smoothing techniques implemented on the CNC system. However, the closed-loop feed drive dynamics does not have much influence on the cycle time. An analytical approach for predicting cycle time based on the identified CNC system dynamics and given part program is presented. To validate the proposed cycle time prediction algorithm, the predicted feedrate profile and cycle time are compared with the experimentally measured data. Experimental results show that the cycle time prediction error remains within 5% for various 2-axis, 3-axis and 5-axis toolpaths in both exact-stop and continuous mode. Chapter 4: Five-axis corner smoothing for CNC system 47 Chapter 4: Five-axis corner smoothing for CNC system 4.1 Overview Five-axis machine tools are widely used for manufacturing of sculptured surfaces in aerospace, die and mold industries. In most of the cases, motion commands are composed of a series of linear toolpath segments, also called as G01 commands. If the tool motion is ceased at all the block transitions, NC cycle time increases and productivity suffers. On the other hand, if the tool is commanded to maintain its speed across the sharp corners, discontinuities are created in velocity, acceleration and jerk commands due to geometrical discontinuities in the toolpath. This will result in high impact load on the feed drives causing machine tool vibrations and can damage the machined surface. In this chapter, a novel decoupled approach as shown in figure 4.2 is presented to achieve local corner smoothing of five-axis toolpaths. The flow chart of trajectory generation for five-axis corner smoothing is shown in figure 4.1. Toolpath position and orientation are smoothed by inserting quintic and normalized septic micro-splines, respectively between the adjacent linear toolpath segments. Optimal control points are calculated for position splines to achieve continuity at the junctions between the splines and the linear segments while respecting user-defined corner position tolerance () limits in Section 4.2. Likewise, Section 4.3 focusses on constraint equations formulation based on pre-defined orientation tolerance () limits, continuity at junctions and synchronization of position and orientation splines for calculation of optimal control points for normalized septic orientation spline. After geometrical modification of the toolpath, feedrate planning is performed using cubic acceleration feedrate profile in section 4.4. The linear and the spline sections of the toolpath are interpolated by linear and spline interpolation techniques respectively. The non-linear relation between spline parameter and displacement along the toolpath is approximated using ninth-order feed correction spline. Inverse kinematics is then performed on the interpolated position and orientation data to generate axis motion commands. In case drive acceleration or jerk limits are violated, commanded feedrate is adjusted using the Chapter 4: Five-axis corner smoothing for CNC system 48 scheme proposed by Sencer et. al. [41] and position and orientation data are interpolated again. In Section 4.5, the smoothed toolpath motion is compared against the unsmooth motion in experiments and in simulation to show improvements in reducing the cycle time while improving tracking accuracy in five-axis machining of free-form surfaces found in dies, molds and aerospace parts. 4.2 Toolpath position smoothing As shown in figure 4.2, five-axis corner is defined by two adjoining linear toolpath segments with tool tip position and orientation vectors represented as VÈ = CÖ, , ×D and ØÈ = CÒ, Ò , ÒWD respectively for tool position ' = 1,2,3 such that ‖V" − V#‖ = Ë-, ‖V# − V$‖ = Ë, Ø" ∙ Ø# =cos ¶- and Ø# ∙ Ø$ = cos ¶. Various works are present in literature addressing toolpath position smoothing as mentioned in chapter 2. However, none of the methods could achieve continuous toolpath. Thus, a new toolpath position smoothing technique is proposed. The sharp position corners are smoothed by fitting quintic micro-splines between linear toolpath segments at each block transition point. In this section, formulation of quintic B-spline is presented. Optimal control points for the micro-splines are calculated based on pre-defined position error tolerance limit and conditions for acceleration and jerk continuity at the junction between the linear toolpath segment and the inserted spline segments. 4.2.1 Parametric position micro-spline A parametric position micro-spline which is inserted between the two linear toolpath segments is defined by the basis functions ,W(), (+ + 1) control points Ú = ÅÛ, ÛÜ , ÛÝÇ and degree (U −1) with the following form: Ú() = ,W()ÚÈ/PR (4.1) Chapter 4: Five-axis corner smoothing for CNC system 49 timeDisplacementFeedrateAccelerationJerkACXYZWorkpieceTool Cubic Acceleration Feedrate G01 Linear Interpolation Are drive limits satisfied ?? Geometry Modification Spline Segments Inverse Kinematics Þß¥B ß¥B àß¥B % á~ 8~ â~ Spline Interpolation Yes NO Á Adjust commanded feedrate Five-axis motion commands C(), Ì(), ½(), 8(), ()D; ÅÖ(), (), ×(), ã(), ã(), ãW()Ç; () Toolpath length Orientation Tol. Position Tol. Linear Segments Figure 4.1 Trajectory generation for five-axis corner smoothing Chapter 4: Five-axis corner smoothing for CNC system 50 Position ToleranceOrientation Tolerance Figure 4.2 Decoupled method of five-axis corner smoothing Orientation Smoothing Position Smoothing V# V$ Ø# Ø" Ø$ Position Control points Orientation Control points ä" V" V" V# V$ Ø" Ø# Ø$ Synchronization of Tool tip Position and Orientation Chapter 4: Five-axis corner smoothing for CNC system 51 The basis functions ,W() are functions of the geometric parameter and knot vector å =CR, -, … , /,WD and are defined as follows: ,W() = ( − )(,W3- − ),W3-() + (,W − )(,W − ,-),-,W3-() Where 0/0 = 0, and with the limiting/ initial condition (for k =1) of: ,-() = æ1 '% ≤ ≤ ,-0 Òℎ9tç'9 ; ∈ C0,1D (4.2) The degree of the spline curve and number of control points are set as 5 and 7 respectively to ensure continuity in third geometric derivative. The non-periodic knot vector is constructed as C0 0 0 0 0 0 0.5 1 1 1 1 1 1D to ensure symmetry across the angular bisector of the corner angle. For 5X degree spline curve with 7 control points, the spline equation (4.1) can be expressed as Ú() = ,é()ÚÈéPR (4.3) where the values of basis functions ,é for ' = 0,1, … ,6 are evaluated using equation (4.2) and plotted as shown in figure 4.3. R,é() = I−32Ê + 80Ä − 80 + 40 − 10 + 1, < 0.50, 0.5 ≤ ≤ 1 ; -,é() = I 62Ê − 150Ä + 140 − 60 + 10, < 0.5−2Ê + 10Ä − 20 + 20 − 10 + 2, 0.5 ≤ ≤ 1 ; ,é() = I −52Ê + 110Ä − 80 + 20, < 0.512Ê − 50Ä + 80 − 60 + 20 − 2, 0.5 ≤ ≤ 1 ; ,é() = I 32Ê − 50Ä + 20, < 0.5−32Ê + 110Ä − 140 + 80 − 20 + 2, 0.5 ≤ ≤ 1 ; Chapter 4: Five-axis corner smoothing for CNC system 52 Ä,é() = I −12Ê + 10Ä, < 0.5 52Ê − 150Ä + 160 − 80 + 20 − 2, 0.5 ≤ ≤ 1 ; Ê,é() = I 2Ê, < 0.5−62Ê + 160Ä − 160 + 80 − 20 + 2, 0.5 ≤ ≤ 1 ; é,é() = I 0, < 0.532Ê − 80Ä + 80 − 40 + 10 − 1, 0.5 ≤ ≤ 1 Figure 4.3 Plot of basis function corresponding to different control points for quintic B-Spline On substituting the values of basis functions ,é for ' = 0,1, … ,6 in the equation (4.3), the position micro-spline equation is obtained as 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.10.20.30.40.50.60.70.80.91Spline Parameter, uBasis Function for B−Spline generation²Q,ê ²",ê ²#,ê ²$,ê ²ë,ê ²ì,ê ²ê,ê Chapter 4: Five-axis corner smoothing for CNC system 53 Ú() =xyyyyyyzyyyyyy{ deeeeef −32Ê + 80Ä − 80 + 40 − 10 + 1 62Ê − 150Ä + 140 − 60 + 10 −52Ê + 110Ä − 80 + 20 32Ê − 50Ä + 20 −12Ê + 10Ä 2Ê 0jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;, < 0.5 deeeeef 0 −2Ê + 10Ä − 20 + 20 − 10 + 2 12Ê − 50Ä + 80 − 60 + 20 − 2 −32Ê + 110Ä − 140 + 80 − 20 + 2 52Ê − 150Ä + 160 − 80 + 20 − 2 −62Ê + 160Ä − 160 + 80 − 20 + 2 32Ê − 80Ä + 80 − 40 + 10 − 1 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;, 0.5 ≤ ≤ 1 (4.4) However, the positions of the control points ÚÈ ∀ ' = 0,1,2, . . . ,6 are yet to be calculated to completely define the position micro-spline Ú(). 4.2.2 Optimal control point calculation for position micro-spline The choice of non-periodic knot vector ensures that the B-spline curve will pass through the first and the last control point ÚQ (Ú( = 0) = ÚQ) and Úê (Ú( = 1) = Úê), respectively, and tangential to the first and the last segment of the control polygon ÚQÚ" and ÚìÚê, respectively as shown in figure 4.4. In order to maintain the position and tangential continuity at the junctions between the linear segments and the position micro-splines, the first three control points ÚQ, Ú" and Ú# should be located in the toolpath segment V"V#. Likewise, the last three control points Úë, Úì and Úê should be located in the toolpath segment V#V$. The fourth control point Ú$ is chosen at the corner position V# = CÖ, , ×D to ensure symmetrical spline curve. However, constraints based on position error tolerance limit and conditions for acceleration and jerk continuity at junctions ÚQ ( = 0) and Úê( = 1) need to be imposed to find the exact locations of the other six control points. Chapter 4: Five-axis corner smoothing for CNC system 54 Figure 4.4 Toolpath position smoothing using quintic B-spline 4.2.2.1 Acceleration and jerk continuity at junctions In order to achieve acceleration and jerk continuity at the junction points ÚQ ( = 0) and Úê( =1), continuity of the toolpath at the junction points are needed to be ensured first as shown in figure 4.5. The second and the third derivative of the position vector Ú with respect to the toolpath length for a linear toolpath profile is always zero, i.e., uÚu = 000; ; uÚu = 000; (4.5) ÚQ Ú# Ú" Ú$ Úë Úì Úê í = Q í = " V" V# V$ î/# ïVäÈð ï ñß ð! Chapter 4: Five-axis corner smoothing for CNC system 55 Figure 4.5 Constraints for acceleration and jerk continuities at junctions Differentiating toolpath position vector Ú() to evaluate the second and third derivatives of the quintic spline profile, uÚu = uÚu JuuN + uÚu uu ; (4.6) uÚu = uÚu JuuN + 3uÚu uu uu + uÚu uu (4.7) From equations (4.5), (4.6) and (4.7), it can be concluded that the continuity will be maintained at the junctions if _uÚu JuuN + uÚu uubcòPR,- = 000; , 1+u (4.8) _uÚu JuuN + 3uÚu uu uu + uÚu uubcòPR,- = 000; (4.9) The sufficient conditions for (4.8) and (4.9) to be true are óÈð ¥¤ ï ñß ð! óÈð ¥¤ ï ñß ð! ïVäÈð ï ñß ð! V" V$ ÚQ Úê í = Q í = " uÚu côõ uÚu côö uÚu côõ uÚu côö uÚu côõ uÚu côõ uÚu côö uÚu côö Chapter 4: Five-axis corner smoothing for CNC system 56 uÚucòPR,- = 000; ; uÚucòPR,- = 000; 1+u, (4.10) uucòPR,- = 0; uucòPR,- = 0 (4.11) Now, the first derivative of the spline parameter with respect to the path length can be written as: uu = 1÷uuø =1ù÷uÛu ø + JuÛÜu N + ÷uÛÝuø= 1%() (4.12) where u = ú(uÛ) + uÛÜ + (uÛÝ) and Û() = Ûû̂ + ÛÜý̂ + ÛÝU. Differentiating equation (4.12) with respect to the toolpath length to evaluate the second and third derivatives of the spline parameter , uu = − %Á()%() uu = − %Á()%() = _uÛu uÛu + uÛÜu uÛÜu + uÛÝu uÛÝub_÷uÛu ø + JuÛÜu N + ÷uÛÝuøb =÷uÚuø JuÚuN;þuÚuþÄ (4.13) uu = 3%Á() − %()%ÁÁ()%()Ä uu = 3%Á() − %()%ÁÁ()%()Ê = 3¸÷uÚuø JuÚuN;º − þuÚuþ ¸JuÚuN JuÚuN; + ÷uÚuø JuÚuN;º − þuÚuþ¸÷uÚuø JuÚuN;ºþuÚuþ (4.14) Chapter 4: Five-axis corner smoothing for CNC system 57 From equation (4.13) and (4.14), it can be observed that the values of (u u⁄ ) and (u u⁄ ) ceases as the values of (uÚ u⁄ ) and (uÚ u⁄ ) goes to zero. uÚu = 000; , uÚu = 000; → uu = 0, uu = 0 (4.15) Thus, equation (4.10) is the sufficient criteria for equation (4.11) to be true which implies continuity can be achieved at the junctions if only equation (4.10) is satisfied. From equation (4.4), the second derivative of the position vector Ú with respect to the spline parameter can be expressed as uÚu =xyyyyyyzyyyyyy{ deeeeef−640 + 960 − 480 + 80 1240 − 1800 + 840 − 120 −1040 + 1320 − 480 + 40 640 − 600 + 120 −240 + 120 40 0 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;, < 0.5 deeeeef 0 −40 + 120 − 120 + 40 240 − 600 + 480 − 120 −640 + 1320 − 840 + 160 1040 − 1800 + 960 − 160 −1240 + 1920 − 960 + 160 640 − 960 + 480 − 80 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;, 0.5 ≤ ≤ 1 (4.16) Differentiating (4.16) to evaluate the third derivative of the position vector Ú with respect to the spline parameter , we get Chapter 4: Five-axis corner smoothing for CNC system 58 uÚu =xyyyyyyzyyyyyy{ deeeeef−1920 + 1920 − 480 3720 − 3600 + 840 −3120 + 2640 − 480 1920 − 1200 + 120 −720 + 240 120 0jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;, < 0.5 deeeeef 0 −120 + 240 − 120 720 − 1200 + 480 −1920 + 2640 − 840 3120 − 3600 + 960 −3720 + 3840 − 960 1960 − 1920 + 480jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;, 0.5 ≤ ≤ 1 (4.17) Substituting = 0, 1 in (4.16) to evaluate the values of (uÚ u⁄ ) at the junctions ÚQ and Ú" respectively, we get uÚucòPR = deeeeef 80−120400000 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;; uÚucòP- = deeeeef 000040−12080 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl; (4.18) Substituting = 0, 1 in (4.17) to evaluate the values of (uÚ u⁄ ) at the junctions ÚQ and Ú" respectively, we get uÚucòPR = deeeeef−480840−480120000 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;; uÚucòP- = deeeeef 000−120480−840480 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl; (4.19) Chapter 4: Five-axis corner smoothing for CNC system 59 From equation (4.18) and (4.19), the condition for continuity at the junction ÚQ(í = Q) is found as 80ÚQ − 120Ú" + 40Ú# = 0, −480ÚQ + 840Ú" − 480Ú# + 120Ú$ = 0 (4.20) On solving (4.20), we get: Ú" = 2Ú# − Ú$ 1+u ÚQ = 5Ú# − Ú$2 (4.21) Similarly, the condition for continuity at the junction Úê( = 1) is found as 80Úê − 120Úì + 40Úë = 0, 480Úê − 840Úì + 480Úë − 120Ú$ = 0 (4.22) On solving (4.22), we get: Úì = 2Úë − Ú$ 1+u Úê = 5Úë − Ú$2 (4.23) As shown in figure 4.6, the length of the line segment ÛÛ and ÛÛÄ are kept same (Ë) for symmetry purpose. From equations (4.21) and (4.23), the lengths of the line segments ÛRÛ, Û-Û, ÛÛÊ and ÛÛé are evaluated as 2.5Ë, 2Ë, 2Ë and 2.5Ë respectively. It should be noted here that one more condition is required to evaluate the value of Ë to find the exact locations of the position control points. This is done by formulating user-defined position error tolerance limit constraint as discussed in the following section. 4.2.2.2 Pre-defined position error tolerance limit, VØ The B-spline curve defined by equation 4.4 is formulated that the maximum position error 9~ occurs corresponding to the mid-point of the spline. By substituting = 0.5 in equation 4.4, we Chapter 4: Five-axis corner smoothing for CNC system 60 get, Ú(0.5) =deeeeef 01/161/43/81/41/160 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl; (4.24) The maximum position error is evaluated as 9~ = Ú$ − Ú(0.5) = Ú$ − J 116Ú" + 14Ú# + 38Ú$ + 14Úë + 116ÚìN = 58Ú$ − 14Úë − 14Ú# − 116Úì − 116Ú" = 14 (Ú$ − Úë) + 14 (Ú$ −Ú#) + 116 (Ú$ − Úì) + 116 (Ú$ − Ú") (4.25) From section 4.2.2.1, the lengths of the line segments Û-Û, ÛÛ, ÛÛÄ and ÛÛÊ are evaluated as 2Ë, Ë, Ë and 2Ë respectively. Using this and squaring both the sides of the equation (4.25), we get, 9~ = 2_2 JË4N + J2Ë16N + 2JË4N cos + J2Ë16N cosb = 932 Ë(1 + cos) = 916 Ë cos ÷2ø (4.26) where is the corner angle. As the maximum position error 9~ incurred during the corner smoothing of the toolpath should be less than the user-defined position error tolerance limit , Chapter 4: Five-axis corner smoothing for CNC system 61 ‖9~‖ = 43 Ë cos ÷2ø ≤ ãt, Ë ≤ 4 3 cos ÷2ø (4.27) As each linear toolpath segment is used to smooth two corner points corresponding to the start and end-point of the segment, the maximum allowable length of the line segment connecting the control points is half the length of the toolpath segment. Mathematically, it can be expressed as, 2.5Ë ≤ 0.5Ë-, 2.5Ë ≤ 0.5Ë (4.28) Combining (4.27) and (4.28), Ë = '+ 4 3 cos ÷2ø , Ë-5 , Ë5 (4.29) Figure 4.6 Location of position control points based on continuity and error tolerance constraints ÚQ Ú" Ú# Úê Úì Úë V" V# = Ú$ V$ Ë = '+ 4 3 cos ÷2ø , Ë-5 , Ë5 = Position error tol. î/# Chapter 4: Five-axis corner smoothing for CNC system 62 4.3 Toolpath orientation smoothing In comparison to tool tip position smoothing, tool orientation smoothing is mathematically more challenging. X. Buedaert et al [27] carried out local smoothing of toolpath orientation within given orientation tolerance by using dual-spline method. To obtain a smooth connection of the orientation a parameterization spline was employed to link the bottom and top B-Spline parameters. However, due to over-constraining the problem, the proposed solution is highly sensitive to even a tiny variation in orientation. Moreover, dual-spline method does not work well when there is a large orientation change for a very small position change. Because of the limitations of dual-spline method as an orientation interpolation method, Yuen et al [18] interpolated position and orientation separately. Unlike interpolation of tool tip position data, the tool orientation was not fitted directly to the given orientation data. Instead, to ensure that the norm of orientation vectors always remain unity, the tool orientations were mapped to the spherical co-ordinates and orientation spline was then fitted to spherical co-ordinate data. This method worked effectively for global smoothing of tool orientations. However, for local smoothing of tool orientations, interpolation needs to be carried out directly from the orientation data in work-piece co-ordinate frame and should not be converted to spherical co-ordinate. This is because it is difficult to formulate user defined orientation tolerance constraints in the spherical co-ordinates. Linear quaternion interpolation (ä ¤V) is commonly used for linear interpolation between rotation quaternion [42]. Given two quaternions R, - and ℎ ∈ C0,1D this interpolation curve can be stated: Ë9t( R, -, ℎ) = R(1 − ℎ) + -ℎ (4.30) The interpolation curve for linear interpolation between quaternions gives a straight line in the quaternion space. The curve therefore dips below the surface of the unit sphere. Since all quaternions on a line through the origin gives the same rotation, the curve can be projected on to the unit sphere by normalizing equation (4.30) without changing the corresponding rotations. This idea is implemented to the standard spline interpolation technique to formulate a novel normalized spline interpolation method which satisfies both continuity and unity norm criteria. Chapter 4: Five-axis corner smoothing for CNC system 63 The tool orientation vectors are represented as ØÈ = CÒ, Ò , ÒWD for tool position ' = 1,2,3 and it lies in the surface of unity sphere. The angle between Ø" and Ø# is assumed as ¶- and between Ø# and Ø$ is assumed as ¶. Mathematically, this can be expressed as ¶- = cos3-(Ø" ∙ Ø#) ; ¶ = cos3-(Ø# ∙ Ø$) (4.31) As shown in figure 4.7, tool orientation is smoothed by inserting normalized heptic B-spline with 9 orientation control points between linearly interpolated orientation vectors unlike quintic position B-spline with 7 control points for position smoothing. The order of inserted spline segments for orientation smoothing is increased due to extra constraints based on synchronization of position and orientation spline in this case. ê # " Q ë $ ì Ø" Ø# Ø$ (u=0.5) Max. Orientation Error, Ø¤È Figure 4.7 Toolpath orientation smoothing using Normalized Heptic B-Spline Chapter 4: Five-axis corner smoothing for CNC system 64 4.3.1 Parametric orientation micro-spline The 7th degree heptic spline curve with given control points È = Åã, ã , ãWÇ ∀ ' = 0,1, … ,8 and non- periodic knot vector å = C0 0 0 0 0 0 0 0 0.5 1 1 1 1 1 1 1 1D is constructed using (4.1) and (4.2) as ()=xyyyyyyyyzyyyyyyyy{deeeeeeef−128 + 448é − 672Ê + 560Ä − 280 + 84 − 14 + 1 254 − 882é + 1302Ê − 1050Ä + 490 − 126 + 14 −240 + 798é − 1092Ê + 770Ä − 280 + 42 198 − 588é + 672Ê − 350Ä + 70 −128 + 308é − 252Ê + 70Ä 58 − 98é + 42Ê −16 + 14é 2 0 jkkkkkkkldeeeeeeefQ"#$ëìêjkkkkkkkl;, < 0.5 deeeeeeef 0 −2 + 14é − 42Ê + 70Ä − 70 + 42 − 14 + 2 16 − 98é + 252Ê − 350Ä + 280 − 126 + 28 − 2 −58 + 308é − 672Ê + 770Ä − 490 + 168 − 28 + 2 128 − 588é + 1092Ê − 1050Ä + 560 − 168 + 28 − 2−198 + 798é − 1302Ê + 1120Ä − 560 + 168 − 28 + 2 240 − 882é + 1344Ê − 1120Ä + 560 − 168 + 28 − 2−254 + 896é − 1344Ê + 1120Ä − 560 + 168 − 28 + 2 128 − 448é + 672Ê − 560Ä + 280 − 84 + 14 − 1jkkkkkkkl deeeeeeefQ"#$ëìêjkkkkkkkl;, 0.5 ≤ ≤ 1 (4.32) Since length of the tool cannot change, the magnitude of orientation vector must be unity at all times to ensure feasible tool orientations. To ensure this, the heptic spline is divided by ‖()‖ to obtain normalised orientation spline (). () = ()‖()‖ , ∈ C0,1D (4.33) Thus the normalized orientation heptic B-spline can be represented as () = (/),W()È/PR (4.34) Chapter 4: Five-axis corner smoothing for CNC system 65 where the basis function for the normalized spline can be defined as (/),W = ,W‖()‖ (4.35) The basis functions for normalized and general heptic B-spline are compared against each other in figure 4.8 as shown below: Figure 4.8 Basis functions of Heptic and Normalized Heptic B-Spline As the norms of all the orientation control vectors È ∀ ' = 0,1, … ,8 are unity, the value of ‖()‖ is also very close to unity. Due to this, the basis functions of normalised heptic B-Spline almost coincides with that of heptic B-Spline as shown in the figure 4.8. Mathematically, it can be observed that the normalization term does not affect the continuity of the spline. Thus, both continuity and unity norm constraints can be satisfied using normalized spline. However, the positions of the control points È are yet to be calculated to completely define the orientation micro-spline. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.10.20.30.40.50.60.70.80.91Spline Parameter, uBasis Function for Spline Generation Q ë ì ê " # $ Heptic B-Spline Normalized Heptic B-Spline Chapter 4: Five-axis corner smoothing for CNC system 66 4.3.2 Optimal control point calculation for orientation micro-spline The orientation control points Q,",# and $ which make angles -, -, - and - respectively with the corner orientation vector Ø# should all lie in the plane created by the orientation vectors Ø" and Ø# to respect the continuity constraint. The fifth control point ë is chosen as the corner orientation Ø# = CÒ, Ò, ÒWD without losing generality. The control points ì,ê, and are assumed to be positioned at angles , , and respectively from the corner orientation vector Ø# in the plane created by the orientation vectors Ø# and Ø$ as shown in figure 4.9. Figure 4.9 Constraints for velocity, acceleration and jerk continuities at junctions for orientation spline Ø" Ø# Ø$ Q " # $ ë ì ê î" " " " ¯" ¯# Normalized # î# # # Chapter 4: Five-axis corner smoothing for CNC system 67 However, constraints based on orientation error tolerance limit , synchronisation of position and orientation spline and conditions for velocity, acceleration and jerk continuity at junctions Q ( = 0) and ( = 1) need to be imposed to evaluate the value of the angles where the control points are located. It should be noted here that as the same spline parameter is used for generation of position and orientation spline, both splines should be synchronized properly. 4.3.2.1 Velocity, acceleration and jerk continuity at junctions In order to achieve velocity, acceleration and jerk continuity at the junction points Q ( = 0) and ( = 1), continuity of the toolpath at the junction points are needed to be satisfied first. In the linear interpolation of toolpath between the cutter location (CL) data CV", Ø"D and CV#, Ø#D, any intermediate orientation which makes an angle ¶ with the vector Ø" is given by Rodrigues’ rotation formula [43] which gives: = Ø" cos ¶ + (T × Ø") sin ¶ + T(T ∙ Ø")(1 − cos ¶) (4.36) where T is the unit vector defining the axis of the rotation. T = Ø" × Ø#‖Ø# × Ø"‖ = Ø" × Ø#‖Ø"‖ ‖Ø#‖ sin ¶- = Ø" × Ø#sin ¶- (∵ ‖Ø"‖ = ‖Ø#‖ = 1 ) (4.37) Substituting the value of T in (4.36), we can write = Ø" cos ¶ + _(Ø" × Ø#) × Ø"sin ¶- b sin ¶ + Ø" × Ø#sin ¶- _(Ø" × Ø#) ∙ Ø"sin ¶- b (1 − cos ¶) (4.38) Using properties of scalar and vector triple products, we get (Ø" × Ø#) × Ø" = −(Ø" ∙ Ø#)Ø" + (Ø" ∙ Ø")Ø# = −Ø" cos ¶- + Ø# (Ø" × Ø#) ∙ Ø" = 0 (4.39) Chapter 4: Five-axis corner smoothing for CNC system 68 Using (4.38) and (4.39), = Ø" cos ¶ + J−Ø" cos ¶- + Ø# sin ¶- N sin ¶ = Ø" cos ¶ sin ¶- − Ø" cos ¶- sin ¶ + Ø# sin ¶sin ¶-= Ø" sin(¶- − ¶) + Ø# sin ¶sin ¶- , ¶ ∈ C0, ¶-D (4.40) It should also be noted that the ratio of the intermediate angle ¶ to the total angle ¶- between Ø" and Ø# should be in accord with the ratio of intermediate path length to the total path length Ë- between V" and V#: ¶ = Ë- ¶- (4.41) Using (4.40) and (4.41), the derivative of the orientation vector with respect to the toolpath length for a linear toolpath profile is expressed as follows: uu = uu¶ u¶u = −Ø" cos(¶- − ¶) + Ø# cos ¶sin ¶- Ju¶uN = ¶-Ë- J−Ø" cos(¶- − ¶) + Ø# cos ¶sin ¶- N (4.42) At the junction point ¶ = (¶- − -)3, uu ^P(<3<)õ = ¶-Ë- J−Ø" cos - + Ø# cos(¶- − -)sin ¶- N (4.43) Similarly, differentiating (u u⁄ ) with respect to and substituting ¶ = (¶- − -)3, we get uu cP(<3<)õ = −J¶-Ë-N _Ø" sin - + Ø# sin(¶- − -)sin ¶- b = −J¶-Ë-N |P(<3<)õ (4.44) uu cP(<3<)õ = −J¶-Ë-N J−Ø" cos - + Ø# cos(¶- − -)sin ¶- N = −J¶-Ë-N uu ^P(<3<)õ (4.45) Chapter 4: Five-axis corner smoothing for CNC system 69 Now, the values of (u u⁄ ), (u u⁄ ) and (u u⁄ ) will be calculated for spline segments at junction points and these values will be equated with the corresponding values for linear segments for ensuring continuity at junctions. Using (4.12), the derivative of the spline parameter with respect to the toolpath length at the junction point = 0 can be expressed as uu^òPR = 1ù÷uÛu ø + JuÛÜu N + ÷uÛÝuøòPR (4.46) Differentiating (4.4) with respect to the spline parameter and substituting = 0, uÚu^òPR =deeeeef−101000000 jkkkkkl deeeeefÚQÚ"Ú#Ú$ÚëÚìÚêjkkkkkl;= 10(Ú" − ÚQ) (4.47) Taking modulus on both the sides, JuÚuN^òPR = ùJuÛu N + _uÛÜu b + JuÛÝuNòPR = 10(‖Ú" − ÚQ‖) = 10(0.5Ë) = 5Ë (4.48) Similarly, JuÚuN^òP- = 5Ë (4.49) Combining (4.46), (4.48) and (4.49), we can write uu^òPR = uu^òP- = 15Ë (4.50) Chapter 4: Five-axis corner smoothing for CNC system 70 From (4.11), we have uucòPR = uucòP- = 0 ; uucòPR = uucòP- = 0 (4.51) Using (4.50), (4.51) and the method of partial differentiation, the first, second and the third derivative of toolpath orientation vector with respect to the toolpath length for normalised heptic spline profile at the junction point ¶ = (¶- − -), can be written as uu ^P(<3<)ö = uu ^òPR = ¸uu JuuNºòPR = 15Ë uu^òPR (4.52) uu cP(<3<)ö = uu còPR = uu JuuN + uu _uubòPR = _uu JuuNbcòPR= 125Ë uu còPR (4.53) uu cP(<3<)ö = uu còPR = uu JuuN + 3uu JuuN _uub + uu _uubòPR= _uu JuuNbcòPR= 1125Ë uu còPR (4.54) From equations (4.43), (4.44), (4.45), (4.52), (4.53) and (4.54), it can be written that the continuity will be maintained at the starting junction = 0 if uu ^P(<3<)õ = uu ^P(<3<)ö ⇒ ¶-Ë- J−Ø" cos - + Ø# cos(¶- − -)sin ¶- N = 15Ë uu^òPR (4.55) Chapter 4: Five-axis corner smoothing for CNC system 71 uu cP(<3<)õ = uu cP(<3<)ö ⇒ − J¶-Ë-N _Ø" sin - + Ø# sin(¶- − -)sin ¶- b = 125Ë uu còPR (4.56) uu cP(<3<)ö = uu còPR ⇒ − J¶-Ë-N J−Ø" cos - + Ø# cos(¶- − -)sin ¶- N = 1125Ë uu còPR (4.57) Now, differentiating the orientation vector defined by equations (4.32) and (4.33) with respect to the spline parameter and substituting = 0, we get uu^òPR =deeeeeeef−14 cos(- − -) 14 0 0 0 0 0 0 0 jkkkkkkkldeeeeeeefQ"#$ëìêjkkkkkkkl;, (4.58) uu còPR =deeeeeeef−140 cos(- − -) − 84 cos(- − -) + 588(cos(- − -)) − 196 140 − 392 cos(- − -) 84 0 0 0 0 0 0jkkkkkkkldeeeeeeefQ"#$ëìêjkkkkkkkl; 1+u (4.59) Chapter 4: Five-axis corner smoothing for CNC system 72 uu còPR =deeeeeeef - 588(−20 cos(- − -) − 6 cos(- − -) + 42(cos(- − -)) − 11) 1848 − 3528 cos(- − -) 420 0 0 0 0 0jkkkkkkkldeeeeeeefQ"#$ëìêjkkkkkkkl; (4.60) Where the expression for - is given by - = −84(−273 cos(- − -) + 22 cos(- − -) + 5 cos(- − -) + 42 cos(- − -)− 126 cos(- − -) cos(- − -) − 210(cos(- − -)) + 490(cos(- − -))+ 70) (4.61) Thus, from equations (4.55), (4.56) and (4.57) it can be concluded that the continuity will be maintained at the junction corresponding to = 0 if xyyyzyyy{ ¶-Ë- J−Ø" cos- + Ø# cos(¶- − -)sin ¶- N = 15Ë uu^òPR − J¶-Ë-N _Ø" sin - + Ø# sin(¶- − -)sin ¶- b = 125Ë uu còPR − J¶-Ë-N J−Ø" cos - + Ø# cos(¶- − -)sin ¶- N = 1125Ë uu còPR (4.62) Where the expressions for (u u)⁄ , (u u⁄ ) and (u u⁄ ) at the junction = 0 are presented in (4.58), (4.59) and (4.60) respectively. Similarly, the conditions for continuity at the junction corresponding to = 1 are formulated as Chapter 4: Five-axis corner smoothing for CNC system 73 xyyyzyyy{ ¶Ë JØ$ cos − Ø# cos(¶ − )sin ¶ N = 15Ë uu^òP- − J¶Ë N _Ø$ sin + Ø# sin(¶ − )sin ¶ b = 125Ë uu còP- − J¶ËN JØ$ cos − Ø# cos(¶ − )sin ¶ N = 1125Ë uu còP- (4.63) where the expressions for (u u)⁄ , (u u⁄ ) and (u u⁄ ) at the junction = 1 are formulated as uu^òP- =deeeeeeef 0 0 0 0 0 0 0 −14 14 cos( − )jkkkkkkkldeeeeeeefQ"#$ëìêjkkkkkkkl;, (4.64) uu còP- =deeeeeeef 0 0 0 0 0 0 84 140 − 392 cos( − )−140 cos( − ) − 84 cos( − ) + 588(cos( − )) − 196jkkkkkkkldeeeeeeefQ"#$ëìêjkkkkkkkl; , (4.65) Chapter 4: Five-axis corner smoothing for CNC system 74 uu còP- =deeeeeeef 0 0 0 0 0 −420 −1848 + 3528 cos( − )−588(−20 cos( − ) − 6 cos( − ) + 42(cos( − )) − 11) jkkkkkkkldeeeeeeefQ"#$ëìêjkkkkkkkl; (4.66) Where the expression for is given by = 84(−273 cos( − ) + 22 cos( − ) + 5 cos( − ) + 42 cos( − )− 126 cos( − ) cos( − ) − 210(cos( − )) + 490(cos( − ))+ 70) It should be noted here that two more conditions are required to evaluate the exact locations of the remaining 8 orientation control points. This will be done by formulating user-defined orientation error tolerance limit constraint and position and orientation spline synchronization constraint as discussed in the following sections. 4.3.2.2 Pre-defined orientation error tolerance limit, Ø¤È The normalized B-spline curve defined by equation (4.32) and (4.33) is so formulated that the maximum orientation error 9~ occurs at the mid-point of the spline. Substituting = 0.5 in equation (4.32), we get (0.5) =deeeeeeef01/643/3215/645/1615/643/321/640 jkkkkkkkl deeeeeeefQ"#$ëìêjkkkkkkkl;, (0.5) = (0.5)‖(0.5)‖ (4.67) Chapter 4: Five-axis corner smoothing for CNC system 75 The maximum orientation error 9~ must satisfy the user-defined orientation error tolerance limit and is evaluated as 9~ = cos3-((0.5).ë) ≤ (4.68) Taking the limiting case, cos() = (0.5).ë = (0.5).ë‖(0.5)‖ = ÷ 164" + 332# + 1564$ + 516ë + 1564ì + 332ê + 164ø .ë‖(0.5)‖ = ".ë + 6(#.ë) + 15($.ë) + 20(ë.ë) + 15(ì.ë) + 6(ê.ë) + .ë64 ‖(0.5)‖ = cos - + 6 cos - + 15 cos- + 20 + 15 cos + 6 cos + cos 64 ‖(0.5)‖ (4.69) where the angles -,, -, ,- and are defined in section 4.3.2 and shown in figure 4.9. 4.3.2.3 Synchronisation of position and orientation spline The synchronization of the position and orientation spline at the start and end of the spline curve can be achieved if following relations are respected (figure 4.10). 1t: -¶- = 2.5ËË- (4.70) ¢+u: ¶ = 2.5ËË (4.71) However, as we need only one additional condition to solve for orientation control points, equations (4.70) and (4.71) are combined as -¶- Ë- = ¶ Ë (4.72) Chapter 4: Five-axis corner smoothing for CNC system 76 Figure 4.10 Synchronization of position and orientation spline Due to the non-linear nature of constraint equations, closed form solution for angles -,, -, ,-,, - and does not exist. Thus, Newton-Raphson iterative optimization algorithm is utilized. To implement the algorithm, the 8 constraint equations formulated in (4.62), (4.63), (4.69) and (4.72) are first expressed in the form: (B) = (-,, -, ,-, ,-, ) = 0 ⇒ %-(-,, -, , -,, -, ) = 0%(-,, -, , -,, -, ) = 0…%(-,, -, , -,, -, ) = 0 (4.73) V" V# V$ Ø" Ø# Ø$ Ø# Ø# Ø# Ø# " ¯" ¯# # ÚQ Úê Q Chapter 4: Five-axis corner smoothing for CNC system 77 The derivative of this system is 8 × 8 jacobian matrix given by Þ(B) = Þ(-,, -, , -,, -, ) = deeef]%-]- ⋯ ]%-]⋮ ⋱ ⋮]%]- ⋯ ]%]-jkkkl (4.74) The primary limitation of the Newton-Raphson algorithm comes from improper choice of initial estimate. It is observed that the algorithm converges fast if the initial estimates are chosen as xyyzyy{ - = = - = = 2 - = = 3 - = = 3.5 ∴ B(R) = C , , 2 , 2 , 3 , 3 , 3.5 , 3.5D; (4.75) The subsequent iteration is computed by maximizing the second order Taylor approximation of (B) about B(W) and it follows following iteration rule. B(W) = B(W3-) − ÞB(W3-)3-B(W3-) , U ≥ 1 (4.76) The convergence criteria given by equation (4.77), is a reasonable choice for computational complexity and accuracy of the solution. ‖∆B‖ = pB(W) − B(W3-)p ≤ 103 (4.77) It should be noted here that the synchronization constraints corresponding to equations (4.70) and (4.71) are yet to be satisfied separately. In section (4.2), the length of segment Ú"Ú# is calculated as ËÉ = '+ 4 3 cos ÷2ø , Ë-5 , Ë5 (4.78) Chapter 4: Five-axis corner smoothing for CNC system 78 Using (4.70) and (4.71), the new length Ë/ÑÕ of segment Ú"Ú# can be calculated as Ë/ÑÕ = -2.5¶- Ë- = 2.5¶ Ë (4.79) If Ë/ÑÕ is smaller than ËÉ, the locations of position control points need to be recalculated based on Ë/ÑÕ using equations (4.21) and (4.23). Otherwise, if ËÉ is smaller than Ë/ÑÕ, the locations of all the orientation control points should be updated. For this, the values of - and are re-evaluated based on equations (4.70) and (4.71) using ËÉ. Keeping - constant, -, - and - are calculated using equation (4.62). The value of angle , and are calculated using eq. (4.63). 4.4 Feedrate planning After geometrical modification of the toolpath, feedrate planning along the toolpath is carried out. The smooth toolpath can be sub-grouped into two types of segments, i.e. (1) modified linear segments and (2) inserted spline segments. For feedrate planning, the lengths of toolpath segments need to be calculated. As discussed in section 4.2, the linear segments V"ÚQ and V$Úê are calculated as (ä" − #. ìä) and (ä# − #. ìä) respectively (figure 4.11). ÚQ Úê V" V# V$ ïVäÈð ï ñß ð! Figure 4.11 Lengths of toolpath segments Chapter 4: Five-axis corner smoothing for CNC system 79 The length of the spline segment is calculated using Simpson’s rule with an adaptive bisection technique as proposed by Yuen et.al. [16]. The length of spline segment from = 1 to = ° is given by Ë(°) − Ë(1) = Ï uu~ u (4.80) From equations (4.12) and (4.80), Ë(°) − Ë(1) = Ï ùJuÛu N + _uÛÜu b + JuÛÝuN~ u = Ï %()~ u (4.81) From Simpson’s rule and equation (4.81), Ë(°) − Ë(1) = Ï %()~ u = ° − 16 `%(1) + 4% J1 + °2 N + %(°)a (4.82) The interval C1, °D is divided into two equal segments C1-, °-D and C1, °D, and the lengths of the two new intervals are approximated with equation (4.82). Given some tolerance É, the approximation of the length over C1, °D is within tolerance if equation (4.83) is satisfied. If equation (4.83) is violated, the interval C1, °D is divided into two equal segments and the approximation procedure is repeated until all segments respect (4.83). |Ë(1-, °-) + Ë(1, °) − Ë(1, °)| < É (4.83) After calculating toolpath segments lengths, a continuous cubic acceleration feedrate profile with constant interpolation time is used to generate displacement command () as a function of time as shown in figure 4.12. Cubic acceleration feedrate profile comprised of 7 sections. During time intervals ?-, ? and ? the tool accelerates from starting feedrate, % to the commanded feedrate %. This is followed by a constant velocity region where the feedrate is kept constant at % for time interval ?Ä. Lastly, the tangential feedrate decreases to reach the end feedrate, %Ñ within the time intervals ?Ê, ?é and ?. The maximum allowable acceleration, deceleration and jerk along the toolpath are represented as 8~ , â~ and á~ respectively. The mathematical formulations Chapter 4: Five-axis corner smoothing for CNC system 80 of the analytical expressions governing the values of time intervals can be found in [44]. Figure 4.12 Cubic acceleration feedrate profile For linear toolpath segments, the tool tip position command, V() = CÖ(), (), ×()D and orientation command, Ø() = ÅÒ(), Ò(), ÒW()Ç share linear relationship with the displacement command () for interpolation between the cutter location (CL) data CV", Ø"D and CV#, Ø#D as shown in equation (4.84) and (4.85). V() = V" + (V# − V")Ë- (); (4.84) 1 2 3 4 5 6 7ss Lfs feJmaxJmaxT1 T2 T3 T4 T5 T6 T7timetimetimetimeTravel DistanceFeedrateAccelerationJerkssAmaxDmaxfcChapter 4: Five-axis corner smoothing for CNC system 81 () = Ø" sin(¶- − ¶()) + Ø# sin ¶()sin ¶- , ¶() = ¶-Ë- () (4.85) Where Ë- = ‖V# − V"‖ and ¶- = cos3-(Ø". Ø#). However, interpolating position and orientation command along a spline toolpath segment is more complex as the spline parameter does not share any direct relationship with the displacement command (). Various works are presented in literature for interpolating position and orientation commands for spline toolpath segment as shown in figure 4.13. Figure 4.13 Different methods of interpolating along a given spline toolpath The first approach, also called as natural interpolation, is based on optimizing the toolpath geometry to yield minimum discrepancy between the spline parameters and the arc length increments, resulting in an Optimally Arc Length Parameterized (OAP) spline [44]. However, if (i) Natural Interpolation (ii) Interpolation Using Taylor Series Expansion (iii) Interpolation with Feedrate Correction Polynomial ËWW Spline Toolpath: t = 8WÊ + =WÄ +⋯+ W Spline Toolpath Spline Toolpath Feed Correction Polynomial: = 8W + =Wé +⋯+YW Ö() Ö() Ö() () () () () () () () () () = 3- + ! ? + " ? ! = ! , " = ! + " Chapter 4: Five-axis corner smoothing for CNC system 82 there is significant discrepancy between the spline parameter and arc length, this discrepancy is directly reflected as fluctuation in the feedrate profile. Figure 4.14 Adaptive approach of formulating feed correction spline í() Spline arc lengths =C0, -, … , #D; Spline parameters í = C0, -, … , #D; 9th order feed correction model: = 8$$ +⋯+ 8- + 8R; ∀ 2 = 0,1, … ,© Unknowns: C8$, … , 8-, 8RD Simpson’s Rule Constrained least square optimization 8 = C8$Æ,… , 8-Æ,8RÆD calculated Is MSE ≥ #%& ? Yes No ©¢ =÷ − ø©#PR END í∗ = 89Æ$ +⋯+ 81Æ + 80Æ Split into two intervals 2 = 0,1, … ,© 2;⁄ 2 =© 2⁄ ,… ,©; Chapter 4: Five-axis corner smoothing for CNC system 83 In literature, this feedrate fluctuation is mitigated by applying Taylor series interpolation according to which the new value of the spline parameter is calculated by expanding its time-dependent Taylor series around the value of spline parameter in the previous interpolation time. Applying Taylor series interpolation results in significant improvement in feedrate consistency. However, it is computationally complex. The third approach is based on scheduling of the spline parameter to yield desired arc displacement, hence the desired feedrate profile accurately. This is done by either approximating the relationship between the arc length and the spline parameter using a feed-correction polynomial or by solving the exact value of the spline parameter using an iterative interpolation technique. However, sometimes it is difficult to express the spline parameter u as a function of arc length using the same feed-correction polynomial throughout the spline segment within specified prediction error tolerance limits. To overcome this problem, Yuen et.al. [18] suggested an adaptive approach to formulate a 9th order feed-correction spline to approximate the non-linear relation between spline parameter and displacement along the tool path. For our purpose, it is sufficient to use the feed-correction spline formulation technique used by Yuen et al [18] to express spline parameter as a function of toolpath length . The flowchart describing the formulation of feed correction spline () is presented in figure 4.14. Inverse kinematics is then performed on the interpolated position and orientation data ÅÖ(), (), ×(), ã(), ã(), ãW()Ç; to generate axis motion commands Å(), Ì(), ½(), ¶(), ¶()Ç;. The velocity, acceleration and the jerk profiles are generated using axis motion commands for all the five axes. In case drive velocity, acceleration or jerk limits are violated, commanded feedrate % is adjusted using equation 4.86 as discussed by Xavier et. al. [15]. %Á = minP-..Ê% ,'~· · , ù8~· · , ù á~· ·Î (4.86) Where , , are axis geometrical derivatives with respect to displacement along the toolpath and '~ , 8~ , á~ are axes velocity acceleration and jerk limits. The position and orientation data are interpolated again using the same procedure with the modified commanded feedrate %Á. Chapter 4: Five-axis corner smoothing for CNC system 84 4.5 Experimental results The proposed corner smoothing algorithm which leads to improvements in cycle time, tracking accuracy and smoothness while respecting user-defined error tolerance limits, is validated by conducting experiments on a Fadal 2216 vertical machining center retrofitted with a Nikken 5AX-130 compact tilting rotary table. The kinematic configuration of the 5-axis CNC system is shown in figure 4.15. ACXYZWorkpieceToolLac,zTya,zLInverse KinematicsForward KinematicsCutter LocationMachine Commands Figure 4.15 Kinematic configuration of 5-axis CNC machining center Chapter 4: Five-axis corner smoothing for CNC system 85 The inverse kinematic kinematics transformation from the work-piece coordinate system to the machine co-ordinate system is given by xyyyzyyy{ = −cos() Û − sin ()ÛÜ Ì = cos(8) sin()Û − cos(8) cos() ÛÜ − sin(8) ÛÝ − sin (8)(~,Ý ½ = sin(8) sin() Û − sin(8) cos() ÛÜ + cos(8) ÛÝ + cos(8) ÛÝ + cos(8) (~,Ý + (;Ü~,Ý 8 = cos3-ãW = cos3-ã ã⁄ Where (~,Ý= 70 mm and (;Ü~,Ý = 150 mm are the offsets, determined by the geometry of the rotary table. The machine is controlled by in-house developed, open real-time CNC, allowing for the rapid implementation of controllers and trajectories. The experimental test bed is shown in the figure 4.16. ZYXCARotary TablePower CableEncoder CableEncoder FeedbackdSpace Real Time Control (1 KHz)• Position Control (PID), Feed-forward friction compensation• Read ADC• Quadrature Encoder decoding• Write DACWorkstation PC• Read NC Program• Generate trajectories- Unsmooth trajectory- Smooth trajectoryPCI BUS (Reference Commands)Motor Current Command Figure 4.16 Experimental test bed consisting of the Fadal VMC 2216, Nikken 130-AX compact tilting table and dSPACE open real-time controller Chapter 4: Five-axis corner smoothing for CNC system 86 In order to design controller for the five- axis system, the drive inertia, viscous friction and static friction parameters are identified using rigid body identification procedure as described by Erkorkmaz et.al. [46]. The values of the identified parameters corresponding to each axis are presented in table 4.1. Table 4.1 Plant parameters for Fadal VMC 2216 Parameters X-Axis Y-Axis Z-Axis A-Axis C-Axis Amplifier gain )~(8/') 6.5723 6.2274 6.4841 1.2700 1.2700 Motor torque constant )(/8) 0.4769 0.4769 0.4769 0.3333 0.3333 Lead screw gain t* 1.5915(/t1u) 1.5915(/t1u) 1.2732 (/t1u) 0.0056(t1u/t1u) 0.0111 (t1u/t1u) Equivalent inertia á(U\.) 7.0028e-3 8.1904e-3 7.6715e-3 8.1068e-5 2.2122e-4 Viscous damping =(U\./) 0.023569 0.043009 0.032328 0.001100 0.002900 Positive coul. friction ?òÉ, () 1.83 1.17 2.3 0.2147 0.1568 Negative coul. friction ?òÉ3 () -1.1048 -1.02 -2.7 -0.2707 -0.1430 The drives are controlled by implementing standard proportional, integral and derivative (PID) controllers at a sampling frequency of 1 kHz. The PID gains are configured so that all the axes have matching dynamics in order to minimize the contour errors. The gain values of the designed PID control law are presented in table 4.2. A schematic diagram showing the control law and modelled plant with identified parameters are shown in figure 4.17. Table 4.2 PID controller parameters Parameters X-Axis Y-Axis Z-Axis Parameters A-Axis C-Axis )('/) 10 12.344 13.880 )(t1u/) 245.55 335.03 )('//) 50 61.718 69.400 )(t1u//) 1227.7 1675.1 )('. /) 0.3 0.3670 0.4147 )(t1u. /) 7.0147 9.5925 Chapter 4: Five-axis corner smoothing for CNC system 87 Figure 4.17 Control law and modelled plant for five-axis corner smoothing experiments The blade toolpath for five-axis corner smoothing experiments is shown in figure 4.18. A close observation of the experimental toolpath reveals that the G01 data points are moderately spaced in the beginning of the path which is followed by zone 1 where a large gap in the toolpath can be observed. This is followed by a region of high curvature and closely spaced G01 data points. Zone 1 Tool Orientation Tool starts from here Figure 4.18 Test toolpath for five-axis corner smoothing experiments PID +, +- "./ + 0 ¤ñ/T2 X456 X Chapter 4: Five-axis corner smoothing for CNC system 88 Figure 4.19 Toolpath position and orientation error in reference command generation 0 20 40 60 80 100 120 14000.010.020.030.040.050.060.070.080.090.1Tooltip Position Error (mm)0 20 40 60 80 100 120 14000.0020.0040.0060.0080.010.0120.0140.0160.0180.02Displacement along the toolpath (mm)Tool Orientataion Error (degree)Zone 1 Chapter 4: Five-axis corner smoothing for CNC system 89 As all the position and orientation corners in the toolpath are smoothed by inserting position and orientation micro-splines respectively, the proposed smoothing algorithm leads to position and orientation error at and around each CAM transition points as shown in figure 4.19. From the figure, it is observed that the tool tip position and orientation error shows various peaks. These peak points correspond to the mid-point of the inserted spline segment at each CAM transition point as the splines are formulated to have maximum error at the mid-points (see figure 4.3). The symmetrical nature of the error plot at each transition point can be attributed to the symmetrical nature of the inserted spline. Moreover, it can be observed that pattern of both position and orientation error plot are similar. This validates proper synchronization of the position and orientation splines as discussed in section 4.3.2.3. The position and orientation error always remain within the pre-defined corner position and orientation tolerance of 0.1 and 0.1 u9\t99 respectively. However, it should be noted that at most of the transition points, the error remain well below the pre-defined tolerance limits. This is because the CAM points are very closely spaced resulting in very small toolpath segment lengths. As each linear toolpath segment is used to smooth two corner points corresponding to the start and end-point of the segment, the maximum length of the segment used in each smoothing must be below half of the total toolpath segment length as also shown in equation 4.28. To show the effect of the proposed algorithm in cycle time reduction, the experiments are carried out before and after smoothing the toolpath. A commanded feedrate of 100 9E⁄ is used to carry out the experiments. Cubic acceleration feedrate profile is used in both cases. Corner position and orientation tolerance limits are chosen as 0.1 and ' 1800⁄ t1u respectively. Axis feedrate, acceleration and jerk limits are set as 200 9E⁄ , 1000 9E⁄ and 50000 9E⁄ respectively for all the translational drives and 1 t1u 9E⁄ , 10 t1u 9E⁄ and 500 t1u 9E⁄ respectively for all the rotational drives to ensure that the manufacturer specified drive limits are not violated. The tangential feedrate profile for proposed corner smoothing algorithm is also compared against the predicted tangential feedrate profile of Mori Seiki NMV5000 CNC system for the same toolpath and commanded feedrate. Chapter 4: Five-axis corner smoothing for CNC system 90 Figure 4.20 Experimental tangential feedrate profile before and after corner smoothing The tangential feedrate profiles calculated using the position data from encoder measurements are shown in figure 4.20. From the tangential feedrate profile, it can be observed the tool cannot reach the commanded feedrate of 100 9E⁄ in any of the three cases. This is because the CAM data points are very closely spaced and toolpath has high curvature which results in lower tooltip velocity in order to ensure the feedrate, acceleration and jerk limits of the drive. The tool tip velocity increases at zone 1 as the toolpath segment length is comparatively large. As the tool leaves zone 1, it enters a region of high curvature closely spaced CAM points which results in decrease in the tangential feedrate as shown. It is also observed that the cycle time before implementation of smoothing algorithm in exact-stop mode is 8.288 sec. However, after implementing the algorithm cycle time gets reduced to 2.849 sec which leads to a total cycle time reduction of about 66% in this case. The observed cycle time reduction is due to two reasons: (1) The proposed algorithm avoids the tool motion to cease at each CAM transition point. (2) The maximum feedrate achieved after implementation of the smoothing algorithm is higher than the exact stop case which results in further improvement in cycle time. When compared against the predicted tangential feedrate profile of Mori Seiki NMV5000 CNC system, it is observed that the feedrate profile with proposed corner smoothing algorithm leads to slight improvement in cycle time. From this, it can be concluded that the proposed five-axis corner smoothing algorithm results in reduction of cycle time. 0 1 2 3 4 5 6 7 8 9−1001020304050607080Time (sec)Feedrate (mm/sec)8.268secFeedrate profile after corner smoothing2.849sec3.5secMori Seiki (Predicted)Feedrate profile before corner smoothingZone 1 Chapter 4: Five-axis corner smoothing for CNC system 91 Figure 4.21 Jerk of axis reference commands for experiments 0 0.5 1 1.5 2 2.5−505x 104X−Axis(mm/sec3 )0 0.5 1 1.5 2 2.5−505x 104Y−Axis (mm/sec3)0 0.5 1 1.5 2 2.5−505x 104Z−Axis(mm/sec3)0 0.5 1 1.5 2 2.5−5000500A−Axis (rad/sec3 )0 0.5 1 1.5 2 2.5−5000500Time (sec)C−Axis (rad/sec3 ) C2 Cont.Proposed C3 Cont.Zone 1 Chapter 4: Five-axis corner smoothing for CNC system 92 Next, the smoothness of the proposed continuous corner smoothing algorithm is validated. The smoothness of the commanded toolpath motion can be observed by analyzing the axis reference jerk commands which can be evaluated by utilizing the method of digital differentiation as shown in equation 4.87. u7u ≈ −7(,) + 87(,) − 137(,-) + 137(3-) − 87(3) + 7(3)8∆ ∀(,- − ) = ∆ (4.87) Where 7 = C Ì ½ 8 D; and ∆ = 0.001 9E. The reference jerk commands are calculated for both and continuous cases for all the five drives and plotted as shown in figure 4.21. From the plot, it can be observed that the reference jerk corresponding to zone 1 is comparatively lower for all the drives in both and continuous cases as predicted. As already mentioned zone 1 is followed by a region of high curvature and closely spaced CAM data points demanding higher jerk from all the drives. After further analysis, it is observed that the jerk profiles for the proposed continuous trajectory remains continuous throughout the toolpath motion. The continuous trajectory however, results in discontinuities with higher amplitudes in jerk profile for all the five axes especially after zone 1 where the tool enters region of high curvature and closely spaced CAM points. This discontinuities and higher jerk amplitudes might result in tool vibration and poor surface quality. Figure 4.22 Experimental average axis tracking error from encoder measurements Average Axis Tracking Error (8ß)/( "QQ∗ß¤¥9) Chapter 4: Five-axis corner smoothing for CNC system 93 Table 4.3 Percentage improvement in tracking error Axis X-Axis Y-Axis Z-Axis C-Axis A-Axis continuous 41.78 29.25 8.50 0.28 t1u 0.21 t1u continuous 49.89 36.53 10.41 0.31 t1u 0.26 t1u % improvement 16.26% 19.93% 18.34% 8.09% 18.58% In addition to showing improvements in cycle time and toolpath smoothness, it is observed that the continuous trajectory shows improvement in average axis tracking error for all the drives when compared against the continuous trajectory as shown in figure 4.22. Table 4.3 shows the average tracking error for all the axes in and continuous cases. Among the translational axes, the reference jerk commands for X-drive is the most aggressive followed by Y-drive. It should also be noted that the reference jerk commands for C-drive is more aggressive than A-drive. This might be a possible reason for higher axis tracking error shown by X-axis and C-axis as compared to other translational and rotational axes respectively. 4.6 Summary In this chapter, a novel decoupled approach is introduced to achieve local corner smoothing of five-axis toolpath. Toolpath position and orientation are smoothed by inserting quintic and normalized septic micro-splines, respectively between the adjacent linear toolpath segments. Optimal control points are calculated for position and orientation splines to maintain continuity throughout the toolpath while respecting user-defined corner position tolerance () and orientation tolerance () limits. Synchronization of position and orientation splines is carried out. After geometrical modification of the toolpath, feedrate planning is performed using cubic acceleration feedrate profile to preserve continuity in toolpath motion. The linear and the spline sections of the toolpath are interpolated by linear and spline interpolation techniques respectively. The non-linear relation between spline parameter() and displacement along the toolpath() is approximated using ninth-order feed correction spline. Inverse kinematics is then performed on the interpolated position and orientation data to generate axis motion commands. In case drive Chapter 4: Five-axis corner smoothing for CNC system 94 acceleration or jerk limits are violated, commanded feedrate is adjusted and position and orientation data are interpolated again. The proposed continuous toolpath motion is compared against the unsmooth and continuous motion in experiments to show improvements in cycle time, tracking accuracy and smoothness throughout the toolpath.Chapter 5: Conclusions and future work 95 Chapter 5: Conclusions and future work 5.1 Conclusions In this thesis, a new cycle time prediction scheme is proposed for machining operations based on identified CNC machine dynamics in exact-stop and continuous modes. Various system identification techniques are utilized to identify the implemented trajectory generation and corner smoothing technique and feed drive dynamics of the CNC system. It is shown that the cycle time of NC machining process is predominantly effected by trajectory generation and corner smoothing techniques implemented on the CNC system. However, the closed-loop feed drive dynamics does not have much influence on the cycle time. An analytical approach for predicting cycle time based on the identified CNC system dynamics and given part program is presented. In addition, a novel decoupled approach for five-axis corner smoothing is presented to reduce the cycle time of milling operations. Toolpath position and orientation are smoothed by inserting quintic and normalized septic micro-splines, respectively between the adjacent linear toolpath segments. Optimal control points are calculated for position and orientation splines to achieve continuity at the junctions between the splines and the linear segments while respecting user-defined corner position tolerance and orientation tolerance limits. Synchronization of position and orientation splines is carried out. After geometrical modification of the toolpath, feedrate planning is performed using continuous cubic acceleration feedrate profile to ensure a smooth and continuous motion throughout the five-axis toolpath. The primary results of the thesis work are summarized as follows: (1) The proposed cycle time prediction algorithm is found to estimate feedrate profile and cycle time for a given toolpath accurately when compared against the experimentally measured data from Mori Seiki NMV5000 DCG CNC Machining Center. The cycle time prediction error remains within 5% for various 2-axis, 3-axis and 5-axis toolpaths in both exact- stop and continuous mode. Chapter 5: Conclusions and future work 96 (2) The proposed continuous five-axis corner smoothing algorithm is employed to generate the smoothed toolpath motion which is compared against the unsmooth and continuous motion in simulations and experiments. Up to 67% reduction in cycle time and consistent improvement in smoothness and axis-tracking error are achieved using the proposed algorithm for five-axis machining of free-form surfaces. The contributions made by this thesis work are summarized below: (1) An attempt is made to identify the trajectory generation and corner smoothing algorithm applied in a commercial CNC machine with the help of simple G-code command and various existing system identification techniques. A new technique is developed to predict cycle time of milling operations involving 2-axis, 3-axis and 5-axis toolpaths robustly. None of the other existing cycle time prediction technique can be applied to all range of milling operations to predict cycle time within acceptable prediction error. (2) The three-axis position corner smoothing technique available in literature ensures continuity of the toolpath. However, high quality standards requirement for manufacturing products leads to the growing demand for smoother toolpath generation with continuous jerk. A new local toolpath position smoothing technique is developed to ensure jerk continuous motion with minimal feed fluctuation and user-defined position tolerance. (3) A novel technique of tool orientation smoothing by inserting normalized heptic B-spline between linearly interpolated orientation vectors is developed. Normalized spline has never been used before in the literature to the best of the author’s knowledge. Optimal control points for orientation spline is calculated to ensure the modified path satisfies user-defined tool orientation error and jerk continuity at the connection between the linearly interpolated orientation vector and orientation spline. Chapter 5: Conclusions and future work 97 5.2 Future research directions Several research directions can be pursued in future in the field of cycle time prediction and five-axis corner smoothing. Some of them are discussed as follows: (1) It is observed that the cycle time prediction error increases when the commanded toolpath is very small and the commanded feedrate is very high especially in continuous mode. This might be because in the current research, a simplified model of the system is assumed. A more detailed study of the CNC system can be carried out with the developed algorithm as a base for the purpose of improving the results in above-specified case. Also, as most of the machining operations in industry also involves auxiliary motions such as tool-change time, approach time etc. In the current research all the auxiliary motions are ignored as they generally account for less than 5% of total cycle time. In order to implement the developed approach in shop floor environment, a framework needs to be developed to include both cutting and non-cutting time. (2) The developed five-axis corner smoothing approach ensures 3rd order continuity in toolpath geometry and motion and it leads to significant reduction in cycle time and tracking error. However, the cycle time can be reduced further by optimizing the curvature of the toolpath. Minimum curvature five-axis toolpath can be developed which can ensure fastest possible cycle time. The problem is certainly mathematically challenging but it has huge potential for practical application. The other potential improvement can be brought upon by developing a five-axis corner smoothing algorithm which can be implemented on real-time. CNC research in the field of toolpath smoothing is yet to address this issue. Bibliography 98 Bibliography [1] R.T. Coelho, A.F.D. Souza, A.R. Roger, A.M.Y. Rigatti, A.A.D.L. Ribeiro, "Mechanistic approach to predict real machining tme for miling free-form geometries applying high feed rate," International Journal of Advanced Manufacturing Technology, vol. 46, pp. 1103-1111, 2010. [2] X. Yan, K. Shirase, M. Hirao and T. Yasui, "NC program evaluator for higher machining productivity," International Journal of Machine tool and Manufacture, vol. 39, pp. 1563-1573, 1999. [3] X. Yan, K. Shirase and H. Kawabata, "Improving productivity of machining canters based on NC program diagnostic system," Journal of Japan Society for Precision Engineering, vol. 63, no. 7, pp. 1044-1048, 1997. [4] R. Othmani, W. Bouzid and M. Hbaieb, "Machining time in rough milling," Materials Technology, vol. 23, pp. 169-173, 2008. [5] M. Hbaieb, R. Othmani and W. Bouzid, "Time modeling in high-speed machining of mold pockets," International Journal of Advanced Manufacturing Technology, vol. 53, pp. 113-120, 2011. [6] J. Y. Jung, "Manufacturing cost estimation for machined parts based on manufacturing features," Journal of Intelligent Manufacturing, vol. 13, pp. 227-238, 2002. [7] A. Dugas, J.J. Lee, M. Terrier and J.Y. Hascoet, "Developement of a machining simulator considering machine behaviour," Journal of Engineering Manufacture, vol. 217, pp. 1333-1339, 2003. Bibliography 99 [8] X. Yan, K. Shirase, M. Hirao and T. Yasui, "NC program evaluator for higher machining productivity," International Journal of Machine Tools and Manufacture, vol. 39, pp. 1563-1573, 1999. [9] W. Mou, W. Chu and L. Tang, "Reseach on accurate simulation of NC program machining time," Tool Technology, vol. 43, pp. 50-54, 2009. [10] B.S. So, Y.H. Jung, J.W. Park and D.W. Lee, "Five axis machining time estimation algorithm based on machine characteristics," Journal of Materials Processing Technology, vol. 187, pp. 37-40, 2007. [11] M. Monreal and C.A. Rodriguez, "Influence of toolpath strategy on the cycle time of high speed milling," Computer-Aided Design, vol. 35, pp. 395-401, 2003. [12] H. Siller, C.A. Rodriguez and H. Ahuett, "Cycle time prediction in high speed milling operations for sculptured surface finishing," Journal of Materials Processing Technology, vol. 174, pp. 355-362, 2006. [13] E.Y. Heo, D.W. Kim, B.H. Kim and F.F. Chen, "Estimation of NC machining time using NC block distribution for sculptured surface machining," Robotics and Computer-Integrated Manufacturing, vol. 22, pp. 437-446, 2006. [14] M.C. Ho, Y.R. Hwang and C.H. Hu, "Five-axis orientation smoothing using quaternion interpolation algorithm," International Journal of Machine Tools and Manufacture, vol. 43, pp. 1259-1267, 2003. [15] X. Beudaert, P.Y. Pechard and C. Tournier, "5-Axis toolpath smoothing based on drive constraints," International journal of machine tools and manufacture, pp. 958-965, 2011. Bibliography 100 [16] W. Lei, M. Sung, L. Lin and J. Huang, "Fast real-time NURBS path interpolation for CNC machine tools," International journal of machine tools and manufacture, vol. 47, no. 10, pp. 1530-1541, 2007. [17] R.V. Fleisig and A.D. Spence, "A constant feed and reduced angular acceleration interpolation algorithm for multi-axis machining," Computer-Aided Design, vol. 33, pp. 1-15, 2001. [18] A. Yuen, K. Zhang and Y. Altintas, "Smooth trajectory generation for five-axis machine tools," International journal of machine tools and manufacture, pp. 11-19, 2013. [19] V. Pateloup, E. Duc and P. Ray, "Bspline approximation of circle arc and straight line for pocket machining," Computer-Aided Design, vol. 42, pp. 817-827, 2010. [20] H. Zhao, L.M. Zhu and H. Ding, "A real-time look-ahead interpolation methodology with curvature-continuous B-spline transition scheme for CNC machining of short line segments," International Journal of Machine Tools & Manufacture, vol. 65, pp. 88-98, 2013. [21] Q. Bi, Y. Wang, L. Zhu and H. Ding, "A practical continuous-curvature Bezier transition algorithm for high speed machining of linear toolpath," Intelligent Robotics and Applications, vol. 7102, pp. 465-476, 2011. [22] S.J. Yutkowitz, and W. Chester, "Apparatus and method for smooth cornering in a motion control system". United States Patent 6922606, 2005. [23] K. Erkorkmaz, C.H. Yeung and Y. Altintas, "Virtual CNC system. Part II. High speed contouring application," International Journal of Machine Tools & Manufacture, vol. 46, pp. 1124-1138, 2006. Bibliography 101 [24] B. Sencer and E. Shamoto, "Curvature-continuous sharp corner smoothing scheme for cartesian motion systems". [25] C.A. Ernesto and R.T. Farouki, "High-speed cornering by CNC machines under prescribed bounds on axis accelerations and toolpath contour error," International Journal of Advanced Manufacturing Technology, vol. 58, pp. 327-338, 2012. [26] B. Sencer and E. Shamoto, "Curvature continuous sharp corner smoothing scheme for cartesian motion systems," 2014. [27] X. Beudaert, S. Lavernhe and C. Tournier, "5-axis local corner rounding of linear toolpath discontinuities," International journal of machine tools and manufacture, pp. 9-16, 2013. [28] B. Hurst, The journeyman guides to CNC machines, Lulu Press, 2006. [29] Mori Seiki Co.Ltd., "DMG Mori," [Online]. Available: http://www.moriseiki.it. [30] Mori Seiki Co.Ltd., "NMV500 DCG," [Online]. Available: http://www.moriseiki.co.uk/2007/05/nmv5000-dcg%E2%84%A2-the-new-benchmark-in-flexibility-and-perfection/. [31] D. Mori, "MAPPS III DMG Mori," [Online]. Available: http://www.moriseiki.co.uk/products/applications/mapps-iii/. [32] Fanuc Corporation, Fanuc 31i Parameter Manual, Fanuc Corporation. [33] N. Borlin, "Non-linear Optimization: Trust-region methods," December 2007. [Online]. Available: https://www8.cs.umu.se/kurser/5DA001/HT07/lectures/trust-handouts.pdf. [34] G. A. Shultz, R. B. Schnabel and R.H. Byrd, "A family of trust-region-based algorithms for unconstrained minimization with strong global convergence properties," SIAM Journal of Numerical Analysis, vol. 22, pp. 47-67, 1985. Bibliography 102 [35] R.H. Byrd, R.B. Schnabel, and G.A. Shultz, "Approximate Solution of the Trust Region Problem by Minimization over Two-Dimensional Subspaces," Mathematical Programming, vol. 40, pp. 247-263, 1988. [36] Wikipedia, "Linear lesat squares (Mathematics)," 2014. [Online]. Available: http://en.wikipedia.org/wiki/Linear_least_squares_(mathematics). [37] B. Sencer and Y. Altintas, "Identification of 5-axis machine tools feed drive systems for contouring simulation," International Jornal of Automation Technology, vol. 5, pp. 377-386, 2011. [38] K. Erkorkmaz and W. Wong, "Rapid identification techniques for for virtual CNC drives," International Journal of MAchine Tools and Manufacture, vol. 47, pp. 1381-1392, 2007. [39] DMG Mori Seiki Co. Ltd., NMV5000 DCG User Manual. [40] Rik Pintelon and Johan Schoukens, System Identification: A Frequency Domain Approach (2nd Ed), vol. 76, John Wiley and Sons, Inc., 2012. [41] R. Aarts, "System identification and parameter estimation," 2012. [Online]. Available: http://www.utwente.nl/ctw/wa/web_dev/old/lectures/113170/notes/notes.pdf. [42] B. Sencer, Y. Altintas and E. Croft, "Feed optimization for five-axis CNC machine tools with drive constraints," Machine Tools and Manufacture, pp. 733-745, 2008. [43] E.B. Dam, M. Koch and M. Lillholm, "Quaternions, Interpolation and Animation," 12 July 1998. [Online]. Available: http://web.mit.edu/2.998/www/QuaternionReport1.pdf. [44] "Rodrigues' Rotation Formula," [Online]. Available: http://en.wikipedia.org/wiki/Rodrigues'_rotation_formula. Bibliography 103 [45] K. Erkorkmaz, "Optimal trajectory generation and precision tracking control for multi-axis machine," The university of British columbia, 2004. [46] K. Erkorkmaz and Y. Altintas, "Quintic spline interpolation with minimal feed fluctuation," Journal of manufacturing science and engineering, pp. 339-349, 2005. [47] K. Erkorkmaz and Y. Altintas, "High speed CNC system design. Part II: Modeling and identification of feed drives," International Journal of Machine Tools and Manufacture, vol. 41, pp. 1487-1509, 2001. [48] A. Yuen, "Spline interpolation and contour error pre-compensation for five-axis machining," The University of British Columbia, 2011.
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Prediction and reduction of cycle time for five-axis...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Prediction and reduction of cycle time for five-axis CNC machine tools Tulsyan, Sneha 2014
pdf
Page Metadata
Item Metadata
Title | Prediction and reduction of cycle time for five-axis CNC machine tools |
Creator |
Tulsyan, Sneha |
Publisher | University of British Columbia |
Date Issued | 2014 |
Description | The growing demand for high speed machining in aerospace, automotive and die and mold industry has directed the interest of research community towards prediction and reduction of machining cycle time. In this thesis, a cycle time prediction scheme is proposed for milling operations based on identified CNC machine dynamics in exact-stop and continuous mode. Various system identification techniques are utilized to identify the implemented trajectory generation and corner smoothing technique and feed drive dynamics of the CNC system. An analytical approach for predicting cycle time based on the identified CNC system dynamics and given part program is presented. It is shown that the cycle time of NC machining process is predominantly affected by trajectory generation and corner smoothing techniques implemented on CNC systems. The closed-loop feed drive dynamics does not have much influence on the cycle time, since the tracking delay is insignificant in position control servos. The proposed algorithm is validated in experiments and experimental results has shown that the cycle time prediction error remains within 5% for various 2-axis, 3-axis and 5-axis toolpaths. In the later half of the thesis, a new decoupled approach for five-axis corner smoothing is presented to reduce the cycle time of milling operations. Toolpath position and orientation are smoothed by inserting quintic and normalized septic micro-splines, respectively between the adjacent linear toolpath segments. Optimal control points are calculated for position and orientation splines to achieve C³ continuity at the junctions between the splines and the linear segments while respecting user-defined corner position tolerance and orientation tolerance limits. Synchronization of position and orientation splines is carried out. After geometrical modification of the toolpath, feedrate planning is performed using C³ continuous cubic acceleration feedrate profile to preserve jerk continuity in toolpath motion. The proposed C³ continuous toolpath motion is compared against the unsmooth and C² continuous motion in experiments and simulations to show improvements in cycle time, tracking accuracy and smoothness throughout the toolpath. |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | eng |
Date Available | 2014-11-25 |
Provider | Vancouver : University of British Columbia Library |
Rights | Attribution-NonCommercial-NoDerivs 2.5 Canada |
DOI | 10.14288/1.0135618 |
URI | http://hdl.handle.net/2429/51195 |
Degree |
Master of Applied Science - MASc |
Program |
Mechanical Engineering |
Affiliation |
Applied Science, Faculty of Mechanical Engineering, Department of |
Degree Grantor | University of British Columbia |
GraduationDate | 2015-02 |
Campus |
UBCV |
Scholarly Level | Graduate |
Rights URI | http://creativecommons.org/licenses/by-nc-nd/2.5/ca/ |
AggregatedSourceRepository | DSpace |
Download
- Media
- 24-ubc_2015_february_tulsyan_sneha.pdf [ 4.8MB ]
- Metadata
- JSON: 24-1.0135618.json
- JSON-LD: 24-1.0135618-ld.json
- RDF/XML (Pretty): 24-1.0135618-rdf.xml
- RDF/JSON: 24-1.0135618-rdf.json
- Turtle: 24-1.0135618-turtle.txt
- N-Triples: 24-1.0135618-rdf-ntriples.txt
- Original Record: 24-1.0135618-source.json
- Full Text
- 24-1.0135618-fulltext.txt
- Citation
- 24-1.0135618.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.24.1-0135618/manifest