Optimization of 5-axis high-speed machining using a surface based approach

: This paper deals with optimization of 5-axis trajectories in the context of high-speed machining. The objective is to generate tool paths suited to high speed follow-up during machining in order to respect cutting conditions while ensuring the geometrical conformity of the machined part. For this purpose, the optimization of the tool axis orientations is performed using a surface model for the tool path which allows integrating kinematical limits of the machine tool as well as classical geometrical constraints. The illustration of the optimization through an example highlights the gain in machining time, thereby demonstrating the feasibility of such an approach.


INTRODUCTION
Within the fields of automotive and aeronautics, 5-axis High Speed Machining (5-HSM) becomes nowadays a competitive process for the elaboration of sculptured surfaces. The objective is to obtain a part which respects the geometrical specifications with regard to given productivity criteria.  Many technological difficulties can be highlighted at each stage of the digital chain.
CAM activity consists in calculating the trajectory of the tool tip from the CAD model.
The result must be a collision free trajectory with optimized tool/surface positioning in order to guarantee the conformity of the part with respect to the required quality [1].
The calculated tool path is a series of C L points (Cutter Location points) and corresponding tool orientations, plus various machining parameters defining the CL file.
As this format is not recognized by the Numerical Control unit which only interprets "G-codes" (standard ISO 6983), a post-processing stage is necessary to convert the calculated tool path into an adapted file for the Numerical Controller (NC). This file, called the NC file, contains the set of tool postures (tool positions and tool axis orientations) and the corresponding feedrates. In 5-axis machining, there is no direct correspondence between the part coordinate system (PCS) and the joint space of the machine tool. As the tool path is calculated in the PCS, tool postures are expressed in the joint space via the Inverse Kinematical Transformation (IKT) which transforms the 3 tool path into direct axis commands. The IKT is most generally carried out during the post-processing stage. The NC unit thus performs the tool path interpolation and the trajectory follow-up. However, the actual axis behavior is altered by physical limitations such as kinematical capacities, cycle times of the NC, as well as by numerical problems linked to the IKT (singularities, multiple joint solutions, etc.) [2][3] [4]. Hence, from the CAM stage to actual machining, numerous parameters influence performance in 5-axis HSM affecting machining time as well as surface quality [5] [6].
Usually, the tool path optimization is performed by optimizing the two angles that define the tool axis orientation. Methods have evolved from finding the best tool positioning so that gouging and collisions are avoided based on concepts of differential geometry such as local curvature properties [1] [7][8] [9] [10], to methods that also include axis tool orientation smoothing [10] [11] [12][13] [14]. To avoid abrupt orientation changes and large cutting errors, Ho et al [10] [11] have developed a procedure which couples the tool orientation smoothing method (TOS method) to the cutting improvement method. The TOS method relies on a quaternion interpolation algorithm widely used in robotics. In their approach, Jun et al [12] defined a machining configuration space (C-space), which corresponds to the parameter space of the axis orientations defined by the two angles (α, β). For each C C point (Cutter Contact point), a feasible region is built in the C-space bounded by geometric and machining constraints. To minimize the cusp heights while avoiding gouging and collision, authors showed that the optimal orientation lies on the boundary of the feasible region. The smoothing is thus carried out in the C-space by determining the shortest C-distance between the previous optimal tool orientation and the next candidate. Another way to optimize the tool-path is to consider the geometry and architecture of the machine tool [15] [16][17] [18]. Considering the interpolation process of the NC unit, kinematical 4 errors and local behavior near singularity points can be taken into account during the CAM stage or the post-processing operation. By this way, the trajectory in the joint space of the machine is controlled.
These methods of tool path optimization rely on a geometrical approach, essentially based on the CAD model and geometrical parameters (surface curvatures, tool geometry and sometimes machine-tool geometry and architecture). In the context of High Speed Machining, actual velocities seldom match the programmed ones. Therefore, when the geometrical conformity of the part is reached, the objective becomes to control trajectory follow-up during machining, which means actual local feedrate and trajectory traveling time. In this direction, Kim et al. [19] introduced the concept of time-optimal tool paths. They proposed a method that machines an entire surface as quickly as possible while respecting both geometrical specifications and kinematical limits of the machine tool. The "greedy approach" they developed consists in finding the directions of maximal material removal, directions to which a vector field is fitted. Tool paths are thus modeled as streamlines of this vector field. However, the method only considers the motors speed limits. Farouki et al [4] proposed an interesting approach which takes into account limiting constraints such as the maximal torque and the maximal power of the machine tool in the calculation of the tool path feedrate. An illustration is presented within the context of 3-axis machining. Acceleration and power constraints expressed in the part frame directly correspond to axis constraints. Therefore, inertia and cutting forces can be taken into account. From the previous works on feedrate optimization [20] [21]. Sencer et al [22] proposed a method which determines for a given trajectory the maximal feedrate that can be locally programmed and reached during machining while respecting maximum velocities, accelerations and jerks of drives. The velocity profile is expressed as a B-Spline curve.
In their study, López de Lacalle et al [23] propose to use the estimation of deflection forces as a criterion for the best choice of tool paths. It is then possible to select tool orientations which produce low deflection forces respecting geometrical requirements.
Few authors include specific constraints linked to HSM in tool trajectory calculation and optimization. The best use of 5-axis HSM requires determining the most adapted tool trajectories to ensure geometrical specifications while minimizing machining time.
This leads to an optimization problem for which all the phenomena presented above must be taken into account in tool path calculation. In previous works, we have proposed to represent the tool path using a surface model, the Machining Surface (MS) [7] [24]. The MS is a surface including all the information necessary for the driving of the tool, so that the envelope surface of the tool movement sweeping the MS gives the designed surface. In 5-axis milling, the MS consists of two surfaces. The first one ensures the respect of the geometrical specifications by the exact positioning of the tool on the designed surface The second surface permits to manage the tool axis orientations taking into account different kinds of constraints. In this context, we address the issue of the optimization of tool axis orientation integrating kinematical constraints. Indeed, this paper aims at finding optimized axis orientations so that actual feedrate is maximized during trajectory follow-up. The proposed approach is related to 5-axis finishing of sculptured surfaces using ball-end tool or filleted-end tool. For this purpose, an analysis of the limiting factors which affect trajectory follow-up is necessary, particularly within the context of HSM. Using the inverse time formalism, these limiting factors can be expressed as constraints for the optimization problem. Therefore, the paper is organized as follows: section 2 presents specific limits linked to 5-axis HSM altering actual federates; section 3 deals with the Machining Surface model and the formulation of the tool axis optimization problem; section 4 is dedicated to the illustration of the efficiency 6 of our method through an example.

