A Neural Network Approach for Predicting Kinematic Errors Solutions for Trochoidal Machining in the Matsuura MX-330 Five-Axis Machine

The prediction of machining accuracy of a Five-axis Machine tool is a vital process in precision manufacturing. This work presents a novel approach for predicting kinematic errors solutions in five axis Machine. This approach is based on Artificial Neural Network (ANN) for trochoidal milling machining strategy. We proposed a multi-layer perceptron (MLP) model to find the inverse kinematics solution for a Five-axis Machine Matsuura MX-330. The data sets for the neural-network model is obtained using Matsuura MX-330 kinematics software. The solution of each neural network is estimated using inverse kinematics equation of the Machine tool to select the best one. As a result, the Neural Network implementation improves the performance of the learning process. In this work trochoidal trajectory generation formulation has been developed and simulated using the software Matlab Inc. The main advantage of the trochoidal path is to present a continuous path radius leading the machining process to take place under favorable conditions (no impact, less marking of the part, ...). Obtaining the toolpath is to allow programming of the toolpath according to ISO 6983 (which defines the principles of the G code). For this, numerical study of trochoidal strategy and experimental result are presented with aims to full milling and to ensure a control of radial engagement


INTRODUCTION
With rapid advancing in industry technology, the five axis machining is one of the important processes in precision manufacturing of complex workpiece surfaces.It has been used in aerospace, automotive parts, shipbuilding, and even consumer industry.Moreover, it has many advantages compared to conventional threeaxis machine tools, it can provide the flexibility of tilting the tool axis to various orientations, increase the cutting efficiency and avoid the tool collision against workpiece [1].However, Bohez [2] classified the configurations of Five-axis machine tool as three typical types :(RRTTT), (RTTTR), (TTTRR).
Each of these configurations has certain advantages and disadvantages.Thus, Five-axis machine tools have more error sources compared with the 3-axis machine tools.Consequently, it is more difficult to determine the error sources of a five-axis machine tool due to the complexity of configuration [3].
In general, the source errors of five-axis machine tools can be classified into four types: geometric errors, kinematic errors, and thermally induced errors, deflection errors caused by cutting forces, and other errors, such as those cause d by servomotors, errors of machine axes rotation, or numerical control interpo-lation algorithmic errors [4,18].
This kinematics problem is known to be a nonlinear problem having multiple solutions; its complexity widely depends on the order of appearance and the relative orientation of the different joint (link) axis along the kinematic chain, and can be treated like those of robotic manipulators [2].
Many researchers have studied kinematics problem for different types of 5-axis machines.Riad.T and Farouki [5], study the problem of determining the inputs to the rotary axes of a 5-axis CNC machine, such that relative variations of orientation between the tool axis and surface normal are minimized subject to the constraint of maintaining a constant cutting speed with a ball-end tool.
Moonet and al [6], developed a methodology to evaluate and compensate for the kinematic error at the tip of the tool in multi-axis machine tools using screw theory.Hai-Yin Xu and al [7] proposed kinematic chain used in the management of tool wear in five-axis machining.Sorby [8] used a homogeneous matrix in inverse kinematics to study the positioning of the machine axes close to the singular configurations of a 5axis milling machine.Lamikiz.A, and al [9] used a homogeneous matrix to evaluate the consequences in the tool tip position in geometrical errors.
In this study, a homogeneous matrix transformation is employed to identify the relation between workpiece coordinate and machine coordinate with the aims to applied new trochoidal toolpath milling.
However, tracking errors of both rotary and translational axes are kinematically transmitted to the tool tip in five-axis machine tools, resulting in contouring errors between the commanded and the actual tool paths [10].
In kinematics problems, there are two types of kinematics: the first one is the forward kinematic problem (FKP) which is the mapping from joint space to Cartesian space (operation space); the FKP is to find the position and the orientation of the end-effector.Traditionally, there were three methods used to solve forward kinematics problem of robotic manipulators, which are geometric, algebraic and iterative methods [11,19].This problem admits a single solution, which can be determined by simple matrix and vector multiplications.The second one is the Inverse Kinematics Problem (IKP) is the mapping from Cartesian space to joint position; the IKP is to find the joint space from the pose of the tool.The inverse kinematics solution by using traditional technique (geometric, algebraic and iterative) is a time consuming study, as we know that there is no unique solution for the inverse kinematics even mathematical formulae are complex and time taking so it is better to find out solution through neural network.That is why it is significant to apply an artificial neural network models.
Here artificial neural network (ANN) approach has been proposed to control the kinematic of five-axis machine tool.Artificial neural network method is used to learn the forward and the inverse kinematics equations of 5-axes CNC machining System.This method learns the functional relationship between input (Cartesian space) and output (joint space) based on a localized adaptation of the mapping [12,13].The simulation and computation of inverse kinematics using multiple layer perceptrons (MLP) is particularly useful where less computation times are needed, such as in real-time adaptive machine tool control [14,15] .
In this work, we propose a procedure to resolve inverse kinematics of Matsuura MX-330 Five-axis machine (TTTRR).Three linear axes (X, Y, and Z) and two rotary axes (A, C) comprise this machining, the table moves linearly in the X and Y directions while the head moves linearly in Z direction.The table also tilts about the X-axis and rotates about the Z-axis (angles A and C, respectively), using a structured multilayer perceptron (MLP), that can be trained quickly.The result of each network is assessed using inverse kinematics equations to extract information about inverse kinematics error.Otherwise stated, the tool orientation and position obtained for each link is used to compute the Cartesian coordinate for the end effector.

