Simulation of Machining Operations Based on the VMT Concept

This section focusses on the dynamic modelling of the machine tool including its computer numeric control, and its interaction with the machining process. To properly simulate modern machine tools in machining condition, the virtual machine tool model based on SAMCEF Mecano is used to account for close interaction between the dynamic behaviour of the mechanical structure, drives and the control. To fully capture the dynamic behaviour of the machine, force interactions between the cutting tool and the workpiece are also considered. A strong coupling between the mechatronic model of the machine tool and a machining simulation tool is implemented. A specialized cutting force element has been developed. It considers the dynamics of the tooltip combined with the tool-workpiece engagement to generate cutting forces. The use of such digital twin model is demonstrated considering some machining operations.


Machining Module
The considered cutting simulation approach is compatible with the virtual machining paradigm. Derivation of the forces acting on the cutting edges of the milling tool is a two-step procedure. First, the geometric and volumetric properties of the removed material are computed. Second, process dependent heuristic is applied on the tool move spatial data to compute cutting force components. The process for obtaining cutting forces is illustrated in Fig. 11.2. This method is widely described in Chap. 3 of the book. This section focusses only on its integration in the Mecano software.
The cutting force module [4], originally developed in MATLAB, is converted to a single DLL to be called in the SAMCEF simulation. An overview of the cutting force module structure is shown in Fig. 11.3. The cutting force module is composed of three primary sections (labelled a-c in Fig. 11.3) which execute the key functions of the cutting force model. These sections are combined into a single module, and the different sections are only called as necessary using the desired RunFlag input value. The first step of the cutting force module, Fig. 11.3a, generates the discretized tool mesh based on the tool dimensions and mesh resolution data. The constant edge  effect vectors, F e,XY Z,el , the cutting force matrices, Q c,XY Z,el , are also generated in this first step. This first step is only called once at the beginning of the simulation and at each tool change. The second step, Fig. 11.3b, updates the TWE tool mesh and determines average cutting forces based on the nominal feed direction and feed per tooth. The second step of the module is called when the TWE obtained from the ModuleWorks module is updated. The third step, Fig. 11.3c, determines the instantaneous, angle-dependent cutting force based on the tool rotational speed and the current simulation time.
Step three is called during for each SAMCEF iteration to access required instantaneous forces.

Coupling Architecture
The mechanical model of the machine tool is coupled with three additional simulation modules (Fig. 11.4). For the CNC modelling, a MATLAB Simulink model that is converted to C-code is used and included in a dynamic library thanks to MATLAB Coder capabilities. As the cutting force module is also based on MATLAB programming, the same approach of creating a dynamic library from C-code generated by MATLAB Coder is selected. The simulation C++ program for tool-workpiece engagement (TWE) computation is also converted to a dynamic library that can be called from C-code functions.
In SAMCEF Mecano, two specific elements have been developed to manage these dynamics libraries. The first one, called DIGI element, allows coupling the mechanical model to any Simulink model and, in particular, control systems. The implemented staggered method is a fixed time step sampling, where both codes will exchange data (positions, forces …). Both codes manage their own time step and can compute several instants between two sampling times without updating exchanged data. This weak coupling is usually stable thanks to the small sampling times imposed by the control loops, which imposes passing times to the Mecano solver.
A strong coupling between the mechatronic model of the machine tool and the machining simulation tool is implemented. Practically, a specific cutting force element, called TOOL element, has been developed. It considers the dynamics of the tooltip combined with the tool-workpiece engagement (TWE) determined from Mod-uleWorks toolpath generation and simulation libraries. The resulting relative motion of the tool with respect to the workpiece (TP) is used as input to generate cutting forces (CF). These are applied on the machine model at the spindle tip and generate some excitation to the model. To fulfil equilibrium at each step of the time integration process a Newton-Raphson iterative scheme is used, where cutting forces are updated, and the associated iteration matrix is generated at each iteration. As explained in Sect. 2.1 of this book, the computation of cutting forces is done in a single module that can be called in three different ways. Before starting the time integration (or when the tool is replaced/changed for the considered spindle), the module is initialized. Once the process starts, the TWE is computed for each current individual cut, and the machining module is updated. Finally, the module is called every time that force evaluation is required. Cut definition is obtained from the tool Fig. 11.4 Coupling scheme for the integrated simulation model computed kinematics projected in the workpiece reference frame. According to a user-defined cut length, TWE is updated as soon as (T c time) the tool as moved of this characteristic length since previous update. For accurate TWE computation, the cut length should be chosen significantly bigger than the spatial discretization used in ModuleWorks software. As TWE computation changes the workpiece geometry when a cut is performed, the corresponding DLL can only be called once during the considered cut. The flow chart of Fig. 11.5 has been implemented to combine this constraint with the need of having a strong coupling between the machine model and the cutting forces.