SPECIFIC LIMITS IN 5-AXIS HSM
Basically, the most influencing factors affecting 5-axis HSM performance are the cutting conditions, the part set-up, the machining strategy and the fitting of the set {machine tool, NC unit}. As far as kinematics performance is concerned, both the machine tool and the NC unit play a major role, in particular in the trajectory follow-up.
Hence, the study proposed next explores more particularly the influence of the set {machine tool, NC unit} on the trajectory follow-up within the context of 5-axis HSM.
The geometry of the machine tool is assumed to be perfect.
In 5-axis machining, the trajectory follow-up requires a coordinated movement of all the 5 axes of the machine according to the axis orders which are calculated in real-time by the NC. As stated above, the actual feedrate seldom matches the programmed ones.
Indeed, the kinematical behavior of the set {machine tool, NC unit} is limited by the characteristics of the machine itself, the characteristics of the NC unit and by the HSM specific functions of the NC. The study proposed in the paper focuses on a RRTTT type of machine architectures. Obviously, other types of machine tool configurations could be similarly studied.
As the tool path is defined by a set of tool positions (X pr ,Y pr ,Z pr ) and tool axis orientations (i,j,k), corresponding axis configurations (P axis1 ,P axis2 ,P axis3 ...) are calculated via IKT.
In addition, axis velocities are computed from axis configurations taking the programmed feedrate, Vf prog into account. Fig. 2 shows a segment of the trajectory defined by two successive tool postures. If the length of the segment is L 12 , the tool is supposed to be moving during ∆T 12 from one configuration to the second one with a constant feedrate: Hence, the velocity V i f12 of each axis i to cover the segment P 1 i P 2 i in the MCS is given by: At this stage, various factors act as limits and lead to velocity decreasing.

