Feedrate Optimization with Contouring Error and Drive Constraints in Five-Axis Machining by Erina Okuda Nesbit B.A.Sc., The University of British Columbia, 2016 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) March 2019 Β© Erina Okuda Nesbit, 2019 ii The following individuals certify that they have read, and recommend to the Faculty of Graduate and Postdoctoral Studies for acceptance, a thesis/dissertation entitled: Feedrate Optimization with Contouring Error and Drive Constraints in Five-Axis Machining submitted by Erina Okuda Nesbit in partial fulfillment of the requirements for the degree of Master of Applied Science in Mechanical Engineering Examining Committee: Dr. Yusuf Altintas Supervisor Dr. Ryozo Nagamune Co-supervisor Dr. Clarence de Silva Additional Examiner Dr. Robert Rohling Additional Examiner iii Abstract Five-axis Computer Numerical Controlled (CNC) machine tools are used to machine parts with complex, curved surfaces. When the reference toolpath contains frequencies beyond the bandwidth of the servo drive, the actual axis position lags the reference position commands which leads to axis tracking error. The tracking errors of three translational and two rotational drives are projected along the path using a kinematic model of the machine to form contouring errors i.e. the geometric deviation of the actual tool movement from the commanded toolpath. Parts with contouring errors larger than the design tolerance are often scrapped. Although contouring errors can be decreased by reducing the machining feedrate, this causes the cycle time to increase resulting in less productivity. This thesis proposes a feedrate optimization method which minimizes the process cycle time without violating contouring error limits as well as velocity, acceleration and jerk limits of the machine drives. First, discrete 5-axis tool positions are fitted to two quintic b-splines to represent the desired tooltip position and tool orientation trajectory. An initial, uniform feedrate spline is also generated in quintic b-spline form. Derived from the toolpath splines, discrete tool positions at uniform path displacement intervals are decomposed into axis commands based on the machine kinematics, and velocity, acceleration and jerk are calculated. The axis commands are also passed through the equivalent transfer function of each drive to predict their tracking errors, which are projected onto the toolpath to find contouring error. The optimization algorithm takes in the calculated axis tracking errors, contouring error, and cycle time for the given toolpath and feedrate profile. Within the optimizer, a gradient descent algorithm iteratively modifies the feedrate spline control points where the new feedrate profile is used to re-evaluate the cycle time, contouring error, iv and drive signals until a local minimum has been found. The final output of the algorithm is an optimized feedrate spline which ensures a minimum cycle time for the process, while maintaining drive and contouring error limits. The proposed algorithms are experimentally validated on a 5-axis machine tool controlled by an in-house developed open CNC system. v Lay Summary For many high-tech industries such as aerospace and automotive, profit margins are linked to the efficiency and the dimensional accuracy of the resulting components (e.g. airplane wings, turbine blade). These industries use 5-axis computer-numerical-control (CNC) machines, which are sent movement commands by a computer and can cut complex, curved surfaces. Although many methods which simultaneously improve the efficiency and the dimensional accuracy of the produced part have been developed for simple parts (not curved surfaces) there are very few that work for 5-axis CNC machines. This thesis presents a strategy for 5-axis computer-numerical-control machining which attempts to maximize the speed of the tool movement while still keeping the movement error within limits. vi Preface I was the lead investigator for the work presented in Chapters 3 and 4, responsible for the development of the key sections of the algorithms. I planned the experimental design, conducted experimentation, and completed the analysis of results. Dr. Yusuf Altintas was the chief supervisor and Dr. Ryozo Nagamune was the co-supervisor for this work. vii Table of Contents Abstract ......................................................................................................................................... iii Lay Summary .................................................................................................................................v Preface ........................................................................................................................................... vi Table of Contents ........................................................................................................................ vii List of Tables ................................................................................................................................ ix List of Figures .................................................................................................................................x List of Symbols ........................................................................................................................... xiii List of Abbreviations ................................................................................................................ xvii Acknowledgements .................................................................................................................. xviii Chapter 1 Introduction..................................................................................................................1 Chapter 2 Literature Review ........................................................................................................6 2.1 Overview ......................................................................................................................... 6 2.2 Contouring Error Reduction Strategies ........................................................................... 7 2.3 Feedrate Optimization for Multi-Axis Machines .......................................................... 10 2.4 Feedrate Scheduling Based on Contouring Error Limits .............................................. 14 2.5 Conclusions ................................................................................................................... 16 Chapter 3 Two-Axis Feedrate Optimization with Drive and Contouring Error Limits .......18 3.1 Introduction ................................................................................................................... 18 3.2 Two-Axis Minimum-Time Feedrate Optimization Method ......................................... 18 3.3 Two-Axis Contouring Error Model .............................................................................. 21 3.4 Validation of Two-Axis Feedrate Optimization Method .............................................. 30 viii 3.5 Conclusions ................................................................................................................... 39 Chapter 4 Five-Axis Feedrate Optimization with Drive and Contouring Error Limits .......40 4.1 Introduction ................................................................................................................... 40 4.2 Five-Axis Minimum-Time Feedrate Optimization Method ......................................... 40 4.3 General Kinematic Model of Five-Axis CNC Systems ................................................ 43 4.4 Five-Axis Contouring Error Model .............................................................................. 46 4.4.1 Five-Axis Tracking Error Model .............................................................................. 49 4.4.2 Tooltip Position Contouring Error ............................................................................ 52 4.4.3 Tool Orientation Contouring Error ........................................................................... 54 4.5 Validation of Five-Axis Feedrate Optimization Method .............................................. 56 4.5.1 Description of Experimental Setup ........................................................................... 56 4.5.2 Simulation and Experimental Results ....................................................................... 59 4.5.3 Simulation Results for Impeller Toolpath................................................................. 67 4.6 Conclusions ................................................................................................................... 69 Chapter 5 Conclusion ..................................................................................................................70 5.1 Conclusions ................................................................................................................... 70 5.2 Future Directions .......................................................................................................... 72 Bibliography .................................................................................................................................74 ix List of Tables Table 3.1: Axis plant parameters of experimental setup ............................................................... 32 Table 3.2: Controller parameters for experimentation .................................................................. 32 Table 3.3: Optimization limits ...................................................................................................... 33 Table 3.4: Experimental validation cases for two-axis feedrate optimization method ................. 35 Table 3.5: Summary of simulation results .................................................................................... 38 Table 3.6: Summary of experimental results ................................................................................ 38 Table 4.1: Axis plant parameters of experimental setup ............................................................... 58 Table 4.2: Axis controller parameters for experimentation .......................................................... 58 Table 4.3: Optimization limits ...................................................................................................... 60 Table 4.4: Experimental validation cases for five-axis feedrate optimization method ................. 61 Table 4.5: Summary of simulation results .................................................................................... 63 Table 4.6: Summary of experimental results ................................................................................ 63 Table 4.7: Position and orientation contouring error limits applied to impeller trajectory .......... 67 Table 4.8: Simulated cases for feedrate optimization applied to impeller toolpath ...................... 68 x List of Figures Figure 1.1: Errors associated with multi-axis motion ..................................................................... 2 Figure 1.2: Effect of key parameters on contouring error: a) radius of curvature, b) feedrate ....... 3 Figure 2.1: Block diagram for the contouring error compensation method [10] ............................ 9 Figure 2.2: Sencer feedrate optimization algorithm based on velocity, acceleration, and jerk limits ............................................................................................................................................. 12 Figure 3.1: Proposed two-axis feedrate optimization algorithm based on drive and contouring error limits ..................................................................................................................................... 20 Figure 3.2: Two-axis contouring error model ............................................................................... 22 Figure 3.3: Method of calculating radius of curvature ................................................................. 26 Figure 3.4: Block diagram model for machine tool drives ........................................................... 27 Figure 3.5: Determination of local frequency at point i along reference toolpath ........................ 28 Figure 3.6: Toolpath used for validating 2-axis contouring error model ...................................... 29 Figure 3.7: Contouring error comparison between Erkorkmaz model and Dong (proposed) model....................................................................................................................................................... 30 Figure 3.8: Experimental setup for 2-axis feedrate optimization validation ................................ 31 Figure 3.9: System architecture for experimental setup ............................................................... 32 Figure 3.10: Bode plot of closed loop system for x- and y-axes .................................................. 33 Figure 3.11: Path trajectory: a) Tooltip trajectory b) Individual axis reference movement ......... 34 Figure 3.12: Optimized 2-axis feedrate spline .............................................................................. 35 Figure 3.13: Normalized predicted drive and contouring error limits .......................................... 36 Figure 3.14: Experimental 2-axis contouring error ....................................................................... 37 xi Figure 4.1: Proposed five-axis feedrate optimization algorithm based on drive and contouring error limits ..................................................................................................................................... 42 Figure 4.2: General kinematic model of 5-axis CNC system ....................................................... 44 Figure 4.3: General 5-axis contouring error definition ................................................................. 46 Figure 4.4: Proposed method of calculating 5-axis contouring error within feedrate optimization algorithm ....................................................................................................................................... 48 Figure 4.5: Erkorkmaz model tracking error vs. experimental tracking error .............................. 51 Figure 4.6: Sencer contouring error model: a) Tooltip position contouring error b) Tool orientation contouring error [3] .................................................................................................... 52 Figure 4.7: Five-axis contouring error model validation .............................................................. 55 Figure 4.8: Experimental setup for 5-axis feedrate optimization validation ................................ 57 Figure 4.9: Plant block diagram for single axis ............................................................................ 57 Figure 4.10: Tool Position and Orientation Trajectory ................................................................. 59 Figure 4.11: 5-Axis displacement in validation ............................................................................ 59 Figure 4.12: Optimized feedrate profile ........................................................................................ 61 Figure 4.13: Tooltip position contouring error comparison for validation cases 1-3 ................... 62 Figure 4.14: Predicted vs. experimental contouring error of optimized (case 3) feed profile: ..... 64 Figure 4.15: Contouring error of optimized feedrate profile based on contouring error and drive limits vs. only drive limits: a) tooltip position contouring error, b) tool orientation contouring error ............................................................................................................................................... 65 Figure 4.16: Experimental drive signals: a) linear axes, b) rotary axes ........................................ 66 Figure 4.17: Impeller blade: a) Example of impeller b) 5-axis toolpath of impeller blade .......... 67 xii Figure 4.18: Simulated tooltip position contouring error comparison for impeller blade toolpath cases 1-3 ........................................................................................................................................ 68 xiii List of Symbols π’ Normalized displacement along toolpath π Displacement along toolpath ?Μ?(π ) Feedrate ?Μ?(π ) Second time derivative of path displacement (tangential acceleration) π (π ) Third time derivative of path displacement (tangential jerk) π£πππ, ππππ, π½πππ Velocity, acceleration, and jerk limit ππ Tooltip position contouring error ππ Tool orientation contouring error πππππ Position contouring error limit πππππ Orientation contouring error limit ππ΄ Process cycle time ππ,π Predicted 2-axis contouring error at location π along the toolpath π π,π, π π,π Reference and actual radius of curvatures at location π along the toolpath ππ,π, ππ,π Reference and actual tool positions at location π along toolpath in WCF [π, π] General coordinate frame (GCF) [ππ, ππ] Circular coordinate frame (CCF) π₯π,π, π¦π,π Reference x- and y-axis movement at location π along toolpath ππ Angular frequency of tool motion at location π along toolpath ππ Phase of tool motion at location π along toolpath ππ(πππ), ππ(πππ) Reference frequency domain x- and y-axis movement for frequency ππ ππ(πππ), ππ(πππ) Actual frequency domain x- and y-axis movement for frequency ππ xiv πΊπ₯(πππ), πΊπ¦(πππ) X- and y-axis position transfer function for frequency ππ |πΊπ₯(πππ)|, |πΊπ¦(πππ)| Magnitude of x- and y-axis position transfer function for frequency ππ β πΊπ₯(πππ), β πΊπ¦(πππ) Phase of x- and y-axis position transfer function for frequency ππ πΎπ, πΎπ, πΎπ Proportional, integral, derivative controller parameters πΎπ Current amplifier gain of drive πΎπ‘ Motor torque constant of drive ππ Transmission ratio converting drive motion from rotational to linear π½ Moment of inertia of system reflected at the motor shaft π΅ Viscous damping of system reflected at motor shaft ππ Closed loop bandwidth of system ππ,π Feedrate at point π along toolpath π(π‘) = [ππ₯(π‘)ππ¦(π‘)ππ§(π‘)] Tooltip position in WCF π(π‘) = [ππ(π‘)ππ(π‘) ππ(π‘)] Tool orientation in WCF π(π‘) = [ π(π‘)π(π‘)π(π‘)π΄(π‘)πΆ(π‘)] Axis movements in the MCF πΏππ,π§ Offset between the c-axis surface and the a-rotational axis πΏππ¦π,π§ Offset between the a-rotational axis and the X-Y translational axis xv π(π ) = [ ππ₯(π )ππ¦(π )ππ§(π )ππ(π )ππ(π )] Five-axis tracking error in Laplace domain π(π ) = [ π₯(π ) π¦(π )π§(π )π(π )π(π ) ] Reference axis movement in Laplace domain πΊπ(π ) Tracking error transfer function πΊπβ² , πΊπβ²β², πΊπβ²β²β² First three derivatives of tracking error transfer function in Laplace domain πΎ1, πΎ2, πΎ3 5-axis tracking error model coefficients ?Μ?(π), ?Μ?(π), π(π) Discrete-time domain reference velocity, acceleration, and jerk π‘, ?β?, ?β? Tangential, normal, and binormal unit vectors π?Μ?, π?Μ? Reference velocity and acceleration of tooltip position in workpiece coordinate frame πΉ Coordinate transformation matrix ππΉ = [ππ‘ππππ] Projected tracking error onto tangential, normal, and binormal directions ?β? = [?Μ?π?Μ?π] Rotary axis velocity π½π Jacobian converting rotary axis velocity to angular velocity ?ββ? Angular velocity in the WCF π Scaling constant converting angular velocity to normalized angular velocity xvi ππ = [ππππ] Rotary tracking errors in ACF ππ Rotary tracking errors in WCF xvii List of Abbreviations b-spline β Bezier spline CCF β Circular coordinate frame CNC β Computer numerical control GA β Genetic algorithm MCF β Machine coordinate frame NURBS β Non-uniform rational b-spline PID β Proportional integral derivative controller PSO β Particle swarm optimization WCF β Workpiece coordinate frame ZPETC β Zero phase error tracking control xviii Acknowledgements I would first and foremost like to acknowledge my supervisor Dr. Yusuf Altintas for his invaluable support, generosity, and guidance throughout this experience. It has been an honor to be a part of Dr. Altintasβ research lab and I feel extremely privileged to have received his mentorship. I would also like to thank my co-supervisor Dr. Ryozo Nagamune who guided me through many technical challenges in my research. His constant encouragement and support was a source of strength for me, and I feel so lucky to have had him as a mentor. To my friends at the Manufacturing Automation Laboratory, thank you for making my day-to-day experience exciting. Our daily conversations not only made me a stronger researcher, but more importantly, a stronger thinker. I will look back on our heated debates fondly for many years to come. I would like to thank my partner Irfan-ur-rab Usman for his unconditional support and for teaching me the importance of perseverance in the face of hardship. Finally, Iβd like to thank my magnificent family. Iβm extremely grateful to my parents for teaching me the value of education and for being my pillars of strength. Thank you to my big sister Maya who is my best friend and chief confidante.1 Chapter 1 Introduction For industries which produce high volumes of parts, the quality of machining and fabrication is critical for success. Three fundamental branches of industrial fabrication include subtractive machining, additive manufacturing and part measurement. These applications require a tool to be moved relative to a workpiece in multiple axes. For all three applications, part accuracy is an important consideration. The parts are scrapped if the errors exceed their tolerance. Metrics for part accuracy include tracking error and contouring error. Tracking error is the difference in the positions of the individual axes from their intended positions at a specific point in time. Contouring error is defined as the point of closest approach between the actual tool position and the reference trajectory. The difference between tracking error and contouring error is illustrated in Figure 1.1. Although tracking error is easier to obtain for 5-axis trajectories, contouring error is a better measure of part accuracy as it calculates errors in the resultant part geometry. 2 Figure 1.1: Errors associated with multi-axis motion Contouring error is typically caused by axis drive limits, friction within the mechanism, external disturbance forces, and axis controller performance. In cases where the error from the tracking performance of the controller is dominant, toolpaths which contain frequency content near or over the system bandwidth will lead to greater contouring error. The frequency content of the toolpath is largely determined by the toolpath geometry and feedrate, the tangential velocity of the tool along the toolpath. At areas of higher curvature and feedrate, the input has higher frequency content, leading to greater contouring error. Figure 1.2 shows the effect of radius of curvature and feedrate on contouring error. 3 Figure 1.2: Effect of key parameters on contouring error: a) radius of curvature, b) feedrate Cycle time, the time taken to complete the trajectory, is also a critical performance metric for production efficiency. A reduction in cycle time increases the throughput of the process and can reduce overall cost per part. Increasing feedrate leads to a reduction in cycle time. Since it is desirable to keep cycle time low for increased productivity, the feedrate is kept as high as possible. However, as feedrate increases, so does contouring error. The reciprocal effect of feedrate on cycle time and contouring error presents an opportunity for optimization. As it is desirable to reduce a) b) 4 both cycle time and contouring error, optimization of the feedrate profile can seek to satisfy both metrics. Many 2-axis feedrate scheduling methods which are successful at reducing the process cycle time while keeping contouring error within limits have been developed. However, 5-axis contouring error reduction has become more sought after due to its greater relevance in production environments. Due to the added challenges of 5-axis movement, the development of a 2-axis feedrate optimization strategy acts as a reasonable starting point for the proposed work. This thesis presents 2-axis and 5-axis feedrate optimization algorithms which respect user-defined drive and contouring error limits. Both feedrate optimization algorithms are based on work by Sencer et al. [1] which used the MATLAB optimization toolbox to modify feedrate spline control points such that cycle time would be minimized while respecting velocity, acceleration, and jerk limits of the machine tool drives. The addition of the contouring error constraint in the optimization framework ensures that part accuracy can be directly controlled. The 2-axis optimization proposed in this thesis uses a 2-axis analytical contouring error model developed by Dong et al. [2] which assumes a circular trajectory and subtracts the radius of curvature of the actual and reference motions at each point along the toolpath to calculate contouring error. The 5-axis optimization proposed in this thesis uses a 5-axis analytical contouring error model developed by Sencer et al. [3] which projects the tracking error onto the normal and binormal directions at each point along the reference toolpath and takes the norm to calculate contouring error. The tracking error is found through an analytical model developed by Erkorkmaz et al. [4] which characterizes tracking error as a linear combination of reference velocity, acceleration, and jerk. Although the ultimate objective of this work is to develop a 5-axis feedrate optimization method which respects drive 5 and contouring error limits, the 2-axis feedrate optimization technique is an important first step in learning about the various benefits and limitations of the optimizer with a less-challenging 2-axis model for contouring error. The literature review is carried out in Chapter 2, presenting research conducted in contouring error reduction strategies, feedrate optimization techniques, and feedrate scheduling techniques with the application of contouring error limits. Chapter 3 presents the proposed 2-axis feedrate optimization algorithm based on drive and contouring error limits. The extension of this work to 5-axis is presented in Chapter 4, also based on drive and contouring error limits. Both chapters describe the methodology behind the optimization algorithms, the contouring error models used as constraints, and experimental validation. Chapter 5 concludes the thesis with final remarks and proposals for future research. 6 Chapter 2 Literature Review 2.1 Overview In production environments, part accuracy and process efficiency are critical performance metrics. As described in the introduction, tracking error and contouring error are metrics for part accuracy and cycle time is a measure of process efficiency. Therefore, it is advantageous to reduce tracking and contouring errors while simultaneously reducing the cycle time of the process. Methods described in literature which aim to improve part accuracy by reducing contouring and tracking errors can be categorized into the following strategies: increasing the servo drive bandwidth, developing a contouring error controller, and compensating for the tracking and/or contouring error within the trajectory. However, these methods do not consider the efficiency of the process. Prior art which aims to improve process efficiency by reducing cycle time involves finding a time-optimal trajectory which ensures that specified drive limits are not violated. By respecting drive saturation limits, the trajectory becomes continuous, and undesirable tool vibrations are reduced which improves surface finish. However, these strategies do not directly reduce contouring error to improve part accuracy. 7 Two-axis methods which simultaneously consider cycle time reduction and contouring accuracy have been developed. However, 5-axis strategies are more relevant in todayβs production environments due to the complexity of parts produced by many industries. In this chapter, prior research related to contouring error reduction and feedrate optimization is reviewed. Section 2.2 presents tracking and contouring error reduction strategies. Section 2.3 reviews research involving minimum-time solutions with drive limits. Section 2.4 presents recent work which aims to reduce process cycle time by scheduling feedrate based on contouring error limits. The conclusions derived from the literature review are presented in Section 2.5. 2.2 Contouring Error Reduction Strategies Prior art involving improvements in movement accuracy of CNC machines can be roughly categorized into the following: methods which increase the servo drive bandwidth to improve tracking performance, contouring error compensation strategies, and contouring control schemes. This section reviews the key literature pertaining to the reduction of tracking and contouring error in CNC machining. Reducing axis tracking error is linked to an improvement in contouring error performance. The importance of a high servo drive bandwidth on tracking performance was first described by Pritschow [5]. Several feedforward control methods have been developed to reduce tracking error. Tomizuka [6] employed a βZero Phase Error Tracking Controlβ (ZPETC) algorithm to improve tracking performance. This technique involves adding a feedforward algorithm which cancels out the closed-loop poles and zeros, ensuring zero phase error. However, ZPETC alone is not robust 8 to plant variation and modelling error. Robustness may be achieved by improving axis feedback controller performance. Koren [7] directly improved axis tracking error and thereby contouring error with a two-axis coupled feedback controller. Complex controllers for more sophisticated error reduction may include both feedforward and feedback methods. Erkorkmaz and Altintas [8] worked on a systematic approach for designing a control law which minimizes tracking error in each axis. In this method a Kalman filter is used to estimate position, velocity and disturbance, a pole placement controller is implemented to reject disturbance, and a ZPETC is implemented to increase the tracking bandwidth. Although tracking error is linked to contouring error, there are cases where small axis tracking error can lead to large contouring error depending on the kinematics of the machine [3], and thus these methods which reduce tracking error alone are not sufficient to guarantee contouring error reduction unless the tracking errors of all drives are reduced. A commonly studied strategy for reducing contouring error is to compensate for it by directly modifying the reference toolpath trajectory. Erkorkmaz et al. [9] increased the spline control point density of the reference toolpath trajectory at low radius corners such that the error between expected and actual toolpaths is reduced. Zhang et al. [10] predicted contouring errors prior to the axis motion control loops and compensated for these errors by modifying axis position commands prior to motion. An online contouring error compensation method was developed by Khoshdarregi et al. [11] where an input shaper was superimposed on the reference input thereby removing harmonic content causing undesirable vibrations. They implemented a similar compensation strategy to Zhang et al. [10] using a different contouring error model which allowed for the contouring error to be deterministically calculated within the chosen sampling time, allowing 9 compensation to be applied on line. A diagram showing the basic steps in compensation is shown in Figure 2.1. Although compensation strategies are successful at reducing contouring error, the computational burden for this strategy can be significant and it is sensitive to drive modelling errors. Figure 2.1: Block diagram for the contouring error compensation method [10] Contouring error may also be reduced by using estimates to modify axis drive commands in a feedback controller. Altintas and Sencer [12] developed an analytical contouring error model which takes workpiece-coordinate-frame (WCF) tracking error and projects it onto the normal direction of the reference trajectory. This model is used in a sliding mode controller designed to minimize the calculated contouring error. 10 The reduction of contouring error leads to improvements in part accuracy. Although these control and compensation strategies are successful at reducing tracking and contouring error, they do not address the problem of reducing cycle time. An increase in process efficiency can be achieved by minimizing the cycle time of the process. The following section will outline feedrate optimization strategies for 3-axis and 5-axis machines. 2.3 Feedrate Optimization for Multi-Axis Machines In production environments, high part accuracy and surface quality of the machined part is important. Breaching drive saturation limits leads to undesirable machine vibrations, leading to low part accuracy and surface quality. To avoid violating drive saturation limits, it is typical for a conservative constant feedrate to be selected and processed by the CNC. However, selecting a conservative feedrate directly affects the process efficiency. Modern CNC systems can implement non-uniform feedrate profiles in the form of Bezier, b-splines, or NURBS, creating the possibility for compromises between process efficiency and part quality. Feedrate optimization involves generating an optimized, non-uniform feedrate profile which produces the minimum possible cycle time of the process while ensuring the selected limits are respected. Early work on feedrate optimization was done by Bobrow et al. [13] and Shin and McKay [14] who formulated a time-optimal feedrate profile, limited by torque constraints for the movement of a robotic manipulator along a defined toolpath. They reduced the multi-degree-of-freedom problem to a single dimension by parameterizing displacement along the path as a single dimension π , defining feedrate as ?Μ?. This method employed a crude βbang-bangβ style optimization where the second time derivative of path displacement ?Μ? flips between maximum acceleration and 11 deceleration at chosen switching points to find an optimal feedrate profile. Although the optimization minimizes cycle time while respecting torque constraints, the acceleration profile is discontinuous at switching points. Discontinuities in acceleration lead to infinite jerk causing undesirable tool vibrations which can leave marks on the part surface. Although there are several extensions to this work by Schiller and Lu [15], [16], Pfeiffer and Johanni [17] and Slotine and Yang [18] which find more appropriate switching points that improve the efficiency of the algorithm, the vibration problems caused by non-smooth acceleration profiles still exist. Work by Schiller [19] solved the time-optimization problem using the Pontryagin maximum principle which resulted in smooth optimal control. The addition of jerk limits eliminates discontinuities in acceleration that lead to structural vibrations. Piazzi and Visoli [20] used cubic splines to ensure continuous position, velocity, and acceleration under their respective constraints. Similarly, Constantinescu and Croft [21] applied torque rate limits, ensuring a smooth yet time-optimal toolpath. Altintas and Erkorkmaz [22] developed a 2-axis feedrate optimization algorithm which minimizes cycle time with velocity, torque, and jerk limits to avoid drive saturation. Sencer et al. [1] extended the 2-axis method by Altintas and Erkorkmaz [22] to a 5-axis feedrate optimization method based on drive limits, presented in Figure 2.2. This 5-axis feedrate optimization algorithm based on drive limits serves as the basis of the proposed work. 12 Figure 2.2: Sencer feedrate optimization algorithm based on velocity, acceleration, and jerk limits 13 The framework takes in a position and orientation toolpath in quintic b-spline form and a set of velocity, acceleration and jerk constraints set by the user. The user also sets an initial feedrate which generates a feedrate spline. The optimization is conducted using the constrained nonlinear optimization function, fmincon [23], within the MATLAB optimization toolbox. The function fmincon works by modifying decision variables to minimize an objective function, while ensuring constraint functions are not violated. In this case, the decision variables are the control points of the feedrate spline, the objective function is an expression for process cycle time, and the constraint functions are the calculated individual axis velocities, accelerations, and jerks, as well as tangential velocity, acceleration, and jerk. Therefore, cycle time and drive signals based on the current feedrate spline are inputs to fmincon. Within fmincon, a gradient descent algorithm iteratively modifies the feedrate spline control points, and the new feedrate profile is used to re-evaluate the objective and constraint functions until the local minimum has been found [23]. To improve computational efficiency, the algorithm divides the toolpath into windows and focuses on finding the optimal feedrate spline for each section. The final output of the algorithm is an optimized feedrate spline which ensures a minimum cycle time for the process, while maintaining user-set drive limits. By ensuring a smooth acceleration profile through respecting drive limits, this method reduces structural vibrations caused by discontinuous jerk which can affect motion accuracy. However, techniques which reduce contouring error directly are more successful at controlling and improving contouring performance. The following section reviews the literature on feedrate scheduling strategies which constrain contouring error. 14 2.4 Feedrate Scheduling Based on Contouring Error Limits Feedrate scheduling methods have been developed to reduce cycle time without compromising part accuracy. Dong and Stori [24] developed a two-pass feedrate optimization algorithm based on 2-axis contouring error limits where the feedrate was maximized. The forward pass maximizes the feedrate using a greedy algorithm causing infeasibilities, and the backward pass reduces the feedrate to feasible levels. The result of the two passes is a minimum-time continuous feedrate profile. However, the algorithm results in non-smooth acceleration, which can lead to undesirable tool vibrations. Lin et al. [25] presented a dynamics-based real-time look-ahead algorithm which identifies the locations of sharp corners, calculates the contouring error at those locations, and reduces the contouring error by adjusting the feedrate. For a two-axis system, significant reductions in contouring error were found when compared to methods which do not incorporate servo dynamics into feedrate scheduling. For short toolpaths, Dong et al. [2] developed a two-axis real-time feedrate scheduling algorithm which adaptively adjusts the feedrate based on contouring error and jerk limits for the entire process. They also presented a two-axis contouring error model which estimates the difference between reference and actual circular paths at each point based on the servo dynamics of the system. The relationship between curvature and feedrate was established further by Jia et al. [26], who addressed large machining error resulting from machining parts with rapidly varying geometric features. They subdivided the toolpath based on curvature and assigned a feedrate to each section to ensure tool movement accuracy. Building on the feedrate scheduling schemes based on contouring error and drive limits developed previously, Jia et al. [27] added an online interpolator which located feedrate-sensitive regions and modified them to a constant feedrate. The feedrate profile was smoothed at the transition points between regular and feedrate-sensitive regions to ensure higher order continuity. This method removed abrupt changes in 15 feedrate which improved the machining quality by reducing unwanted vibrations. Chen et al. [28] developed an offline feedrate scheduling method which modifies the feedrate profile based on drive, contouring error, and chord error limits; this is similar to the contouring error model developed by Dong et al. [2], where a circular path is fitted at each point to calculate contouring error. Although these methods produce promising results in restricting contouring error within limits while minimizing cycle time, they can only be applied to two-axis profiles. Due to the increasing demand of complex freeform surface parts, a 5-axis feedrate scheduling strategy limited by contouring error would be a powerful tool, applicable in a wide-range of industries. Most recently, Yang et al. [29] developed a 5-axis feedrate scheduling algorithm which limits contouring errors under cutting load disturbances. Assuming that the tracking error generated by the commanded trajectory is negligible when compared to tracking error generated from the disturbance cutting loads, Yang et al. defined a linear relationship between disturbance torque and tracking error. The tracking error was converted to five-axis contouring error using kinematics and the feedrate profile was modified when comparing the contouring error to user-specified limits. Although this method is successful for cases where the error from cutting load disturbances dominates the servo tracking error, it is not as effective when the servo tracking error contributes significantly to contouring error. Although feedrate scheduling is successful at reducing the cycle time while limiting drive signals and/or contouring error, it is different from optimization strategies which minimize objective functions under certain constraints until a mathematically optimal solution is found. Examples of feedrate optimization were presented in Section 2.3 where the objective function was cycle time, 16 and the constraint functions were drive signals (velocity, acceleration, and/or jerk). Optimization must find a mathematically feasible solution, have continuous objective/constraint functions, and satisfy optimality conditions. However, the benefit of feedrate optimization over scheduling is the mathematical guarantee of local optimality, and in certain cases, global optimality. A 5-axis feedrate optimization strategy which limits contouring error contributed by the path trajectory has yet to be developed. This thesis proposes a feedrate optimization method which limits velocity, acceleration, jerk, and contouring error, while minimizing cycle time. 2.5 Conclusions In this chapter, past literature regarding tracking error and contouring error reduction strategies and feedrate optimization strategies are reviewed. Since smaller tracking error does not guarantee smaller contouring errors in all cases, reducing the contouring error directly is a more effective method of improving contouring performance. The main strategies for directly decreasing contouring error include contouring error compensation and contouring control schemes. Although improving part accuracy by reducing contouring error is an important consideration in production environments, increasing productivity through minimizing cycle time is also crucial. The minimization of cycle time through feedrate scheduling of the process has been extensively studied in multi-axis machines. Although drive limits are employed in scheduling algorithms to ensure drive saturation and therefore axis vibrations are avoided, part accuracy was not considered in these works. More recently, strategies which consider both part accuracy and process efficiency have been studied. However, no research on 5-axis feedrate optimization based on servo-drive contouring error and drive limits exists, which motivates the research in this thesis. 17 The following chapters describe the methodology and results for both a 2-axis and a novel 5-axis feedrate optimization method proposed in this thesis. 18 Chapter 3 Two-Axis Feedrate Optimization with Drive and Contouring Error Limits 3.1 Introduction The proposed optimization algorithm incorporates a contouring error constraint into the framework developed by Sencer et al. [1]. Unlike scheduling techniques, the local minimum can be proven mathematically in optimization algorithms. Chapter 3 describes the proposed 2-axis feedrate optimization based on drive and contouring error limits. The minimum-time feedrate optimization methodology is described in Section 3.2 where the 2-axis contouring error model described in Section 3.3 is used as a constraint in the optimizer. The proposed method described in Sections 3.2 and 3.3 is validated in Section 3.4 where simulations and experimental results conducted on a 3-axis CNC machine are presented. 3.2 Two-Axis Minimum-Time Feedrate Optimization Method As mentioned in Chapter 2, Sencer et al. [1] developed a feedrate optimization strategy which generates a non-uniform feedrate profile minimizing the process cycle time while ensuring that the velocity, acceleration and jerk drive signals do not violate user-defined limits. In this work, cycle time was the objective function to be minimized, and velocity, acceleration, and jerk were the constraint functions. The reason for selecting the algorithm by Sencer et al. [1] as the basis of the proposed work is due to its implementation of optimization over scheduling in generating the feedrate spline, as well as its comprehensive suite of drive constraints. Its use of a quintic b-spline in representing feedrate is also unique in ensuring jerk-continuous movement. 19 The work proposed in this chapter expands the algorithm developed by Sencer et al. [1] by adding a contouring error as an additional constraint function to the bounds of the optimization. The objective function and the bounds of the optimization are given as min(ππ΄) =πππ?Μ?β«ππ ?Μ?(π )πΞ£0 subject to {?Μ?, ?Μ?, π } < {π£πππ, ππππ, π½πππ} {ππ} < {πππππ} (3.1) where πΞ£ is total path displacement, πΞ£ is the process cycle time, and π , ?Μ?, ?Μ?, π represent displacement, velocity, acceleration, and jerk along the toolpath, respectively. Position contouring error is represented as ππ. Figure 3.1 presents a flowchart describing the 2-axis feedrate optimization strategy proposed in this section. Similar to Figure 2.2 presented in Section 2.3 which presents the optimization structure developed by Sencer et al. [1], the user defines a tooltip position trajectory in quintic b-spline form, sets initial feedrate, and sets drive constraints. The proposed method in this section reduces the 5-axis framework to two axes and includes 2-axis contouring error as an additional constraint function. The 2-axis contouring error model incorporated in the optimization will be described in detail in Section 3.3. 20 Figure 3.1: Proposed two-axis feedrate optimization algorithm based on drive and contouring error limits 21 3.3 Two-Axis Contouring Error Model The optimization method described in the previous section uses a MATLAB optimization function which requires continuous objective and constraint functions. Commonly implemented iterative models for contouring error do not allow the optimization to converge. Therefore, an analytical two-axis contouring error model developed by Dong et al. [2] was selected as the additional constraint function. In this model, an instantaneous circular trajectory is assumed at each point along the spline toolpath, along with an associated moving coordinate frame. The contouring error is estimated at each point by calculating the difference between the instantaneous radius of curvature of the reference trajectory and the actual trajectory. The estimate for two-axis contouring error ππ,π, at point π along the toolpath is calculated using ππ,π = π π,π β π π,π (3.2) where π π,π and π π,π are the radius of curvatures of the reference and actual tool positions ππ,π and ππ,π, respectively. Figure 3.2 shows a visualization of the two-axis contouring error model. 22 Figure 3.2: Two-axis contouring error model The spline toolpath is expressed in the general coordinate frame represented by [π, π] in Figure 3.2. However, the instantaneous circular trajectory assumed at each point is described in a moving, circular coordinate frame (CCF) represented by [ππ, ππ] in the same figure. There is no change in orientation between the general coordinate frame and the CCF. Without loss of generality, the following derivation assumes that the quantities below are with reference to the CCF without explicitly deriving its location in the world frame. Before Eq. (3.2) can be implemented into the feedrate optimization framework as a constraint function, π π,π and π π,π must be calculated. The points along the reference trajectory are known and therefore the radius of curvatures along the reference toolpath, π π,π can be found. However, in 23 order to calculate the actual radius of curvatures along the toolpath, π π,π, the actual trajectory of the tool must be found. The steps in finding the actual toolpath based on knowledge of the servo drive dynamics are described in this section. Expressed in the moving CCF, the instantaneous circular reference trajectory in both axes π₯π,π and π¦π,π is π₯π,π = π π,π cos(πππ‘ + ππ) π¦π,π = π π,π sin(πππ‘ + ππ) (3.3) where π π,π is the radius of curvature of the circular trajectory, ππ is the angular frequency, and ππ is the phase of the circular rotation at point π. By taking the Fourier transform of the reference trajectories in the time domain, we obtain ππ(πππ) = β±(π₯π,π) ππ(πππ) = β±(π¦π,π) (3.4) where ππ(πππ) and ππ(πππ) represents the reference position in the frequency domain. The axis dynamics can be represented by 24 πΊπ₯(πππ) =ππ(πππ)ππ(πππ) πΊπ¦(πππ) =ππ(πππ)ππ(πππ) (3.5) where πΊπ₯(πππ) and πΊπ¦(πππ) are the axis transfer functions in the x- and y-axes respectively. The method of finding πΊπ₯ and πΊπ¦ is described in detail near the end of this section. Solving for the actual trajectory results in ππ = πΊπ₯ππ ππ = πΊπ¦ππ (3.6) where ππ and ππ are the actual movements of the x- and y-axes represented in the frequency domain. After applying an inverse Fourier transform to convert it back to the time domain, π₯π,π = β±β1[ππ(πππ)] = π π,π|πΊπ₯(πππ)| cos(πππ‘ + β πΊπ₯(πππ) + ππ) π¦π,π = β±β1[ππ(πππ)] = π π,π|πΊπ¦(πππ)| sin(πππ‘ + β πΊπ¦(πππ) + ππ) (3.7) are obtained where |πΊπ₯(πππ)| and |πΊπ¦(πππ)| are the magnitudes of the x- and y-axis transfer functions and β πΊπ₯(πππ) and β πΊπ¦(πππ) are the phases of the x- and y-axis transfer functions. Since angular frequencies below the system bandwidth result in a near-zero phase, for a toolpath and feedrate which ensure sub-bandwidth ππ, β πΊ(πππ) is assumed to be negligible. Also, if the 25 dynamics of the x- and y-axes are matched, πΊπ₯ = πΊπ¦ = πΊ, the actual trajectory at point π along the toolpath can be simplified to π₯π,π = π π,π|πΊ(πππ)| cos(πππ‘ + ππ) π¦π,π = π π,π|πΊ(πππ)| sin(πππ‘ + ππ) (3.8) The actual radius of curvature is found through the norm of [π₯π,π, π¦π,π] π π,π = βπ₯π,π2 + π¦π,π2 . (3.9) Substituting Eq. (3.8) into Eq. (3.9), π π,π = β[π π,π|πΊ(πππ)| cos(πππ‘ + ππ)]2 + [π π,π|πΊ(πππ)| sin(πππ‘ + ππ)]2 (3.10) the equation can be simplified by factoring π π,π|πΊ(πππ)| and using the trigonometric identity cos(ππ‘ + π)2 + sin(ππ‘ + π)2 = 1 which results in π π,π = π π,π|πΊ (πππ)| (3.11) By substituting Eq. (3.11) into the original contouring error equation Eq. (3.2), ππ,π = π π,π(1 β |πΊ (πππ)|) (3.12) 26 contouring error at point π can be expressed as a function of reference radius of curvature at point π, π π,π, and the magnitude of the matched axis transfer function, |πΊ (πππ)|. Now that an analytical expression for contouring error has been derived in Eq. (3.12), a method of calculating π π,π and |πΊ (πππ)| is necessary. Figure 3.3 shows the method of calculating radius of curvature at a given point along ππ along the reference toolpath. Figure 3.3: Method of calculating radius of curvature With knowledge of the previous and future steps along the toolpath ππβ1 and ππ+1, a triangle can be fit to the three adjacent points. The radius of the circle fitted to the three points is a function of the three sides π, π, π and the area π΄ of the triangle [30]. The radius of curvature at point π along the toolpath is found through π π,π =π β π β π4 β π΄. (3.13) 27 Using a proportional-integral-derivative (PID) control structure, the drive block diagram of a single axis in the Laplace domain is provided in Figure 3.4. Each axis has the same control and plant structure, but with different controller and plant parameters. The transfer function between the actual and reference drive motion derived from the block diagram is shown in Eq. (3.14). Figure 3.4: Block diagram model for machine tool drives πΊ(π ) =πΎ(πΎππ 2 + πΎππ + πΎπ)π½π 3 + (π΅ + πΎπΎπ)π 2 + πΎπΎππ + πΎπΎπ where πΎ = πΎππΎπ‘ππ. (3.14) The proportional, integral, and derivative gain controller parameters are πΎπ, πΎπ, and πΎπ. The moment of inertia and viscous damping reflected at the motor shaft are π½ and π΅. The current amplifier gain, motor torque constant, and transmission ratio from rotational to linear motion are πΎπ, πΎπ‘ and ππ respectively. To convert from the Laplace domain to the frequency domain π = ππ is substituted into Eq. (3.14), resulting in πΊ(ππ) =πΎ(πΎπ(ππ)2 + πΎπ(ππ) + πΎπ)π½(ππ)3 + (π΅ + πΎπΎπ)(ππ)2 + πΎπΎπ(ππ) + πΎπΎπ. (3.15) From this, the magnitude of the transfer function |πΊ(ππ)| is calculated. 28 Finally, the angular frequency at point π along the reference toolpath must be calculated to find |πΊ (πππ)| at point π along the toolpath. The angular frequency ππ is found by ππ =ππ,ππ π,π (3.16) where ππ,π is the feedrate at point π along the toolpath. Hence, ππ is never zero unless π π,π is infinity or feed is zero. Figure 3.5 shows how local angular frequency ππ is determined along the reference toolpath. Figure 3.5: Determination of local frequency at point π along reference toolpath The contouring error model described in this section is validated using the toolpath shown in Figure 3.6. The normalized path displacement, π’ is also presented in Figure 3.6 where π’ = 0 at the starting point of the trajectory and π’ = 1 at the endpoint of the trajectory. 29 Figure 3.6: Toolpath used for validating 2-axis contouring error model Assuming a constant feedrate profile of 60mm/s, the contouring error model is validated using one developed by Erkorkmaz et al. [9] which uses an iterative method to find the closest point between the reference and actual trajectories. As seen in Figure 3.7, the locations of the resulting peaks of the compared models along the toolpath are close and the maximum peak to peak error is 20%. The discrepancy is due to unmodelled servo drive nonlinearities not captured by the analytical model described in this section. u, normalized path displacement u = 0 u = 1 30 Figure 3.7: Contouring error comparison between Erkorkmaz model and Dong (proposed) model The contouring error model described in this section is integrated into the feedrate optimization scheme described in Section 3.2 as a nonlinear constraint. The following section describes the simulation and experiment for the 2-axis feedrate optimization algorithm. 3.4 Validation of Two-Axis Feedrate Optimization Method Experimental validation was conducted on a Fadal 2216 Vertical Machining Center, driven by a real-time controller implemented on a dSPACE 1103 controller board [30]. The system is run in closed-loop using a PID controller with friction compensation at a 1kHz sampling frequency. Figure 3.8 shows the experimental setup used to validate the 2-axis feedrate optimization strategy based on contouring error and drive limits. The system control architecture is presented with 31 greater detail in Figure 3.9. Note that the reference trajectory is passed into a buffer on the real-time controller (dSPACE), so that the serial communication link between the host PC and the real-time controller is not a bottleneck. Similarly, logged signals are stored in the dSPACE and sent back as buffered signals to the host PC. Figure 3.8: Experimental setup for 2-axis feedrate optimization validation 32 Figure 3.9: System architecture for experimental setup The drive parameters of the Fadal 2216 for the x- and y-axes are presented in Table 3.1. The controller parameters for the axis PID controllers as well as the closed loop system bandwidth ππ are presented in Table 3.2. The matched closed loop axis dynamics are shown in Figure 3.10. Axis π²π [A/V] π²π [Nm/A] ππ [mm/rad] π± [Kgm2] π© [Kgm2/s] X 6.57 0.48 1.59 7.00e-3 2.36e-2 Y 6.23 0.48 1.59 8.19e-3 4.30e-2 Table 3.1: Axis plant parameters of experimental setup Axis π²π π²π π²π ππ [rad/s] X 25 50 0.3 288.4950 Y 30.8592 61.718 0.3670 285.8163 Table 3.2: Controller parameters for experimentation 33 Figure 3.10: Bode plot of closed loop system for x- and y-axes For simulation and experimentation, the axis and tangential drive limits applied to the optimization are provided in Table 3.3. The tooltip position trajectory used in the validation, and the corresponding axis displacements for the trajectory is shown in Figure 3.11. Table 3.3a: Optimization limits - Axis drive limits Drive Velocity [mm/s] Acceleration [mm/s2] Jerk [mm/s3] X 250 2500 50000 Y 250 2500 50000 Table 3.3b: Optimization limits - Tangential drive and contouring error limit Tangential Limit Value Velocity [mm/s] 50 Acceleration [mm/s2] 2500 Jerk [mm/s3] 50000 Contouring Error [πm] 20 34 Figure 3.11: Path trajectory: a) Tooltip trajectory b) Individual axis reference movement Figure 3.12 presents the resulting optimized feedrate profile based on the contouring error and drive limits established previously. The feedrate profile shows dips corresponding to the areas of low radius of curvature, π 1, π 2, π 3, π 4, in the tooltip trajectory. The smaller the radius of curvature, the larger the dip in the feedrate profile. As an example, π 1is smaller than π 2, therefore the feedrate when traversing π 1 must be slower than when traversing π 2. a) b) 35 Figure 3.12: Optimized 2-axis feedrate spline Three experimental validation cases presented in Table 3.4 were selected to show the capabilities of an optimized, non-uniform feedrate profile in comparison to constant feedrate profiles. Case Description Feedrate 1 Non-optimized, Uniform, Fast 50mm/s 2 Non-optimized, Uniform, Slow 29.5mm/s 3 Optimized, Non-uniform, Fast 50mm/s (maximum) Table 3.4: Experimental validation cases for two-axis feedrate optimization method Figure 3.13 compares the simulated axis drive signals as well as contouring error for Cases 1, 2, and 3, normalized to their respective limits. For the fast, unoptimized Case 1 the simulated 36 contouring error limit is significantly exceeded by over 150%. For the slow, unoptimized Case 2 the simulated contouring error just touches the limit. For the fast, optimized Case 3 the simulated contouring error does not exceed the 20um limit. Figure 3.13: Normalized predicted drive and contouring error limits 37 Figure 3.14 shows the experimental contouring error for Cases 1 to 3. The optimized feedrate (Case 3) has a reduction of contouring error compared to the fast feedrate (Case 1) of 46% and is simultaneously 37% faster than the slow, low-contouring error feedrate (Case 2). This clearly shows a significant improvement due to the optimized feedrate. Note that the experimental contouring error violates the imposed 20um limit by 6um due to unmodeled non-linearities of the real system within the contouring error model. Figure 3.14: Experimental 2-axis contouring error Table 3.5 and Table 3.6 summarize the simulated and experimental results with per-unit metrics normalized to Case 1. The simulated contouring error shows a smaller per-unit value in comparison to the experimental results. This discrepancy is attributed to unmodelled nonlinearities of the actual machine within the contouring error model. 46% Contouring error reduction 37% Cycle time reduction 38 Simulated Time Max Error [per-unit] [s] [per-unit] [um] Case 1: Fast, Unoptimized Feedrate: 50 mm/s 1.0 2.1 1.0 55 Case 2: Slow, Unoptimized Feedrate: 29.5 mm/s 1.7 3.5 0.4 20 Case 3: Fast, Optimized Max Feedrate: 50 mm/s 1.0 2.1 0.4 20 Table 3.5: Summary of simulation results Experimental Time Max Error [per-unit] [s] [per-unit] [um] Case 1: Fast, Unoptimized Feedrate: 50 mm/s 1.0 2.1 1.0 50.8 Case 2: Slow, Unoptimized Feedrate: 29.5 mm/s 1.7 3.5 0.5 27.1 Case 3: Fast, Optimized Max Feedrate: 50mm/s 1.0 2.1 0.5 26.2 Table 3.6: Summary of experimental results 39 3.5 Conclusions In this chapter, a two-axis feedrate optimization strategy based on drive and contouring error limits was proposed. The optimization structure was expanded from Sencer et al. [1] to include a 2-axis contouring error constraint developed by Dong et al. [2]. Simulation results show that the algorithm ensures that drive and contouring error limits are not violated. A 3-axis CNC machine retrofitted with a dSPACE controller is used to validate simulation results. It is shown that in comparison to non-optimized, uniform feedrate profiles, the optimized feedrate profile leads to significant reductions in cycle time and contouring error for the same toolpath. For a non-optimized feedrate profile which results in a similar peak contouring error, the cycle time reduction for the optimized feedrate profile is 37%. For a non-optimized feedrate profile which results in a similar cycle time, the contouring error reduction for the optimized feedrate profile is 46%. Therefore, the optimization achieves its intended minimization of cycle time while meeting the drive and contouring error constraints. 40 Chapter 4 Five-Axis Feedrate Optimization with Drive and Contouring Error Limits 4.1 Introduction 5-axis machining has become more relevant in production environments due to the increasing demand of complex, freeform surfaces within various industries. This chapter proposes a novel 5-axis feedrate optimization method based on drive and contouring error limits. Similar to the proposed 2-axis method presented in Chapter 3, the 5-axis feedrate optimization strategy is extended from Sencer et al. [1] to include contouring error as a constraint. Section 4.2 discusses the 5-axis minimum time feedrate optimization method. Section 4.3 describes the general kinematic model of the 5-axis CNC machine and therefore the challenges involved with extending the problem to five axes. The 5-axis contouring error model presented in Section 4.4 is used as a constraint for the optimization algorithm described in Section 4.2. Finally, Section 4.5 validates the methodologies presented in Sections 4.2, 4.3, and 4.4 where the simulation results and experimental results conducted on a 5-axis CNC machine are presented. 4.2 Five-Axis Minimum-Time Feedrate Optimization Method As described in Section 2.3, Sencer et al. [1] developed a feedrate optimization strategy which generates a non-uniform feedrate profile minimizing the process cycle time while ensuring that drive limits are not violated. The strategy developed by Sencer et al. [1] was chosen as the basis of the proposed work because it is capable of handling 5-axis movement and it uses optimization 41 over scheduling. Its use of a quintic b-spline in representing feedrate is also unique in ensuring jerk-continuous movement. The work proposed expands this strategy by adding a contouring error limit to the bounds of the optimization. The objective function and the bounds of the optimization are expressed as: min(ππ΄) =πππ?Μ?β«ππ ?Μ?(π )πΞ£0 subject to {?Μ?, ?Μ?, π } < {π£πππ, ππππ, π½πππ} {ππ, ππ} < {πππππ , πππππ} (4.1) where πΞ£ is the total path displacement, πΞ£ is the process cycle time, and π , ?Μ?, ?Μ?, π represent displacement, velocity, acceleration, and jerk along the toolpath, respectively. Position and orientation contouring errors are represented as ππ and ππ respectively. Figure 4.1 presents a flowchart of the optimization algorithm. Similar to Figure 2.2 which shows the original 5-axis optimization algorithm by Sencer et al. [1], the user defines a tooltip position and tool orientation trajectory in quintic b-spline form, sets initial feedrate, and sets drive constraints π£πππ, ππππ, and π½πππ. The proposed optimization method in this section includes a 5-axis contouring error model as an additional constraint function, with corresponding contouring error limits ππlim and πππππ set by the user. 42 Figure 4.1: Proposed five-axis feedrate optimization algorithm based on drive and contouring error limits 43 4.3 General Kinematic Model of Five-Axis CNC Systems In 3-axis systems, the movement of the tool tip is the same as the movement of the servo drives of the x-, y-, and z-axes. The addition of the two rotary axes in 5-axis motion results in non-Cartesian, nonlinear kinematics which map tool tip movements to servo drive movements. The workpiece coordinate frame (WCF) is the tool position with respect to the workpiece. The machine coordinate frame (MCF) is the tool position with respect to the machine frame. In 5-axis motion, the toolpath in the WCF must be converted to the MCF when sending commands to individual servo drives. Inverse kinematics converts motion from the WCF to the MCF, while forward kinematics converts motion from the MCF to the WCF. The mathematical formulas which convert machine movement from one coordinate frame to another are based on the characteristics of the specific CNC system one is using, including the type of rotary axes and the location of axes relative to one other. The kinematic model of the 5-axis CNC system used in this work is shown in Figure 4.2. 44 Figure 4.2: General kinematic model of 5-axis CNC system Within the workpiece coordinate frame, the trajectory of tooltip position π and tool orientation π can be expressed as a function of time. π(π‘) = [ππ₯(π‘) ππ¦(π‘) ππ§(π‘)]π π(π‘) = [ππ(π‘) ππ(π‘) ππ(π‘)]π (4.2) Similarly, servo movements during the trajectory in the MCF can also be expressed as a function of time. π(π‘) = [π(π‘) π(π‘) π(π‘) π΄(π‘) πΆ(π‘)]π (4.3) 45 πΏππ,π§ represents offset between the c-axis surface and the a-rotational axis, and πΏππ¦π,π§ represents offset between the a-rotational axis and the X-Y translational axis surface. Based on the kinematic configuration of Figure 4.2, the following equations are used to convert movements from the workpiece coordinate frame to the axis coordinate frame. π΄(π‘) = arccos(ππ(π‘)) πΆ(π‘) = ππππ‘ππ (ππ(π‘)ππ(π‘)) π(π‘) = β cos(πΆ(π‘))ππ₯(π‘) β π ππ(πΆ(π‘))ππ¦(π‘) π(π‘) = πππ (π΄(π‘))π ππ(πΆ(π‘))ππ₯(π‘) β πππ (π΄(π‘))πππ (πΆ(π‘))ππ¦(π‘) β β― π ππ(π΄(π‘))ππ§(π‘) β π ππ(π΄(π‘))πΏππ,π§ π(π‘) = π ππ(π΄(π‘))π ππ(πΆ(π‘))ππ₯(π‘) β π ππ(π΄(π‘))πππ (πΆ(π‘))ππ¦(π‘) + β― πππ (π΄(π‘))ππ§(π‘) + πππ (π΄(π‘))πΏππ,π§ + πΏππ¦π,π§ (4.4) The linear transformations in Eq. (4.4) can be converted to the following matrix equation [π(π‘)π(π‘)π(π‘)] = π΄ [ππ₯(π‘)ππ¦(π‘)ππ§(π‘)] + π΅ [πΏππ,π§πΏππ¦π,π§] where π΄ = [βcos(πΆ) βπ ππ(πΆ) 0πππ (π΄)π ππ(πΆ) βπππ (π΄)πππ (πΆ) π ππ(π΄)π ππ(π΄)π ππ(πΆ) βπ ππ(π΄)πππ (πΆ) πππ (π΄)] and π΅ = [0 0βπ ππ(π΄) 0πππ (π΄) 1]. (4.5) 46 Practical implementation of the kinematic transform requires the use of ππππ‘ππ2 to avoid calculation error if πΆ(π‘) can exceed at +/-90-degree range. The following sections will describe where this inverse kinematic transform is used within the optimization to convert the WCF toolpath to commands in the MCF. 4.4 Five-Axis Contouring Error Model 5-axis contouring error has two components: tooltip position contouring error ππ and tool orientation contouring error ππ. Tooltip position contouring error is the closest distance between the actual tool position and the reference trajectory. Tool orientation contouring error is the closest angle between the actual tool orientation and the reference tool orientation trajectory. Figure 4.3 presents the general 5-axis contouring error definition. Figure 4.3: General 5-axis contouring error definition 47 The most accurate contouring error models in 5-axis applications work iteratively to find the closest point between the actual and reference trajectory [32]. However, as described in Section 3.3, the optimization constraint function must be continuous to ensure optimization convergence. An analytic 5-axis contouring error model developed by Sencer et al. [3] is selected to estimate contouring error as the constraint function. Calculating estimated contouring error from the user-defined position and orientation toolpaths in the WCF requires several intermediary steps as shown in Figure 4.4. Reference tooltip position ππ(π’) and tool orientation ππ(π’) are b-splines expressed as a function of normalized path displacement, π’. However, since the feedrate is the derivative of the path displacement, ?Μ?, the optimizer requires the contouring error to be a function of path displacement, π . According to work by Yuen et al. [32], the linear relationship often assumed of π’(π ) can lead to significant interpolation error. Based on the methods presented by Yuen et al. [32], a 9th order polynomial fit is used to map π’ and π . This π’(π ) polynomial is used to convert between tooltip coordinate positions, [ππ₯(π’) ππ¦(π’) ππ§(π’)]π, to become a function of π as [ππ₯(π ) ππ¦(π ) ππ§(π )]π. Similarly, the vector of tool orientation coordinates is a function of normalized orientation path displacement, π€, expressed as [ππ(π€) ππ(π€) ππ(π€)]π. Applying inverse kinematics converts tool orientation coordinates in the WCF as rotational A and C axis motions in the MCF as [π΄(π€) πΆ(π€) ]π. Using a fitted 9th order polynomial for π€(π ), the reference axis commands become a function of π as [π΄(π ) πΆ(π ) ]π. 48 Next, the tooltip position [ππ₯(π ) ππ¦(π ) ππ§(π )]π is converted from the WCF to axis commands [π(π ) π(π ) π(π )]π in the MCF through inverse kinematics. The drive reference commands [π(π ) π(π ) π(π ) π΄(π ) πΆ(π )]π and feedrate ?Μ?(π ) are used to calculate tracking error using the method developed by Gordon and Erkorkmaz [4] described later in Section 4.4.1. The tracking error [ππ₯ ππ¦ ππ§ ππ ππ]π is then used in the contouring error model along with the feedrate and the axis reference commands to generate tooltip position ππ and tool orientation contouring error ππ. The contouring error model developed by Sencer et al. [3] is described in Sections 4.4.2 and 4.4.3. Figure 4.4: Proposed method of calculating 5-axis contouring error within feedrate optimization algorithm Since estimating tracking error is a step in evaluating the contouring error constraint function, the tracking error model must also be continuous. Gordon and Erkorkmaz [4] developed an analytical tracking error model which only takes in velocity, acceleration, and jerk reference inputs. Section 4.4.1 provides a detailed description of the 5-axis tracking error model developed by Gordon and Erkorkmaz and validates the model with experimental tracking error data. Sections 4.4.2 and 4.4.3 49 present the tooltip position and tool orientation contouring error respectively and validate the model with experimental contouring error data. 4.4.1 Five-Axis Tracking Error Model An analytical tracking error model developed by Gordon and Erkorkmaz [4] is used in this work. The tracking error model is developed in the Laplace domain based on the dynamic relationship between the tracking error and the reference velocity, acceleration and jerk. The tracking error transfer function πΊπ is defined as πΊπ(π ) =π(π )π(π ) (4.6) where π(π ) and π(π ) are the Laplace domain tracking error and reference position, respectively, πΊπ(π ) can be expressed as an expanded Maclaurin series around zero frequency (π = 0) πΊπ(π ) = πΊπ(0) + πΊπβ²(0)π +12!πΊπβ²β²(0)π 2 +13!πΊπβ²β²β²(0)π 3 (4.7) where πΊπβ² , πΊπβ²β², πΊπβ²β²β² are its first three derivatives with respect to the Laplace domain variable, π . Gordon and Erkorkmaz assumed small steady state position error which makes the first term of Eq. (4.7) go to zero πΊπ(π ) = πΊπβ²(0)π +12!πΊπβ²β²(0)π 2 +13!πΊπβ²β²β²(0)π 3. (4.8) The coefficient terms πΊπβ²(0), 12!πΊπβ²β²(0), and 13!πΊπβ²β²β²(0) are combined into single coefficients πΎ1, πΎ2 and πΎ3, respectively, to assume the form πΊπ(π ) =π(π )π(π )= πΎ1π + πΎ2π 2 + πΎ3π 3. (4.9) 50 By multiplying π(π ) on both sides of Eq. (4.9) to form π(π ) = πΎ1π π(π ) + πΎ2π 2π(π ) + πΎ3π 3π(π ) (4.10) and converting from the Laplace domain to the discrete-time domain, the tracking error is π(π) = πΎ1?Μ?(π) + πΎ2?Μ?(π) + πΎ3π(π) (4.11) where ?Μ?, ?Μ?, π are the discrete-time domain reference velocity, acceleration, and jerk terms. The parameters πΎ1, πΎ2 and πΎ3 are found via least-squares regression where a reference signal with sufficient frequency content is sent to each drive and the tracking error is logged. The logged experimental data is inputted into Eq. (4.11) and πΎ1, πΎ2 and πΎ3 is calculated. Finally, with knowledge of πΎ1, πΎ2 and πΎ3 and ?Μ?, ?Μ? and π, tracking error is calculated using Eq. (4.11). Using a sample toolpath for tracking error validation, the tracking error generated from the Erkorkmaz model was compared to experimental tracking error and the results are shown in Figure 4.5. 51 Figure 4.5: Erkorkmaz model tracking error vs. experimental tracking error The accuracy of the tracking error model is high with the largest deviation in predictions in the rotary axes. The accuracy of this model greatly depends on the toolpath as well as the frequency content of the machine input used for identification. The greater the range of frequency used in identifying the tracking error model parameters πΎ1, πΎ2 and πΎ3, the more frequency content the model is able to express. The accuracy of the tracking error is critical to the accuracy of the contouring error constraint function, affecting the quality of the optimization. 52 4.4.2 Tooltip Position Contouring Error The analytical contouring error model used in this optimization was developed by Sencer et al. [3] which projects tracking error onto the normal and binormal directions to the toolpath. Figure 4.6a presents the tooltip position contouring error model developed by Sencer et al. [3]. Figure 4.6: Sencer contouring error model: a) Tooltip position contouring error b) Tool orientation contouring error [3] The tangential π‘ and normal ?β? directions are calculated from WCF reference velocity π?Μ?, and acceleration π?Μ?, respectively. π‘ = [?Μ?π,π₯β?Μ?π,π₯β ?Μ?π,π¦β?Μ?π,π¦β ?Μ?π,π§β?Μ?π,π§β]π ?β? = [?Μ?π,π₯β?Μ?π,π₯β ?Μ?π,π¦β?Μ?π,π¦β ?Μ?π,π§β?Μ?π,π§β]π (4.12) a) b) 53 The binormal direction ?β? is defined as the cross product of π‘ and ?β?. ?β? = π‘ Γ ?β? (4.13) To project the tracking error onto the normal and binormal directions, a coordinate transformation matrix containing the calculated vectors is constructed. πΉ βΆ=[ π‘π₯ ππ₯ ππ₯ 0 0π‘π¦ ππ¦ ππ¦ 0 0π‘π§ ππ§ ππ§ 0 00 0 0 1 00 0 0 0 1] (4.14) The tooltip tracking error, π can be transformed into the normal and binormal directions using the coordinate transformation matrix, πΉ. ?ββ? = πΉ β ?ββ?πΉ where ππΉ βΆ= [ ππ‘ππππππππ ] (4.15) The projected tracking error, ππΉ is calculated using ππΉ = πΉβ1 β π. (4.16) The final expression for the estimated contouring error is shown in the equation below where π is the estimated contouring error and ππ, ππ represent the magnitudes of the tracking error projected onto the normal and binormal directions, respectively. 54 π = ππ?β? + ππ?β? (4.17) 4.4.3 Tool Orientation Contouring Error Tool orientation contouring error is estimated using a model developed by Sencer et al. [3] presented in Figure 4.6b. In this model, the rotary tracking error is projected onto the normal direction to the reference orientation trajectory. This is represented by the following expression where ?ββ? is the angular velocity of the tool, and ππ is orientation tracking error. ππ = [ππ,πππ,πππ,π] = ππ β?ββββ?β?ββββ?β?ββ?π β ?ββββ?β?ββββ?β (4.18) Since ?β? = [?Μ?π?Μ?π], a vector containing a- and c-axis velocity in the MCF, is known, an expression relating it to ?ββ?, angular velocity in the WCF, is formed. A Jacobian, π½π converts ?β? to ?ββ? as ?ββββ? = π½π?ββ? where π½π βΆ= [π ππ(ππ)πππ (ππ) πππ (ππ)π ππ(ππ)βπππ (ππ)πππ (ππ) βπ ππ(ππ)π ππ(ππ)βπ ππ(ππ) 0]. (4.19) The addition of a scaling constant π =β?ββββ?ββ?ββ?β generates the following expression for normalized angular velocity ?Μ ?. ?Μ ? = ?ββββ?β?ββββ?β= ππ½π?Μ ? where ?Μ ? βΆ= ?ββ?β?ββ?β (4.20) Assuming that the controller adequately corrects for orientation errors within the sampling interval, the approximation in Eq. (4.21) is made. 55 ππ β π½πππ where ππ = [ππππ] (4.21) where vector ππ contains rotary tracking errors in the WCF, and vector ππ contains rotary tracking errors in the MCF. Substituting Eq. (4.20) and Eq. (4.21) into Eq. (4.18), the final expression for estimated orientation contouring error shown in Eq. (4.22) can be found. ππ = π½π[ππ β ?Μ ?(?Μ ?πππ )] (4.22) The Sencer contouring error is validated by comparing to experimental orientation and position contouring error in Figure 4.7. Figure 4.7: Five-axis contouring error model validation There are several reasons behind the discrepancy between the Sencer contouring error model and the experimental contouring error. One source is unmodelled physical nonlinearities such as friction. Also, the Erkorkmaz tracking error model, which is used to calculate contouring error, is analytical and only takes in velocity, acceleration, and jerk reference inputs. Without actual drive a) b) 56 information as inputs to the model, some dynamics may not be captured. Another reason for model error is due to the method of projecting tracking error onto normal and binormal vectors to the trajectory. For areas of high feedrate and/or high curvature the Sencer model causes significant error at certain segments of the toolpath (i.e. 175% error at the beginning of toolpath). However, the Sencer model clearly follows the trend of the experimental contouring error. 4.5 Validation of Five-Axis Feedrate Optimization Method The 5-axis feedrate optimization method presented in this chapter is validated in this section. First, the 5-axis CNC machine setup in which the experimentation is conducted is described in Section 4.5.1. Section 4.5.2 presents the simulated and experimental results of the proposed 5-axis optimization method and Section 4.5.3 presents simulated results for an impeller toolpath commonly used in industry. 4.5.1 Description of Experimental Setup The contouring error model described in Section 4.4 was inserted into the 5-axis feedrate optimization scheme described in Section 4.2 as a constraint function along with the drive constraints. Experimental validation was conducted on the same 3-axis CNC machine described in Section 3.4, driven by a real-time controller implemented on a dSPACE 1103 controller board [30]. It was retrofitted with a 2-axis rotary table for 5-axis movement. The system is run in closed-loop using a PID controller with friction compensation at a 10kHz sampling frequency. The experimental setup for validating the 5-axis feedrate optimization algorithm is shown in Figure 4.8. and the corresponding plant model for a single axis is presented in Figure 4.9. For the given axis dynamics with plant parameters πΎπ, πΎπ‘ , π½, π΅, and ππ presented in Table 4.1, the axis controller 57 parameters πΎπ, πΎπ, and πΎπ presented in Table 4.2 are selected for each axis. The closed loop bandwidth of the system ππ is also presented in Table 4.2. Figure 4.8: Experimental setup for 5-axis feedrate optimization validation Figure 4.9: Plant block diagram for single axis 58 Axis π²π [A/V] π²π [Nm/A] ππ [mm/rad] π± [Kgm2] π© [Kgm2/s] X 6.57 0.48 1.59 7.00e-3 2.36e-2 Y 6.23 0.48 1.59 8.19e-3 4.30e-2 Z 6.48 0.48 1.27 7.67e-3 3.23-2 A 1.27 0.33 5.60e-3 8.11e-5 1.10e-3 C 1.27 0.33 1.11e-2 2.21e-4 2.90e-3 Table 4.1: Axis plant parameters of experimental setup Axis π²π π²π π²π ππ [rad/s] X 10 50 0.3 242.5952 Y 12.344 61.718 0.3670 239.2979 Z 13.880 69.4 0.4147 241.1032 A 245.55 1227.7 7.0147 226.3081 C 335.03 1675.1 9.5925 225.2943 Table 4.2: Axis controller parameters for experimentation 59 4.5.2 Simulation and Experimental Results Feedrate optimization was conducted using the reference position and orientation toolpaths shown in Figure 4.10. The resulting axis movement is presented in Figure 4.11. Figure 4.10: Tool Position and Orientation Trajectory Figure 4.11: 5-Axis displacement in validation a) b) 60 The following three tables display the drive and contouring error limits applied to the optimization. Both axis and tangential drive limits considered as constraints. The individual axis drive limits are presented in Table 4.3a. Tangential drive limits applied to the optimization are presented in Table 4.3b. Finally, the position and orientation contouring error limits applied to the optimization are presented in Table 4.3c. Drive Velocity [mm/s] Acceleration [mm/s2] Jerk [mm/s3] X 250 2500 50000 Y 250 2500 50000 Z 250 2500 50000 A 3 35 450 C 3 35 450 Table 4.3a: Optimization limits - Axis drive limits Tangential Limit Value Velocity [mm/s] 50 Acceleration [mm/s2] 2500 Jerk [mm/s3] 50000 Table 4.3b: Optimization limits - Tangential drive limits Table 4.3c: Optimization Limits - Position and orientation contouring error limits Contouring Error Value Position [um] 20 Orientation [rad] 1e-3 Three validation cases are selected to showcase the efficacy of the proposed feedrate optimization algorithm. Case 1 is a non-optimized, uniform feedrate profile which results in the same cycle time as the optimized feedrate profile. Case 2 is a non-optimized, uniform feedrate profile which results in the same peak contouring error as the optimized feedrate profile. These two cases are compared 61 to Case 3 which is the optimized, non-uniform feedrate profile. Table 4.4 presents details of the experimental validation cases used for validation. Case Description Feedrate 1 Non-optimized, Uniform, Fast 12 mm/s 2 Non-optimized, Uniform, Slow: 9 mm/s 3 Optimized, Non-uniform, Fast 50mm/s (maximum) Table 4.4: Experimental validation cases for five-axis feedrate optimization method The optimization algorithm modifies the control points of the initial, uniform feedrate spline to minimize the cycle time of the process while ensuring the constraints are satisfied. The resulting optimized feedrate profile, along with the unoptimized profiles (Cases 1 and 2) are shown in Figure 4.12. Due to the rigorous contouring error constraints, the optimized feedrate profile is well below the maximum 50mm/s tangential velocity limit. Figure 4.12: Optimized feedrate profile 62 The experimental contouring error for the optimized feedrate profile is compared to two constant feedrate profiles in Figure 4.13. The optimized feedrate profile has the same cycle time of 4.7s as the fast profile (Case 1) but shows a reduction in peak contouring error of 27%. The optimized feedrate profile has a similar peak contouring error of 61um as the slow profile (Case 2) but shows a reduction in cycle time of 25%. As with the 2-axis optimization scheme, this result clearly shows the efficacy of the 5-axis optimization method. Figure 4.13: Tooltip position contouring error comparison for validation cases 1-3 25% Cycle time reduction 27% Contouring error reduction 63 Table 4.5 and Table 4.6 summarize the simulated and experimental results with per-unit metrics normalized to Case 1. The simulated contouring error has a smaller per-unit value in comparison to the experimental results. This could be caused by to unmodelled dynamics of the actual machine not captured by the proposed contouring error model. Simulated Time Max Error [per-unit] [s] [per-unit] [um] Case 1: Fast, Unoptimized Feedrate - 12 mm/s 1.0 4.7 1.0 47 Case 2: Slow, Unoptimized Feedrate - 9 mm/s 1.3 6.2 0.7 32 Case 3: Fast, Optimized Max Feedrate - 50 mm/s 1.0 4.7 0.4 20 Table 4.5: Summary of simulation results Experimental Time Max Error [per-unit] [s] [per-unit] [um] Case 1: Fast, Unoptimized Feedrate - 12 mm/s 1.0 4.7 1.0 83 Case 2: Slow, Unoptimized Feedrate - 9 mm/s 1.3 6.2 0.5 61 Case 3: Fast, Optimized Max Feedrate - 50 mm/s 1.0 4.7 0.5 61 Table 4.6: Summary of experimental results 64 Simulated position and orientation contouring error of the optimized feed profile (Case 3) is compared to experimental results in Figure 4.14. The contouring error generated by the model proposed in Section 4.4 does not violate the imposed limits throughout the toolpath. However, despite the significant decrease in experimental position contouring error of over 27%, the imposed 20um limit was breached by 40um. The experimental orientation contouring error also breached the 1e-3rad limit by 30millirad. The discrepancy between experimental and predicted contouring error can be attributed to unmodelled nonlinearities such as friction, and the limitations of the model in dealing with areas of high feedrate and curvature. Figure 4.14: Predicted vs. experimental contouring error of optimized (case 3) feed profile: a) tooltip position contouring error, b) tool orientation contouring error a) b) 65 As described previously, the feedrate optimization method developed by Sencer et al. [1] which only limited drive signals was extended to include contouring error limits in this thesis. Although drive limits can avoid unwanted vibrations which affect part accuracy, a direct contouring error limit is more effective at reducing contouring error. This point is illustrated by Figure 4.15 which compares the contouring error of feedrate profiles generated with and without contouring error limits to the optimization. There is a position contouring error reduction of 48% and an orientation contouring error reduction of 19% when contouring error limits are imposed. Therefore, employing contouring error limits can improve contouring accuracy significantly, when compared to simply employing drive limits. Figure 4.15: Contouring error of optimized feedrate profile based on contouring error and drive limits vs. only drive limits: a) tooltip position contouring error, b) tool orientation contouring error a) b) 66 Finally, as velocity, acceleration, and jerk limits have also been imposed on the optimization, drive signals must be analyzed so see if these limits are violated. Experimental axis drive signals for linear (X, Y, Z) and rotational (A, C) axes are shown in Figure 4.16. Drive limits are respected in most axes, avoiding saturation. The rotational jerk limit that is violated in two places is likely due to the numerical differentiation used to generate the drive signals. Figure 4.16: Experimental drive signals: a) linear axes, b) rotary axes a) b) 67 4.5.3 Simulation Results for Impeller Toolpath Although the position and orientation trajectories shown previously are effective at validating the optimization method, toolpaths used in industrial applications should also be considered. The impeller, shown in Figure 4.17a, is a complex, freeform, industrial part produced by 5-axis CNC machines. The feedrate optimization strategy based on contouring error and drive limits are applied to the toolpath presented in Figure 4.17b, a trajectory designed for 5-axis flank milling of a jet impeller blade. The contouring error limits provided in Table 4.7 are applied to the simulation, along with the drive limits provided previously in Table 4.3. Figure 4.17: Impeller blade: a) Example of impeller b) 5-axis toolpath of impeller blade Contouring Error Type Limit Position [um] 50um Orientation [rad] 1e-1 Table 4.7: Position and orientation contouring error limits applied to impeller trajectory a) b) 68 For the simulation cases provided in Table 4.8 the simulated tooltip position contouring error results are shown in Figure 4.18. The optimized feedrate profile has the same cycle time of 15s as the fast profile (Case 1) but shows a reduction in peak contouring error of 83%. The optimized feedrate profile has a similar peak contouring error of 72um as the slow profile (Case 2) but shows a reduction in cycle time of 71%. Case Description 1 Non-optimized, Uniform, Fast: Feedrate - 42 mm/s 2 Non-optimized, Uniform, Slow: Feedrate - 12 mm/s 3 Optimized, Non-uniform, Fast: Maximum Feedrate - 50 mm/s Table 4.8: Simulated cases for feedrate optimization applied to impeller toolpath Figure 4.18: Simulated tooltip position contouring error comparison for impeller blade toolpath cases 1-3 83% Decrease in simulated contouring error 71% Decrease in cycle time 69 4.6 Conclusions In this chapter, a novel five-axis feedrate optimization strategy based on drive and contouring error limits was proposed. The kinematic complexity of extending the 2-axis optimization to 5-axis was discussed and the general kinematic model for a 5-axis CNC machine is presented. The optimization structure from Sencer et al. [1] is described and expanded to include a 5-axis contouring error constraint. The analytical contouring error model includes an analytical calculation of tracking error developed by Gordon and Erkorkmaz [4] which acts as an input for the position and orientation contouring error models developed by Sencer et al. [3]. A three-axis CNC machine retrofitted with a two-axis rotary table controlled by a dSPACE programmable real-time controller is used to validate simulation results. In comparison to non-optimized, uniform feedrate profiles, the optimized feedrate profile leads to significant reductions in cycle time and contouring error for the same toolpath. For a non-optimized feedrate profile which results in a similar peak contouring error, the cycle time reduction for the optimized feedrate profile is 25%. For a non-optimized feedrate profile which results in a similar cycle time, the contouring error reduction for the optimized feedrate profile is 27%. The proposed optimization method was also applied to an impeller blade toolpath which is more appropriate for industrial applications. The optimized feedrate profile for the impeller blade trajectory showed an 83% decrease in simulated contouring error and a 71% decrease in cycle time. 70 Chapter 5 Conclusion 5.1 Conclusions In applications which require a tool to be moved relative to a workpiece in multiple axes, part accuracy and process efficiency are important considerations. Total yield increases when scrapped part rate decreases and throughput increases. Greater part accuracy leads to fewer scrapped parts and greater process efficiency leads to higher throughput. A critical metric for part accuracy is contouring error: the point of closest approach between the actual tool position and the reference trajectory. Contouring error can be caused by hitting drive saturation limits, drive friction, disturbance forces, and tracking error from axis controller performance. Contouring error is also affected by the geometry of the toolpath where areas of higher curvature will lead to greater contouring error. A critical performance metric for production efficiency is cycle time: the time taken to complete the process. Cycle time can be reduced by increasing feedrate: the tangential velocity of the tool along the prescribed toolpath. The feedrate is typically kept as high as possible for high productivity. However, as feedrate increases, contouring error increases. The reciprocal relationship of feedrate on cycle time and contouring error reveals an application for optimization. Prior art for contouring error reduction strategies were effective at reducing 3- and 5-axis contouring error to improve part accuracy but did not explicitly consider process efficiency. A rich field of feedrate optimization methods focus on minimizing the cycle time of the process to improve process efficiency but do not directly reduce contouring error. Combining the ideas of 71 feedrate optimization and contouring error reduction, 2-axis and 5-axis feedrate optimization methods based on drive and contouring error limits was proposed in this thesis. The 2-axis feedrate optimization strategy based on drive and contouring error limits was proposed in Chapter 3. The feedrate optimization framework taken from Sencer et al. [1] was modified from five axes to two axes, and an analytical 2-axis contouring error model taken from Dong et al. [2] was added as an additional constraint. The aim of the optimization was to minimize the cycle time of the process while respecting non-linear drive and contouring error constraints, creating a linear programming problem which was solved by the MATLAB optimization toolbox. The result was a non-uniform, optimized feedrate spline which satisfies the local optimality conditions determined by the optimizer. Validation was conducted on a 3-axis CNC machine with the control structure bypassed by a programable real-time controller (dSPACE). A PID control structure with a friction feedforward compensator was programmed to reduce the effects of friction disturbance. Experimental results compared two, uniform, non-optimized feedrate profiles against the non-uniform, optimized feedrate profile. There was a 46% decrease in peak contouring error and a 37% decrease in cycle time for the optimized feed profile. Several 2-axis feedrate scheduling methods which are successful at reducing the process cycle time while keeping contouring error within limits were reviewed. However, 5-axis machining has become more relevant in production environments due to the increasing demand of complex, freeform surfaces within various industries. The 5-axis feedrate optimization method proposed in Chapter 4 could have a greater impact on industry. Similar to the 2-axis feedrate optimization, the framework for the 5-axis strategy was taken from Sencer et al. [1], and an analytical 5-axis 72 contouring error model was added as an additional constraint. Although the most accurate contouring error models are iterative, since the optimization requires a continuous objective and constraint functions, the contouring error model used in this optimization should be non-iterative. The contouring error model was constructed by combining a tracking error model developed by Gordon and Erkorkmaz [4] and feeding it into a 5-axis contouring error model developed by Sencer et al. [3]. The resulting feedrate profile minimized cycle time and kept drive and contouring errors within limits. Validation was conducted on the same 3-axis CNC machine with a dSPACE controller, with a retrofitted 2-axis rotary table to extend movement to five axes. Similar to the 2-axis optimization strategy, experimental results compared two, uniform, non-optimized feedrate profiles against the non-uniform, optimized feedrate profile. There was a 27% decrease in peak tooltip position contouring error and a 25% decrease in cycle time for the optimized feed profile. The results showed the efficacy of the optimization method in modifying the control points of the feedrate spline to simultaneously reduce the contouring error and cycle time of the process. 5.2 Future Directions An improvement to the work proposed in this thesis is to develop a more accurate 5-axis analytical contouring error model. Although the current model exhibited a reasonable degree of accuracy in estimating contouring error, the model breaks down in high feedrate and low radius of curvature segments. An overestimation of contouring error would cause the optimizer to unnecessarily reduce feedrate, and an underestimation of contouring error could mean real-world contouring error is not sufficiently limited. Developing an analytical 5-axis contouring error model which is more accurate than the current model could improve the quality of the optimization. 73 The literature reviewed in this thesis primarily focused on feedrate optimization and scheduling algorithms which, at best, only ensured local optimality. Another area which could improve the quality of the optimization is to use a method which ensures global optimality. Optimization techniques such as the Particle Swarm Optimization (PSO) and the Genetic Algorithm (GA) could be used in conjunction with the proposed method to find the globally optimum solution to further reduce process cycle time. Finally, the 5-axis feedrate optimization method proposed in this thesis only limits contouring error derived from tracking inaccuracy and does not include the effects on contouring error from other possible sources such as cutting loads. If this work is combined with a feedrate optimization method which constrains contouring error generated from predicted cutting loads at the tool tip, it would result in a more comprehensive feedrate optimization strategy. 74 Bibliography [1] B. Sencer, Y. Altintas and E. Croft, "Feed optimization for five-axis CNC machine tools with drive constraints," International Journal of Machine Tools and Manufacture, vol. 48, pp. 733-745, 2008. [2] J. Dong, T. Wang, B. Li and Y. Ding, "Smooth feedrate planning for continuous short line tool path with contour error constraint," International Journal of Machine Tools and Manufacture, vol. 76, pp. 1-12, 2014. [3] B. Sencer, Y. Altintas and E. Croft, "Modeling and control of contouring errors for five-axis machine tools - Part I: Modeling," Journal of Manufacturing Science and Engineering, vol. 131, pp. 1-8, 2009. [4] D. J. Gordon and K. Erkorkmaz, "Accurate control of ball screw drives using pole-placement vibration damping and a novel trajectory prefilter," Precision Engineering, vol. 37, pp. 308-322, 2013. [5] G. Pritschow, "On the influence of the velocity gain factor on the path deviation," Annals of CIRP, vol. 45, no. 1, pp. 367-371, 1996. [6] M. Tomizuka, "Zero phase error tracking algorithm for digital control," Journal of Dynamic Systems, Measurement, and Control, vol. 109, pp. 65-68, 1987. [7] Y. Koren, "Cross-coupled biaxial computer control for manufacturing systems," Journal of Dynamic Systems, Measurements, and Control, vol. 102, pp. 265-272, 1980. 75 [8] K. Erkorkmaz and Y. Altintas, "High speed CNC system design. Part III: High speed tracking and contouring control of feed drives," International Journal of Machine Tools and Manufacture, vol. 41, pp. 1637-1658, 2001. [9] K. Erkorkmaz, C.-H. Yeung and A. Yusuf, "Virtual CNC system. Part II. High speed contouring application," International Journal of Machine Tools and Manufacture, vol. 46, pp. 1124-1138, 2006. [10] K. Zhang, A. Yuen and Y. Altintas, "Pre-compensation of contour errors in five-axis CNC machine tools," International Journal of Machine Tools and Manufacture, vol. 74, pp. 1-11, 2013. [11] R. M. Khoshdarregi, S. Tappe and Y. Altintas, "Integrated five-axis trajectory shaping and contour error compensation for high-speed CNC machine tools," IEEE/ASME Transactions on Mechatronics, vol. 19, pp. 1859-1871, 2014. [12] Y. Altintas and B. Sencer, "High speed contouring control strategy for five-axis machine tools," CIRP Annals - Manufacturing Technology, vol. 59, pp. 417-420, 2010. [13] J. E. Bobrow, S. Dubowsky and J. S. Gibson, "Time-optimal control of robotic manipulators along specified paths," The International Journal of Robotics Research, vol. 4, pp. 3-17, 1985. [14] K. G. Shin and N. D. McKay, "Minimum-time control of robotic manipulators with geometric path constraints," IEEE Transaction of Automatic Control, vol. 30, no. 6, pp. 531-541, 1985. 76 [15] Z. Shiller and H.-H. Lu, "Robust computation of path constrainted time optimal motions," in IEEE International Conference on Robotics and Automation, Cincinnati, 1990. [16] Z. Shiller and H.-H. Lu, "Computation of path constrainted time optimal motions with dynamic singularities," Journal of Dynamic Systems, Measurement, and Control, vol. 114, pp. 34-40, 1992. [17] F. Pfeiffer and R. Johanni, "A concept for manipulator trajectory planning," IEEE Journal of Robotics and Automation, vol. 3, no. 2, pp. 115-123, 1987. [18] J.-J. E. Slotine and H. S. Yang, "Improving the efficiency of time-optimal path-following algorithms," IEEE Transactions on Robotics and Automation, vol. 5, no. 1, pp. 118-124, 1989. [19] Z. Shiller, "Time-energy optimal control of articulated systems with geometric path constraints," Journal of Dynamic Systems, Measurement, and Control, vol. 118, pp. 139-143, 1996. [20] A. Piazzi and A. Visioli, "Global minimum-time trajectory planning of mechanical manipulators using interval analysis," International Journal of Control, vol. 71, no. 4, pp. 631-652, 1998. [21] D. Constantinescu and E. A. Croft, "Smooth and time-optimal trajectory planning for industrial manipulators along specified paths," Journal of Robotic Systems, vol. 17, no. 5, pp. 233-249, 2000. 77 [22] Y. Altintas and K. Erkorkmaz, "Feedrate optimization for spline interpolation in high speed machine tools," CIRP Annals - Manufacturing Technology, vol. 52, no. 1, pp. 297-302, 2003. [23] "fmincon," MathWorks, 2018. [Online]. Available: https://www.mathworks.com/help/optim/ug/fmincon.html#bqbm9ek-1. [Accessed 5 12 2018]. [24] J. Dong and J. A. Stori, "Optimal feed-rate scheduling for high-speed contouring," Journal of Manufacturing Science and Engineering, vol. 129, pp. 63-76, 2007. [25] M.-T. Lin, M.-S. Tsai and H.-T. Yau, "Development of a dynamics-based NURBS interpolator with real-time look-ahead algorithm," International Journal of Machine Tools and Manufacture, vol. 47, pp. 2256-2262, 2007. [26] Z. Jia, L. Wang, J. Ma, K. Zhao and W. Liu, "Feed speed scheduling method for parts with rapidly varied geometric feature based on drive constraint of NC machine tool," International Journal of Machine Tools and Manufacture, vol. 87, pp. 73-88, 31 July 2014. [27] Z.-y. Jia, D.-n. Song, J.-w. Ma, G.-q. Hu and W.-w. Su, "A NURBS interpolator with constant speed at feedrate-sensitive regions under drive and contour-error constraints," International Journal of Machine Tools and Manufacture, vol. 116, pp. 1-17, 2017. [28] M. Chen, J. Xu and Y. Sun, "Adaptive feedrate planning for continuous parametric tool path with confined contour error and axis jerks," International Journal of Advanced Manufacturing Technology, vol. 89, pp. 1113-1125, 2017. 78 [29] J. Yang, D. Aslan and Y. Altintas, "Feedrate scheduling algorithm to constrain tool tip position and tool orientation errors of five-axis CNC machining under cutting load disturbances," CIRP Journal of Manufacturing Science and Technology, vol. 23, pp. 78-90, 2018. [30] H. S. M. Coxeter and S. L. Greitzer, Geometry Revisited, Washington D.C.: The Mathematical Association of America, 1967. [31] "DS1103 PPC Controller Board," 01 2008. [Online]. Available: http://www.ceanet.com.au/Portals/0/documents/products/dSPACE/dspace_2008_ds1103_en_pi777.pdf. [Accessed 21 01 2019]. [32] A. Yuen, "Spline interpolation and contour error pre-compensation," Master Thesis, University of British Columbia, 2011. [33] A. Yuen, K. Zhang and Y. Altintas, "Smooth trajectory generation for five-axis machine tools," International Journal of Machine Tools and Manufacture, vol. 71, pp. 11-19, 2013. [34] C.-H. Yeung, Y. Altintas and K. Erkorkmaz, "Virtual CNC system. Part I. System architecture," International Journal of Machine Tools and Manufacture, vol. 46, pp. 1107-1123, 2006. [35] Y. Altintas, A. Verl, C. Brecher, L. G. Uriarte and G. Pritschow, "Machine tool feed drives," CIRP Annals - Manufacturing Technology, vol. 60, pp. 779-796, 2011. [36] Y. Koren and C. Lo, "Variable-gain cross coupling controller for contouring," Annals of CIRP, vol. 40, no. 1, pp. 371-374, 1991.
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Feedrate optimization with contouring error and drive...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Feedrate optimization with contouring error and drive constraints in five-axis machining Nesbit, Erina Okuda 2019
pdf
Warning
You are currently on our download blacklist and unable to view media. You will be unbanned within an hour.
To un-ban yourself please visit the following link and solve the reCAPTCHA, we will then redirect you back here.
Page Metadata
Item Metadata
Title | Feedrate optimization with contouring error and drive constraints in five-axis machining |
Creator |
Nesbit, Erina Okuda |
Publisher | University of British Columbia |
Date Issued | 2019 |
Description | Five-axis Computer Numerical Controlled (CNC) machine tools are used to machine parts with complex, curved surfaces. When the reference toolpath contains frequencies beyond the bandwidth of the servo drive, the actual axis position lags the reference position commands which leads to axis tracking error. The tracking errors of three translational and two rotational drives are projected along the path using a kinematic model of the machine to form contouring errors i.e. the geometric deviation of the actual tool movement from the commanded toolpath. Parts with contouring errors larger than the design tolerance are often scrapped. Although contouring errors can be decreased by reducing the machining feedrate, this causes the cycle time to increase resulting in less productivity. This thesis proposes a feedrate optimization method which minimizes the process cycle time without violating contouring error limits as well as velocity, acceleration and jerk limits of the machine drives. First, discrete 5-axis tool positions are fitted to two quintic b-splines to represent the desired tooltip position and tool orientation trajectory. An initial, uniform feedrate spline is also generated in quintic b-spline form. Derived from the toolpath splines, discrete tool positions at uniform path displacement intervals are decomposed into axis commands based on the machine kinematics, and velocity, acceleration and jerk are calculated. The axis commands are also passed through the equivalent transfer function of each drive to predict their tracking errors, which are projected onto the toolpath to find contouring error. The optimization algorithm takes in the calculated axis tracking errors, contouring error, and cycle time for the given toolpath and feedrate profile. Within the optimizer, a gradient descent algorithm iteratively modifies the feedrate spline control points where the new feedrate profile is used to re-evaluate the cycle time, contouring error, and drive signals until a local minimum has been found. The final output of the algorithm is an optimized feedrate spline which ensures a minimum cycle time for the process, while maintaining drive and contouring error limits. The proposed algorithms are experimentally validated on a 5-axis machine tool controlled by an in-house developed open CNC system. |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | eng |
Date Available | 2019-03-29 |
Provider | Vancouver : University of British Columbia Library |
Rights | Attribution-NonCommercial-NoDerivatives 4.0 International |
DOI | 10.14288/1.0377683 |
URI | http://hdl.handle.net/2429/69339 |
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 | 2019-05 |
Campus |
UBCV |
Scholarly Level | Graduate |
Rights URI | http://creativecommons.org/licenses/by-nc-nd/4.0/ |
AggregatedSourceRepository | DSpace |
Download
- Media
- 24-ubc_2019_may_nesbit_erina.pdf [ 3.67MB ]
- Metadata
- JSON: 24-1.0377683.json
- JSON-LD: 24-1.0377683-ld.json
- RDF/XML (Pretty): 24-1.0377683-rdf.xml
- RDF/JSON: 24-1.0377683-rdf.json
- Turtle: 24-1.0377683-turtle.txt
- N-Triples: 24-1.0377683-rdf-ntriples.txt
- Original Record: 24-1.0377683-source.json
- Full Text
- 24-1.0377683-fulltext.txt
- Citation
- 24-1.0377683.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-0377683/manifest