KINEMATICS MODEL OF A FIVE-AXIS MACHINE
In this section, the Kinematics Model of the Matsuura MX-330 Five-axis milling is constructed using the D-H method.(Figure 1 The table of the machine has two revolute axes C and A, and two prismatic axes X and Y.The column of machine is fixed which has coordinate frame B and tool holder has a vertical prismatic axis Z.In addition, the main parameters of the machine tool are listed in Table 1.The adequate control of the position and orientation of the workpiece and the cutter, a kinematic model is required to describe the motion of the mechanism in mathematic.The mechanism of a five-axis machine can be seen as a chain of rigid bodies (or links) connected by the joints, which may be either revolute or prismatic.
The kinematics model of a five -axis machine can be seen as a combination of the individual kinematic models of the links.In the section, the forward Kinematics Model of the Matsuura Five-axis milling centre is found using the D-H method.
(Figure 2) shows the kinematics chain.The end of the chain is attached to the cutter tool (t), while the beginning of the chain is attached to the work-piece (p).In addition to the joints t and p, there are five intermediate joints, which indicate the rotational, or the translational joints.The Denavit-Hartenberg (D-H) first introduced the spatial transformation between two successive links using a 4 × 4 D-H matrix.
i-1 T i =Rot(Z,θ i )Trans(Z,b i )Trans(X,a i )Rot(X,α i ) (1) Once the corresponding D-H parameters are defined, these parameters can by create directly from the workpiece to the tool according to (table 2).
The D-H matrices for these links can be multiplied to each other to form a single transformation from p to t, with this transformation matrix can be related as p T 1 to 5 T t , and it is calculated from Eq. ( 1), so p T 1 can be calculated as follows: Forward kinematics is used to calculate the coordinate system (P-system) by the position vectors P = [P x ,P y ,P z ] T and orientation The position and rotation of the vectors of cutter tools relative to work-pieces is determined by the matrix D-H.
The first three rows of the last two columns of matrix ( 3 Using the Forward kinematics transformation from in Eq. ( 4), the reference tool path variables (P x ,P y ,P z , O i ,O j ,O k ) the coordinate system (P-system) is transformed into coordinates in the machine tool coordinate system (M-system) as follows: (5) Using the Inverse kinematic equations from ( 5), the tool coordinate system (M-system) obtained axis movements for poled kinematic inverse as shown in (Figure 3).

TROCHOIDAL STRATEGY
Trochoidal machining is a type of machining trajectory emerging due to the increase in the performance of manufacturing means [17].
The principle of a trochoidal curve is to have the cutting tool describe a curve of continuous curvature, thus avoiding to work in full matter.As we will show later, they allow controlling the axial engagement of the tool, which leads to a better management of cutting forces.
From the mathematical point of view, the term trochoid refers to the curve obtained by combining a uniform circular motion and a uniform linear motion.For example, in (Figure 4), the point B rotates uniformly around the point A, itself being animated by a linear motion.A parametric equation of a trochoid is given in Cartesian coordinates by the system of equations ( 6), using the following parameters: V, velocity of the center of the circle in its uniform rectilinear motion, R, radius of the circle (R> 0), ω pulsation (ω> 0) and t, parameter of the curve (t> 0).

. .cos( . )
.sin( .) Pocket dump is a central issue in rough milling.Trochoidal machining is a new type of strategy that has found applications in rough machining of hard materials.
A trochoidal trajectory generation formulation has been developed.The results of this study lead to a better knowledge of this new machining strategy, with a view to its application to the roughing of light alloys.

Results
Simulation of the trochoidal toolpath using the software Matlab Inc. (figure 5).

Figure 5. Representation of the trochoidal toolpath Milling
After obtaining the toolpath, a conversion of the results to a point file is performed (Table 4).The purpose of the points (coordinates) file is to allow programming of the toolpath according to ISO 6983 (which defines the principles of the G code).

Checking the Curvature
The main advantage of the trochoidal path (Figure 6) is to present a continuous path radius leading the machi-ning process to take place under favorable conditions (no impact, less marking of the part, ...).

Figure 6. Verification of curvature of the trajectory
For that, a graph representing some points is represented (Figure 6) allowing to control the curvature of the segments.

NEURAL NETWORK APPLICATION FOR MATSUURA MX-330 FIVE-AXIS
The advantages of using ANN technique is that they have a capacity to learn based on optimization of an appropriate error function and they have an excellent performance for approximation of nonlinear functions.Multilayer perceptron neural networks has better ability than other techniques to solve various complex problems.MLP is adept of performing nonlinear mapping between the input and output space due to its large parallel interconnection between different layers and the nonlinear processing characteristics.MLP neural network takes a multi-dimensional input, and then delivers it to the other neurons according to their weights.
This donates a scalar result at the output of a neuron.The transfer function of a Multilayer perceptron neural network, employs a learning process to create a relationship between output and input.For the activation input, a time function is needed [12,16].
A back-propagation algorithm with multi-layer perceptron is used for the present problem.The network is trained with data for a number of Cartesian position and orientation of the end effectors.
The structure of the considered MLP network is shown in (Figure 7).The output vector is presented to a hidden layer neuron in the network via the input neurons.Each neuron of a layer is connected to every neuron of the next layer.The network uses a supervising learning, in which an input is presented to the network along with the desired output and the weights are adjusted so that the network attempts to produce the desired output.

Formulation of Multilayer Perceptron Network
The MLP model involves an input layer, an output layer and generally one or more hidden layers [14].
Figure 8 shows the architecture of Multilayer Perceptron Network used for estimation of incremental joint space.It has an input layer of five neurons; one hidden layer of 25 neurons with sigmoid activation function (φ) defined by Eq. ( 7): ( ) where y is the corresponding input.
For the output layer, a nonlinear activation function (sigmoid) is used in the implementation. , where φ is the nonlinear activation function at the output layer; Ws (k) is the k th element of input vector Ws; M is the number of hidden layer neurons.
The flow chart of the multilayer perceptron neural network in shown in Figure 8.

NEURAL NETWORK RESULTS AND DISCUSSIONS
To validate the performance of proposed model based on Multilayer Perceptron Network for inverse kine-matics problem, for predicting kinematic errors solutions, simulation studies are carried out using Matlab.
In this work, the training datasets are generated using equation (5).A dataset of 3125 points is first generated as per the formula for the input parameter (X, Y, Z, and A, C) coordinates in (mm).This dataset is randomly divided into training, validation, and test sets, 1042 data points is used as training data, 1040 is used for testing the MLP, and the remaining is used for the validation set.Backpropagation technique is employed for training the MLP network and updating the desired weights.The MLP formulation is a generalized one and might be utilized for the solution of forward and inverse kinematics problem of manipulator of any configuration.
However, inverse kinematics configuration is considered in this paper to illustrate the applicability of the MLP model.To test the stability of the models validation data or testing data are essential, as discussed earlier.The 1042 data points were selected randomly for testing the MLP model.Figure 6 shows the performance of the networks which was measured as the difference between desired and actual system output.
To drive the Machine tool to track a chosen trajectory, it will be required to split the path into small portions, and to move the Machine tool over all intermediate points.To accomplish this task at each intermediate location, the Machine tool's IK equations are solved, a set of joint variables is calculated, and the controller is directed to drive the Machine tool to the next segment.When all segments are completed, Figure 9.a to 9.e shows the analytical trajectory tracking for the Matsuura MX-330 five-axis over the X, Y, Z, A and C, Coordinates of the global coordinates system for both of the network compared to each other verses the desired trajectory.
Figure 10, shows the best model selected using cross validation technique for the input coordinate X-axis, in which the error of validation is plotted on the y-axis and the number of iterations is plotted on the x-axis.Since we carried out a heuristic search in order to find the best number of neurons in the first and second hidden layers and the values of momentum and learning rate, we used a new variable, which is the number of iterations, to count the iterations made by the algorithm to tune the parameters of the MLP model.The best model corresponds to the lowest validation error (0.0052).In this case we find the number of neurons of 25 and 11 for the tow hidden layers respectively, and a momentum value of 0.3000 and a learning rate of 0.1100.The best MLP model uses the selected parameters in order to calculate the test error (0.0053).The results of the other input parameters are illustrated in table 5.
The results in Figure 9 and 10 show that the idea of using a neural network has produced an excellent approximation of the inverse kinematics function.

Comparison Study On The Given Trochoidal Milling Machining Strategy
To highlight our work, this part presents the various works concerning the trochoidal machining strategy.Work of Matthieu Raucha , Emmanuel Ducb , Jean-Yves Hascoet [20], aims to select the best tool path parameters according to the process constraints.Then, improved tool path generation for pocket milling applications is proposed.An experimental study is performed to validate the proposed approach and study the efficiency of trochoidal tool path implementation for pocket milling applications.The impact of the dynamics of the machine tool is evaluated in particular.The work presented here leads consequently to the enhancement of implementation of the trochoidal tool paths according to the process constraints.
The Taguchi method is suitable for industrial use, but it can also be used for scientific research purposes.It emphasizes a mean performance characteristic value close to the target value rather than a value within certain specified limits, thus improving the product quality.Tushar Prakash Mestry [21], present study, the design of experiment by L9 orthogonal array has been described by considering two factors and three levels to analyze the influence of process parameters by using the main effects, analysis of variance and to get the optimal conditions.Thus, best parameters within the experiment will result for optimal conditions.Finally, the optimum combinations of parameters will be achieved by confirmation tests to verify that experimentally obtained results are true.
Ashwin Polishettya and all [22], presented research paper as an attempt to investigate and improve the machining performance of Ti-6Al-4V.Thin wall machining is an advanced machining technique, especially used in machining turbine blades, which can be done both in a conventional way and using a special technique known as trochoidal milling.The experimental design consists of conducting trials using combination of cutting parameters such as cutting speed (vc), 90 and 120 m/min; feed/tooth (fz) of 0.25 and 0.35 mm/min; step over (ae) 0.3 and 0.2; at constant depth of cut (ap) 20mm and using coolant.A preliminary assessment of machinability of Ti-6Al-4V during thin wall machining using trochoidal milling is done.A correlation established using cutting force, surface texture and dimensional accuracy.
When machining narrow grooves, corners, and other complex cavities with trochoidal milling, the irrationally large trochoidal step usually leads to chatter, while the conservative trochoidal step constrains the machining efficiency.Rong Yan and all [23], present a stability prediction model of trochoidal milling to solve these problems.An approach considering trochoidal steps and spindle speeds is presented to predict stability boundary of trochoidal milling.
With considering the varying cutter-workpiece engagements, the stability of trochoidal milling process is predicted by obtaining the stability lobes of different cutter location (CL) points along the trochoidal milling tool paths.Based on the proposed stability model, a trochoidal step optimization strategy is deve-loped to improve the machining efficiency of trochoidal milling under other parameters in a given situation.Cutting experiments are performed on the machining center GMC 1600H/2 to show the effectiveness of the proposed trochoidal milling stability model.Finally, simulations are adopted to illustrate the optimization strategy.
Jean-Yves Hascoet and all [24], work aims to evaluate the potential of trochoïdal milling and plunge cutting strategies in rough pocket millings.Algorithms were developed to generate trochoïdal and plunge cutting trajectories for pocket milling, with cycle time optimisation regarding to milled surfaces quality.Then, an experimental campaign has been done to compare the new strategies with classical ones.The study focused both on productivity and quality issues.The influence of the machine tool capacities and architecture was also examined.Two different high speed milling dedicated machine tools were tested: a serial three-axis machine tool with "classic" dynamic capacities, and a parallel kinematics five-axis machine tool with high dynamic capacities.The results of this work lead to a better definition of the strengths and weaknesses of trochoïdal milling and plunge cutting strategies in aluminium alloys rough machining with the focus to optimize the choice of strategies.
An optimization strategy for high speed machining of hardened die/mold steel based on machining feature analysis was studied [25].It is a further extension of the previously presented study on the thermal mechanism of end milling and constant cutting force control.An objective function concerning machining cost and associated optimization algorithm based on machining time and cutting length calculation was proposed.Constraints to satisfy specific machining strategies when high speed machining the hardened die/mold steel, trochoid tool path pattern in slot end milling to avoid over-heat and feed rate adaptation to avoid over-load, were also discussed.As a case study, the tool selection problem when machining a die part with multiple machining features was investigated.
We conclude that after this review of the work on the machining by the trochoidal strategy, our new technique of optimization by a Neural Network Approach for predicting kinematic errors solutions for trochoidal machining, which combines the kinematic behavior of the 5-axis machining with the guidance in trochoidal strategy does not exist at the present time.

MACHINING OF THE WORKPIECE TESTS
In order to validate the analytical engagement model, experimental studies were performed.After checking the curvature of the path and obtaining the NC program, the workpiece is machined (Figure 11).Implementation of emergent machining strategies, the type of trochoidal strategy not only avoid machining situations in full milling, but also, ensures a control of the instantaneous radial engagement.
This strategy is therefore well suited to machining situations for which the tool / material pair strongly restricts the choice of cutting conditions.
Finally the machining of these test pieces is interesting for the machining of other forms.

CONCLUSION
This work presents an approach for predicting kinematic errors solutions by the generation of an optimal highperformance precision contour algorithm for five-axis machines.
The method is based on solving inverse kinematics using artificial neural network.A new design of multilayer perceptron networks have been proposed for the optimization of kinematic errors of the Matsuura MX-330 five-axis.The problem of error value (mean square error) is nearly zero, which is very much acceptable when compared to the precision figures and repeatability error values of any typical manipulator.
From the present study, it is observed that the MLP gives minimum mean square error for the resolution and joints variables as a performance index.This artificial neural network based joint position and rotation prediction model can be a useful tool for the production engineers to estimate accurately the motion of the manipulator.
For predicting kinematic errors solutions for trochoidal machining, the trochoidal milling method was investigated detail.An approach for defining the engagement along the trochoidal motion was developed.This method is based on solving inverse kinematics using artificial neural network.A new design of multi-layer perceptron networks has been proposed for the optimization of kinematic errors of the Matsuura MX-330 five-axis.The problem of error value (mean square error) is nearly zero, which is very much acceptable when compared to the precision figures and repeatability error values of any typical manipulator.
The stability of the trochoidal milling process is predicted by obtaining best model selected using cross validation technique for the input coordinate X-Y-Z axis made by the algorithm of the MLP model.The method is based on solving the inverse kinematics using the artificial neural network.
Based on the proposed stability model, a trochoidal step optimization strategy is developed to improve the machining efficiency of trochoidal milling under other parameters in a given situation.Cutting experiments are performed with test-piece to show the effectiveness of the proposed trochoidal milling stability model.Finally, simulations are adopted to illustrate the optimization strategy.
uring errors of CNC machine tools, International Journal of Machine Tools and Manufacture, Vol 88, pp.9-23, 2015.
.a) shows the Model of Matsuura MX-330, while (Figure 1.b) shows the geometry of the Matsuura MX-330 Five-axis milling at its initial position.At this configuration, the origin of tool holder frame G is coincident with the workpiece frame P on top of centre of the table.

Figure 5 .
Figure 5. Definition of the tool pitch Table 2. Characteristics mill and groove Cutter diameter (mm) 20 Width of the groove (mm) 28 Length of the groove (mm) 120 Step (mm) 1.5

Figure 8 .
Figure 8. Flow chart of the MLP neural network

( a )Figure 9 .Figure 10 .
Figure 9. Graph for matching of desired and predicted values of all input dataset

Table 5 . The obtained MLP parameters.
X-axis Y-axis Z-axis A-axis C-axis