Axis kinematical limits
As axes are made of mechanical components, they have physical limits. In order to preserve the mechanical components, the NC reduces the maximal values that can be reached through numerical limits. Each axis i thus possesses limits of its kinematical characteristics: maximal velocity, V i max , maximal acceleration A i max , and maximal jerk, J i max . Therefore, during the follow-up of the theoretical trajectory, axes are managed so that these numerical limits are respected. This acts as a limiting factor for axis coordination in the MCS.

Limits linked to NC cycle time
Between two tool configurations, the NC unit needs at least one interpolation cycle time to calculate axis orders. For small length segments and high-programmed feedrates, the NC reduced the programmed feedrate in order to satisfy this cycle time [25] according to the following equation: The actual feedrate is thus locally lower than the programmed one due to the interpolation cycle time. Fig. 3 shows results highlighting velocity reduction for different small length segments. Indeed, let us consider a trajectory defined as succession of segments along the X-axis: a large segment P 1 P 2 (100mm), a small one P 2 P 3 (variable length from 3 to 0.5mm), a large one P 3 P 4 (100 -P 3 P 4 mm). To travel this trajectory, the programmed federate is set to 10m/min. If the cycle time T cycle time is equal to 12ms, only segments the length of which is greater than 3mm can be traveled at the programmed feedrate. As illustrated in Fig. 3, the registration of the X-axis velocity brings out a velocity reduction when traveling a 2mm-length segment. Rounding tolerances are thus introduced to improve the follow-up, while controlling the geometrical deviation to the trajectory. As a result, the velocity must be adapted which may cause slow-downs.
The combination of multi axes in the context of HSM imposes to use CNC functions the choice of which results of a compromise between productivity and quality. For instance, when using a NC unit Siemens 840D, it is required to use the Soft mode for which the acceleration motion profile is trapezoidal [25]. Although it is slower than the classical trapezoidal velocity motion profile, such a mode permits to preserve mechanical components while confining errors to the trajectory.

9
In the same way, in order to control axis behavior, error management is performed in the joint space (MCS) that means for each axis.
Finally, for each segment trajectory, the velocity is limited by the minimum value of the constraints. This yields to: As axis capacities are different, the follow-up of the trajectory is limited by the less powerful axis. Moreover, the nature of rotation and translation movements is different which makes difficult a direct comparison of axis capacities. To overcome this difficulty, we have proposed in previous works to express axis kinematical capacities using the inverse time method [5] [6]. With such formalism, it becomes possible to find the kinematical limits and to express them as limiting constraints in the optimization problem as we will see in section 3.3.

Location in the digital chain
The optimization method we propose is located at the interface between the CAM stage and the NC processing stage (Fig. 4). Indeed, the method requires the definition of an initial trajectory calculated by the CAM software, independently of the NC unit. This initial solution is the support of the optimization process, which relies on the following information concerning the machine tool: Kinematical model of the machine tool (IKT) Kinematical limits of each axis and of the NC unit Part setup onto the machine tool table Obviously, parameters such as the tool geometry, the machining tolerance, the feedrate and the scallop height allowed are already set in the initial CAM stage. Two different ways or points of view can be adopted to implement the optimization.
The first one simply consists in extending input data at the CAM stage. A simulation stage including axis capacities and NC limits can thus be carried out, and the trajectory can afterwards be modified to avoid collisions, or to answer kinematical criteria. In this case, the optimization can be executed in a post-processing stage to dedicate the calculus to a specific machine.
Considering the second point of view, a part of the calculation stage is transferred within the NC unit itself. This can be enabled by selecting an optimization option. The main drawback is that more computational capacities are required. Furthermore, trajectory simulation can only be carried out on the machine. This optimization process especially suits the STEP-NC project [26] [27] to promote the exchange of information between CAD / CAM / NC systems and provide a better integration and interoperability of data.

The surface model for tool path computation
The 5-axis HSM optimization relies on a surface description of the tool path: the trajectory of a particular point of the tool is expressed as a surface or as a set of surfaces