Simple Machining Process with the High-Speed Box-in-Box Machine
The model of an Urane 25V3 machine from Comau is used to demonstrate that the VMT concept allows simulating a machining process, considering the virtual machine tool in its real conditions, accounting for all interactions between mechanical, control and machining [5,6]. Thanks to the dedicated TOOL element, the interaction between the tool and the workpiece (rigidly attached to the machine plate-see Fig. 11.6) is defined. The simulated machining process is the following: • Move z-axis forward to have a cutting depth of 4 mm.
• Move y-axis up to simulate one cutting pass (milling with an end-milling cutter) as shown in the zoom of Fig. 11.6. The nominal tool y-velocity is 1.9 m/min. • Tool spinning velocity is 12,250 rpm.
• Technological parameters correspond to two cutters end-milling tool that machines an aluminium holed workpiece.
Some simulation results are shown below. Figure 11.7 shows forces generated by the linear motors to realize the manufacturing process. It can be noticed that these forces are mainly caused by both machining and inertia forces. Figure 11.8 shows the position of the tooltip along the three-axes of the machine with three different scales corresponding to the min-max range of each measure, the magnitude of X-axis vibration is no more than a few microns, while Y -axis magnitude is 110 mm.   To highlight the influence of the cutting forces on the machine dynamics, Fig. 11.9 shows the positioning error along the moving axis, if they are considered (red curve) or not (blue curve) in the model. Figure 11.10 shows the same kind of comparison for the tool velocity along Y -axis, vibrations induced by the machining forces are observed.
Finally, some sensitivity analyses highlighted the influence of the manufacturing conditions on the cutting forces. Figure 11.11 compares the cutting force along the move direction in 3 different cases: nominal (red), faster move (v 3.8 m min −1 -blue) and deeper cut (7 mm-green). Shown results are average force computed as post-processing results from the TOOL element.

Machining Process with Tool Change on a Multi-spindle Machine
The Gepro 502 machine, another use case of Twin-Control project, is now considered to present another simple machining process. It also considers all interactions between mechanical, control and machining models. Thanks to the dedicated TOOL element, the interaction between the tool and the workpiece (attached to the table-see Fig. 11.12) is defined. In this simulation, tool changes and multiple spindles are considered. The simulated machining process is the following: • Spindle 1 (right) is equipped by an end-milling tool (Diameter 10 mm-three cutters-corner radius 2 mm). • Spindle 2 (centre) is equipped by an end-milling tool (Diameter 12 mm-two cutters-corner radius 6 mm). • Z-axis is moved down to have a 4 mm cutting depth. • X-axis is moved forward to simulate a first cutting pass. The nominal tool x-velocity is 3 m min −1 . • Set spindle speed to 12,250 rpm.
• Once first pass is done, tools get out of the workpiece, and the machine gets back to its initial configuration. Tools are exchanged between both spindles, machine is shifted in the Y -direction and the operation is repeated.
During the simulation, the CAD representation of the workpiece is updated at each evaluation of the TWE. At the end of the simulation, this STL file is made available to the user for evaluation of the final workpiece geometry, including the effects of errors in the tool motion. The final workpiece configuration is shown on the machine CAD model, the effect of the tool change (zoomed area) is clearly observed.

Industrial Machining Process
In this chapter, the Gepro's five-axes machine is considered. It is used to manufacture an aluminium workpiece defined as Twin-Control target project application, which includes all type of machining operations done with this machine [7,8]. Figure 11.13 shows how the workpiece is positioned on the machine to realize the central machining operation. The final geometry is shown in the bottom left of figure. This three-axes machining operation is realized by the central spindle of the machine, using a 3 cutters end-milling tool rotating at 15,000 rpm. Figure 11.14 shows the machined workpiece. This CAD representation (STL format) is an output of the simulation. It is made available to the user for evaluation of the final workpiece geometry, including the effects of errors in the tool motion. On the zoomed area, one can clearly see the footprint of the tool, and the upper left part of the figure shows the executed tool trajectory. Figure 11.15 shows the evolution of the cutting forces at the tool level (upper graph) during the machining process, and the associated spindle torque (lower graph). Figure 11.16 shows tooltip position, where successive zooms highlight mechanical vibration at both structural natural frequencies of the structure and cutting frequency.

Conclusions
The VMT concept is used for virtual prototyping of machine tools in working conditions. The proposed technology has been applied to build mechatronic flexible multibody models of several machines. This virtual machine tool is fully coupled to a cutting force module. This approach provides comprehensive simulations capabilities for virtual machine tool prototyping in machining conditions. The resulting Twin-Control simulation package is intended for both machine tool builders for design activities and machine tool users to improve their processes. In both cases, this virtual model can be used to avoid performing many costly physical tests.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.