11
The guiding surface ensures tool positioning whatever the machining strategy, whereas the axis tool orientation is independently managed by the orientation surface.
Let r and R be respectively the corner radius and the radius of the tool (Fig. 5). If C C is the contact point between the tool and the surface to be machined, K is defined as the offset point of C C by a distance value equal to r. The triplet (K;C L ;n), where n is the contact normal, allows the positioning of the tool. The guiding surface is thus the locus of the K point, whereas the orientation surface is the locus of the C L point.
Calculation of the orientation surface (S O ) according to the machining strategy and the tool orientation management: S O is calculated as the generalized offset of the surface: Calculation of the tool postures according to the CAM parameters.
As the guiding surface is independent of the machining strategy, the trajectory of the tool tip is defined as sets of curves { } )) ( ), (  (9) where the unknowns are s(t), θ n (s) and θ t (s). The crux here is the relationship between time and position over the trajectory: s(t). As this relationship is physically carried out in real-time during trajectory processing, it is difficult to be expressed in a mathematical form. It is also important to notice that during trajectory processing, axis movements obey the law of movements imposed by jerk piloting mode: where kinematical parameters are constraint as stated in eq.(5).
If we focus now on the geometrical constraints, we have to consider the following ones: No collision, no gouging Cusp height limit The first constraint imposes orientation parameters to be included within an admissible space (similar to the C-space [12]). The second one implies the respect of the maximum cusp height allowed, h max , in order to ensure part conformity.
In its general form, the problem of optimizing S O is very complex. The main difficulty is to establish the relationship between the tool position and the time parameter integrating constraints linked to the trajectory processing (maximal kinematical performance, cycle time, look ahead functions…) which makes it difficult to express such a relationship whether explicitly or implicitly.
14 Hence, we propose to simplify the problem by only considering one pass at a time.
The main idea is to make the best use of the axes, according to their kinematical characteristics.

Optimization of the tool orientation: simplified problem
At this stage, we suppose that axis positions P i are calculated according eq.(1) for each tool posture (X pr ,Y pr ,Z pr ,i,j,k).
During trajectory processing, position orders are coordinated to ensure the respect of several constraints (eq.(5)). As axes are different, they are solicited differently; hence, trajectory follow-up is limited by the less dynamic axis with regards to the solicitations.
As movements are of different nature, axes can not be directly compared. For this purpose, we propose to express kinematical characteristics (V~s -1 , A~s -2 , J~s -3 ) using the inverse time formalism which simply traduces the coordination between axes.
Let us consider the movement of the axis i from the position P i 1 to the position P i 2 .
The axis displacement from one configuration to the other one is: By assuming that the interpolation between these two positions is linear in the joint space, the current position is given by: where α i is the fraction of total displacement between P i 1 and P i 2 , which corresponds to the expression of the current position in the inverse time formalism: The coordination of all the axes into the joint space implies that the fraction of displacement is considered equal for each axis: In which the kinematical parameters are constraint as stated in equation (5), which is now expressed as follows: with: In order to minimize machining time, the proposed approach consists in finding the set of tool orientations so that the values of the three constraints max V , max A and max J are reached. As maximizing velocity might not be similar to maximizing acceleration or jerk, we have to determine the most limiting kinematical characteristic. Hence, the optimization process consists of three main stages (Fig. 6). 16 First, a global optimization step is realized considering the constraint max J .
Supposing that the jerk can take one of the following three values: axis accelerations and velocities can be reconstructed according to a predictive model [5]. Then, new stages of optimization can be locally performed considering max A and next max V . Indeed, if acceleration saturations are detected, the orientation is locally modified so that the acceleration max A is reached (step 2). The last step is similar for velocity: once velocity saturations are detected, tool orientations are modified along the trajectory portion which is concerned so that the velocity is increased. The process is iterative as the local modifications of velocity and acceleration may provide jerk modifications.
With this model, assuming that the constraints prog Vˆ and NC Vˆ are not reached in eq. (17), to each step of calculus corresponds one limitation: max J , max A or max V .
Let consider max Q a kinematical characteristic which can be velocity, acceleration or jerk expressed in its inverse time form. It can be projected onto the tool-path at the C L point: As the inverse time formalism is used, the optimization problem can be written in a similar way whatever the kinematical characteristic.
Therefore, the objective function to be maximized is: defines the trajectory in the parametric space, the new formulation of the optimization problem is summarized in eq. (22). The aim is to find optimal evolution laws of the yaw and tilt angles (θ n (s),θ t (s)) all along the trajectory. As tool paths are considered one by one, geometrical constraints (no gouging, maximal cusp height) are expressed as limitations on both the yaw and tilt angles.
The function F Q must provide the maximum speeds achievable along the trajectory according to the orientation laws of the tool axis. Fig. 7 illustrates the construction process of the function F Q .
The first step is the calculation of the tool trajectories from the Machining Surface (eq.(6) and eq. (7)  To illustrate our purpose, the proposed approach is applied to the machining of a hyperbolic paraboloid.

APPLICATION
The approach is here conducted on a pass, considering that the analysis can be repeated throughout the whole machining tool path. In this example, we have directly modeled the guiding surface as a hyperbolic paraboloid as a Bezier patch (Fig. 8).
The patch is machined using parallel planes guiding strategy so that the tool follows the rules of the surface. Hence, tool paths are lines in the PCS. Initially the tilt angle θ t and the yaw angle θ n are set respectively to 1° and 0°. The tool radii are R=5mm and r=1.5mm.
Experiments are carried out using the milling centre of our laboratory, a MIKRON UCP710 with a RRTTT kinematics equipped with a NC unit Siemens 840D [5] [6].
The programmed feedrate is set to 5m/min. The IKT is performed in real time by the NC unit. The part set-up is chosen so that the frame of the part system (X pr ,Y pr ,Z pr ) corresponds to the frame of the machine tool (X m ,Y m ,Z m ). Note that for this surface, all the 5 axes of the machine tool are solicited. We study the longest tool path, in the middle of the part. Fig. 9(a)   Hence, the actual relative feedrate tool/surface does not match at all the programmed one, especially in the middle of the path; cutting conditions are not respected and machining time is increased (Fig. 11).

Fig. 11. Initial and optimized relative feedrates.
Without loss of generality, we propose an illustration of the optimization approach based on the optimization of the velocity only. Therefore, the objective function according to eq. (21) can be written as follows: Let us now express the geometrical constraints for (θ t (s),θ n (s)). Considering the studied surface, this yields to: The resolution leads to the evolution of (θ t (s),θ n (s)) proposed in Fig. 12. The value of the yaw angle is quasi constant around -50° whereas the tilt angle varies from 40° to 45°.

Fig. 12. Optimized tilt and yaw angle.
Once the velocity is optimized for all axes, kinematical performances are clearly improved. This remark stands for the velocity, which is the objective function, but also for acceleration and jerk (Fig. 9). Indeed, axis displacements are completely different, rotary axes are less solicited (Fig. 10). The effective velocity along the tool path is quite equal to the programmed one (Fig. 11), which guarantees the respect of cutting conditions for the main part of the trajectory. The remaining difference between actual 21 optimized feedrate, 4.5m/min, and the programmed one, 5m/min, is due to short length segments and the constraint from NC unit cycle time for the interpolation (eq.(4)). But in this example, such short length segments are necessary to respect the chordal deviation. Finally, machining time of the optimized trajectory is three times shorter.
Nevertheless, considering the entire surface machining, the resulting tilt and yaw angles penalize the cusp height. Indeed, based on equation provided in [7], the cusp height is no more respected. If we consider the approximation of the effective profile of the filleted-end tool as a circle [28] we can roughly compute the necessary distance between guiding planes to maintain the same cusp height. In the worst case, for which θ t equal 45°, the distance between guiding planes should be approximately ten times smaller, which significantly increases machining time. Then, in order to maintain both acceptable machining time and surface quality, it should be interesting to add the equivalent tool radius as a constraint in the optimization problem or to let degrees of freedom for the workpiece setup [29].

CONCLUSION
Within the context of multi-axis machining of complex surfaces, we have proposed to optimize tool trajectories and their follow-up during machining.
The optimization problem relies on the Machining Surface model for tool path which is of great interest in the generation of optimal trajectories. In 5-axis the Machining Surface consists of a set of two surfaces: the guiding surface and the orientation surface.   Step 1 Step 2 Step 3 Local m of acceleration