Machine Tool: From the Digital Twin to the Cyber-Physical Systems

Information and communication technology (ICT) applications are increasingly being applied in industry. Indeed, in the last years, initiatives like Industry 4.0, Factories of the Future and Industrial Internet of things, pushed by governments and industrial leaders, refer to ICT as the future of manufacturing. To meet this trend, machine tool industry needs to include all these advances. This chapter provides a state of the art of ICT applied in machine tool industry and serves as a reference of all the developments of twin-control project.

high-skill industry. European machine tool builders, part manufacturers and other agents must work together to increase the competitiveness of European manufacturing industry.
To fulfil this objective, machine tool industry needs to meet current trends in manufacturing industry, linked to initiatives like Industry 4.0 and englobing ICT advances such as cyber-physical systems (CPS) [1], Internet of things (IoT) [2] and cloud computing [3]. In this line, Liu and Xu [4] propose a new generation of machine tools, cyber-physical machine tools that, apart from the CNC machine tool, englobes data acquisition devices, smart human-machine interfaces and a cyber twin of the machine tool.
This cyber twin, better known as digital twin, is a digitalization of the machine tool. Some partial versions of this virtual representation of the machine are currently well known by machine tool builders, like computer-aided design (CAD), computeraided manufacturing (CAM) and finite element modelling (FEM). These tools are very useful to optimize machine tool designs and reduce design and mechanical setup stages. However, most available software packages deal with isolated features of the machine tools and/or manufacturing processes, and a lack of integration of the different key features exists [5]. In the last years, a new application of the digital twin has been spreading, called "virtual commissioning" [6,7]. In this case, a virtual representation of the machine is used to design, program and validate the controller.
Another key principle of Industry 4.0 is to increase the knowledge of the process obtained through monitoring [8]. This knowledge can be applied, for example, for process control [9], maintenance actions optimization [10] and even to create digital twins. The combination of models and process monitoring will be useful not only in the development and design stages, but mainly during the production stage to check that production is running smoothly, detect wear and tear without needing to halt production or predict component failure and other disruptions.
Combining these new features, the overall equipment efficiency (OEE) [11] can be increased by affecting the different stages of the life cycle of the machine and process ( Fig. 1.1): (1) accelerating the ramp-up process with a time reduction of the machine and/or process set-up; (2) optimized productivity, for example predicting and avoiding quality problems; (3) unavailability reduction thanks to the faster new process set-up and a proactive maintenance strategy, driven by root cause analysis and "predict and prevent" policies; (4) increase the production system life-time base on the reuse and refurbishment of machines and components.
This first chapter of the book presents the current state of the art regarding ICTrelated technologies applied in machine tool industry. After this introduction, the concept of machine tool digital twin and its application in different stages of machine tool and process design and set-up is presented. Next, the monitoring and management of data, from local monitoring to cloud-based fleet level data management, is reviewed. In the following section, the concept of cyber-physical system for Machine Tools is defined, and some examples used to improve the adaptability and productivity of machine tools are presented. Finally, the conclusions and the future steps are presented.

Machine Tool Digital Twin
Simulation tools are currently a key complement to European machine tool industry expertise to increase competitiveness. In fact, according to Industry 4.0 [3], modelling plays a key role in managing the increasing complexity of technological systems. A holistic engineering approach is required that spans different technical disciplines and providing an end-to-end engineering across the entire value chain. In addition, more and more important life cycle concepts like energy consumption and component end-life and degradation are not always present in machine tool builders and part manufacturer's calculations.
The digital twin concept covers this holistic approach for machine tool and machining process modelling. Apart from that the digital twin provides the possibility to interact with the real representation of the machine [12]. The possibility to combine the real data with the simulation models provides a new range of applications with clear benefits: -Digital twins can be evaluated with real data by feeding monitored inputs as in the real representation of the machine. This way, models can be tuned to improve their performance [13]. -Simulation models can be used for the so-called virtual commissioning [7,14] which consists in the usage of the digital twin of a physical system to set-up the controller even before the physical system is ready for that. Inputs and outputs of the controller are connected to the digital twin as they would be connected to the real twin. This feature allows the reduction of the overall production stage of a product. -Digital twins can be also used to improve health monitoring capacities. Simulation models can be used to determine nominal conditions of the studied systems and, hence, improve the detection of anomalous performance [15].
-Models can be used to be integrated in controller systems and optimize their performance [16].
Next, an overview of different types of digital twin for machine tool and machining process is presented. As mentioned, there is a lack of simulation environments that provide integrated features [5] and, hence, independent functionalities are presented.

Virtual Machining
The state of the art in virtual machining is presented in a recent keynote paper by Altintas [17]. It summarizes the research outputs on prediction of cutting forces, torque, power, stability and vibrations. Although there are many important results in this paper, there is not one system that can integrate all the solutions proposed. For example, for milling and turning processes, surface roughness, dynamic tool position and inclusion of the spindle dynamics nonlinearities in predictions are not available in existing tool path simulation capabilities.
For surface roughness prediction, Biermann [18] and Breitensprecher [19] presented surface texture predictions using time domain models which correlate well with experimental measurements for specific processes. Altintas et al. [17] highlighted the importance of tool/workpiece engagement evaluation along the tool path. This can be done by using various approaches (voxel, dexel, CSG, B-rep geometries, etc.).
The accuracy of virtual machining is directly related to the identification of the engagement conditions. However, there must be a trade-off between accuracy of engagement predictions and simulation times that is acceptable by the industry. Further research is needed to improve both the accuracy and computational efficiency of tool/workpiece engagement conditions.
There are two types of tool path simulation software available in the market for machining. Geometry-based simulation tools (Volumill [20] and Vericut Optipath [21]) can only calculate material removal rate and uncut chip thickness variation along a given tool path, but they cannot simulate process mechanics and dynamics, and hence, they cannot predict problems such as tool breakages due to high cutting forces, form errors and vibrations. The second type includes process physics into the simulations. Vericut provides the so-called force module that includes cutting force for the tool path optimization procedure. In this line, Machpro [22] can let the user about stability issues in addition to simulation of cutting forces, allowing an optimization of the machining process. However, no software can predict the surface roughness and thermal errors.
For simulation of effect of certain process parameters, there are analytical and FEA analysis-based simulation software available on the market. Cutpro [23] software runs analytical model for calculation of cutting forces and stability for a given set of parameters. Deform [24] and Advantedge [25] are FEA packages for simulation of cutting forces and temperatures in machining. These software packages cannot be used in simulation of the complete tool path for a given part.
Depending on the spindle used in the machine tool, nonlinear behaviour of the spindle may lead to inaccuracies in stability predictions. For example, Ozturk et al. [26] demonstrated the effect of including the effect variable preload in stability of a milling operation. Hence, such potential effects need to be included in stability predictions for improved accuracy.

Virtual Machine Tool
In 2005, Altintas summarized the research performed on virtual machine tool technology [27]. Main developments in the field consist of machine tool structure kinematic (rigid body) [28] and dynamic (FEM) [29] analysis. For geometric error modelling, data-driven models have been used [30]. The different software packages available to analyse machine tool or machining performance are focused in a single feature.
Commercial simulation packages used for machine tool structural analysis can be classified into two categories. Rigid-body simulation software (MSC ADAMS For the coupling of structural dynamics and control loops, there are two main approaches ( Fig. 1.2): replacing models, where simplified structure models are included in the control loop simulation [36]; and co-simulation, where two simulation environments are coupled via interfaces [37].
Nowadays, both rigid-body tools and FEA packages are combined to simulate complex mechatronic systems like machine tools. As those codes are usually well interfaced to block simulation tools as MATLAB Simulink [38], Dymola [39] or Simcenter Amesim [40] mechatronic models of machine tools can be achieved. The weak point of such approach is that it does not allow accounting properly for distributed flexibility in the couplings. The alternative is to use FEA solvers that have implemented joint capabilities as ANSYS, ABAQUS or SAMCEF Mecano. However, many FEA packages have only weak capabilities to integrate digital blocks to simulate control loops. During the two last decades, SAMCEF Mecano [41] has been successfully used to model flexible multi-body systems with detailed local nonlinear FE models of critical components for many applications in space, aeronautic and automotive domains. In addition, SAMCEF Mecano is well positioned as it can be interfaced with codes like MATLAB Simulink and Imagine Lab. There is no commercial package in which machining process is integrated with machine tool structure. Abdul-Kadir et al. [5] presented an extensive state of the art about virtual manufacturing. They group the different virtual models in two main groups:  [27] virtual machine tool and virtual machining. They also call virtual manufacturing to the combination of the previous and more. They concluded that there are lots of tools analysing different aspects of machine tools and machining, but they felt a lack of integration, "The developed tools are still not capable of supporting an inclusive simulation package".
According to process integration in virtual machine tool, most NC tool path and machining simulation systems consider only the rigid-body kinematics of the machine tool. Altintas et al. [27] proposed a possible architecture for the coupled simulation of cutting process ( Fig. 1.3). Brecher and Witt [41] presented an approach to simulate a machining process, including interactions between a machine tool and a cutting process. They argued in favour of better quality predictions relating to process forces and stability boundaries. Bartelt et al. [42] developed a new software architecture to synchronize concurrent simulations performed in different environments. Though it is a flexible approach, it is not the most efficient with respect to calculation time and industrial application.
In the last years, so-called virtual machine tool packages have appeared that offer similar solutions based on the interpretation of G-code to check machine tool movements according to the programmed tool path and kinematics with the purposes Fig. 1.3 Environment for the coupled simulation of machine tool and process [27] of training and process checking, including collision avoidance [43,44]. However, none of these packages deals with aspects like dynamics, machining processes or life cycle estimation.

Energy Consumption
Even though simple energy optimization measures of machines tool are usually profitable within a time period of two years [45], energy efficiency in investment decisions usually attracts minor interest due to a multitude of reasons. In the car manufacturing industry, some companies (BMW, Daimler) included energy efficiency criteria in the machine tool specification sheet during machine acquisition but, based on a deducted expert consultation, not often are rechecked after the machine is set up at the car manufacturers' site. Simulation tools can help to evaluate energy efficiency measures on machine tools, but no industrial software solutions do exist for doing it so far.
Dietmair [46] developed an empirical model to predict the energy consumption of machine tools. Every machine component is linked to a certain electric power demand corresponding to the actual machine mode. By providing a temporal sequence of machine modes, the energy demand of each component, as well as the entire machine, can be evaluated. Based on the research of Dietmair [46], Bittencourt [47] enlarges the existing model by connecting trajectories between different machine modes to a certain power and time demand. Both models' common point is that dynamic effects are neglected. Each machine mode is associated to a single power demand. Using empirical data gained from datasheet information in combination with mathematical models, Eisele [48] developed a simulation library within the simulation environment MATLAB Simulink/SimScape ® . The library enables the user to build machine tool models for estimating the energy demand using the actual NC program as input. In addition, Heinemann et al. [49] included a basic cutting force model based on Kienzle [50] to calculate torque and forces on the spindle and feed drives. Following a similar approach, Schrems [51] developed a dynamic simulation approach to assess the energy demand of process chains within the widely used spreadsheet application Microsoft Excel ® . Within the research project ECOMATION, simulation models are developed to calculate the electric power demand of machine tools on component level. The focus lies especially on real-time capable models for monitoring application. Besides electric energy, no further energy is regarded [52]. Within the research project "ESTOMAD-Energy Software Tools for Sustainable Machine Design" funded under European Union Seventh Framework Programme (FP7/2007-2013) software tool was developed using the commercial simulation software AMESim to model, simulate and analyse the energy flow in machines [53]. Numerous methods and tools can be used to predict the end of life of machine tool components [54]. These methods can be classified into two principal approaches: model-based prognostics (also called physics of failure prognostics) and data-driven prognostics. Model-based prognostics [55] deals with the prediction of the end of life of critical physical components by using mathematical or physical models of the degradation phenomenon (crack by fatigue, wear, corrosion, etc. ing of the monitored system [56]. However, this approach supposes a very complex modelling activity, and it can be difficult, if not impossible, to catch the system's behaviour. Component users do not trust in this approach to estimate component end life. The data-driven prognostics [55] is currently receiving extensive research and aims at transforming the data provided by the sensors into relevant models (which can be parametric or nonparametric) of the degradation's behaviour. Since they are based on real monitored data, current component degradation condition can be estimated. In practice, however, it is not easy to apply data-driven techniques due to the lack of efficient procedures to obtain training data and specific knowledge [56]. (2) the platform (normally cloud-based) where the data will be managed; (3) the network through which the information will be collected and transferred between the previous systems.

Local Monitoring and Data Management
Machine tool and process monitoring systems in general must deal with the two fields of data acquisition and data processing. The selection of the sensors for data acquisition is dependent on the type of machine tool, mounting options, process influences, signal amplitudes and process disturbances. They can be classified into three types: -Internal sensors: they are already available in the machine tool. The data of the internal sensors, like axis position or motor consumption, is normally retrieved via a field-bus like PROFIBUS from the machine control (PLC and/or CNC). CNC manufacturers are providing more and more tools to share this internal data with third-party applications [57]. This approach is fast to install and fail-safe, but they cannot be used in every field of application [58,59]. -External sensors: they are used to obtain further information of the process and high-frequency information. Typical examples are accelerometers (for process control [60] and condition monitoring [61]) and force sensors embedded in tool holders [62]. Transferring all the high-frequency data generated by these sensors would be a non-sense, so local processing is performed to generate indicators. The drawback of this approach is that additional hardware (sensor and processing hardware) must still be installed. -Virtual sensors: it consists in an indirect measurement of some feature. For example, tool wear is a very difficult feature to be measured in process. To solve this problem, spindle power consumption is used to qualitatively estimate the tool wear [63,64].
There exists a wide variety of monitoring hardware to collect this data. This hardware provides high connectivity features (Ethernet, CANOpen, Profibus, etc.) and, in some cases, the integration of some intelligence in the system and even the feedback to the machine controller.
Kaever [65] classified the state of the art of local process monitoring strategies into two categories. The strategies of the first category rely on a teach-in phase in which tolerances or characteristic values for the individual process are determined. The strategies of the second category do not have the possibility to access to teachin data which is the case of single-piece production. Current research trends in the context of process monitoring focus on the integration of machine positions into the monitoring or even to use process simulation approaches. In [66], Klocke, Kratz and Veselovac presented a position-oriented monitoring by utilising all position encoder signals from a 5-axis milling machine for an in-depth analysis of a freeform milling operation. In [59], Yohannes presented a monitoring strategy based on a material removal simulation. By integrating a simulation into the monitoring, the teach-in phase can be eliminated.

Network
About the data collection and communication, there are two relevant issues to be considered, the communication protocol and security aspects.
OPC UA is a machine to machine communication protocol developed by the OPC Foundation. It has been standardized by the International Electrotechnical Commission as the IEC 62541 standard [67]. Its goal is to allow communicating with machines from different vendors without having to buy specific hardware or software. Contrarily to its ancestor OPC DA, it is based on standard Internet protocols and is not tied to a specific platform or operating system. Therefore, it is well suited for complex network infrastructure and can be easily processed by firewalls.
Several services are defined in the specification. The main service is data access that describes data flow of values such as sensor signals. There are also services transmitting alarms, history data, aggregates or programs. All these services are using a structured information model that can be expanded to describe complex data.
Transport can be made using binary streams or HTTP requests. Security uses standard TLS protocol, using public key infrastructure (PKI) with certificates, for signature and encryption and authentication.
There are several implementations of OPC UA. The OPC Foundation provides a C# full implementation and a C++ stack. Several vendors provide other languages implementation and embedded software. Currently, most CNC/PLC manufacturers provide data access through OPC as standard or complimentary functionality.
MTConnect is a manufacturing technical standard to retrieve process information from numerically controlled machine tools. The MTConnect standard offers a semantic vocabulary for manufacturing equipment to provide structured, contextualized data with no proprietary format [68]. In contrast, MTConnect requires someone to develop the MTConnect adapter, which is the software that collects the data from the machine and formats it for the MTConnect agent. Recently, in order to compete to the MTConnect standard, the OPC Foundation, in collaboration with the German Association of Machine Tool builders, is working in an OPC UA Information Model for CNC Systems [69].
Cyber security is an important part of a modern IT architecture design. Several rules can strengthen the resistance to cyber-attacks. Firstly, the principle of least privilege that describes that every part of an architecture must only be able to access resources needed for legitimate purpose. Secondly, defence in-depth principle builds several layers against attacks, so an attack compromising one layer would not compromise the others. Finally, intrusion detection systems and audit trails can detect intrusion attempts and warn administrators.
One of the most important aspects in cyber-security is encryption. By using secure protocols, full disc encryption and public key infrastructure (PKI), data encryption can be used on the whole data life cycle. Moreover, modern microprocessors have built-in hardware encryption and the performance penalty of using encrypted data is negligible even for hardware embedded inside machine tools.

Data Analytics
Big data is defined as data where one or more of the following characteristics are high: volume, velocity, variety. Machine tool industry encounters big data in the following sense: firstly, machine tools produce data of high rate such as axes movements that must be acquired with millisecond precision. Secondly, machine tools related data has a variety of types, such as time series, spectral data, production data, and quality control data. Finally, data volume generated by a machine tool has a considerable daily volume. Each machine can generate several gigabytes of data per day.
Traditional software is not designed to handle this massive amount of data. New technologies based on distributed computing are now developed, such as NoSQL databases. These solutions use horizontal scalability: extending storage and computation capabilities by adding new nodes to the system, based on commodity hardware. With algorithms such as MapReduce, a computing problem can be split across several machines running in parallel, and then aggregated in a single result.
In addition to big data technology, virtualization (running several environments on a physical machine), containerization (a lightweight version of virtualization for stateless computing jobs) and software-defined networking (changing network configuration without using dedicated appliances) allow rapid deployment of solutions without dedicated hardware management. These technologies serve as the basis for cloud-oriented architecture.
Cloud offerings ranges from infrastructure as a service, to software as a service. Infrastructure as a service (IaaS) provides vendor-managed networking, storage and servers. Platform as a service (PaaS) adds API, middleware and managed services. Software as a service (SaaS) is a completely managed environment.
The combination of cloud-based environments and big data software enables the development of new kind of monitoring algorithms targeting fleets of machine tools. A fleet can be viewed as a population consisting of a finite set of units (individuals). Fleet's units must share some characteristics that enable to group them together according to a specific purpose. By considering domain-specific attributes, fleet-wide approach of data management allows to analyse data and information through comparison according to different point of view of heterogeneous units (e.g. compare condition index of similar equipment in the different location, compare different system health trend for the same operation). Fleet-wide approach provides a consistent framework that enables coupling data and models to support diagnosis, prognostics and expertise through a global and structured view of the system and enhances understanding of abnormal situations. Fleet-management raises issues such as how to process large amount of heterogeneous monitored data (i.e. interpretable health indicator assessment), how to facilitate diagnostics and prognostics of heterogeneous fleet of equipment (i.e. several technologies and usage) or how to provide key users with an efficient support to decision-making throughout the whole asset life cycle. Towards this end, a complete guide (model, method and tool) is needed to support such processes (i.e. monitoring, diagnostics, prognostics) at the scale of the fleet.
Fleet-wide diagnosis, prognostic and knowledge management has gained significant interest across different industries and is at different maturity level depending on the industry. Sensory data is becoming more and more accessible from supervisory control and/or low-cost embedded acquisition system that drives the need of more advanced, structured data management strategy [70]. As a result, several fleetmanagement systems have been developed in military, energy and mining sectors. In most of those systems, the fleet concept mainly addresses only centralized and remote access to "n" system (individually). Even if a large amount of data can be managed, they are lacking enough structuring in order to benefit from the knowledge arising from the fleet dimension. Moreover, the data processing in such system is rather limited where aggregated synthesis and comparison of "n" systems is not addressed.
From the previous industrial statement, further research is actively conducted to overcome these limitations. In machine tool domain, one can refer to [71] where the fleet dimension aims at providing indicators on the state of a machine or of a fleet (of machines or components). Moreover, data can be stored and comparisons about the evolution of indicators along the time could be also performed. In addition, some recent research intends to work on knowledge formalization in order to better manage heterogeneous data and information in order to take into account system and process, technical and operational specificities and working conditions [72,73].
The knowledge of machines fleet state is a high value-added information for both maintenance and production managers to optimize their planning activities by considering real machine's health estimation.
From maintenance point of view, intervention dates can be adjusted and anticipated according to the evolution of machine's health and so machine production stops to perform the preventive actions only when it is necessary. Control of the risks failures allows a better management of the spare part stock, the reduction of the number of available spare parts while supplying the right parts at the right time.
From production point of view, there is almost no more unexpected production stop and machine's availability is increased. Part production repartition over machines can be adjusted according to part quality specifications and machine's health.

Cyber-Physical Systems in Machine Tools
Cyber-physical system (CPS) is a term supported by important initiatives, like industry 4.0 [3], that is gaining relevance in the manufacturing community. Although several interpretations of CPSs exist, they can be defined as physical and engineered systems whose operations are monitored, coordinated, controlled and integrated by a computing and communication core [1]. Cyber-physical systems are considered as one of the main enablers for flexibility and productivity in manufacturing processes in the future [74].  [75] Berger et al. [75] presented an overview about the application of CPSs in machine tools. In this work, CPSs are observed as smart device that interacts with the machine (through sensors and actuators) to increase its performance. Berger et al. present examples like an intelligent chuck for a turning machine that controls and regulates the clamping force based on sensor data [76] and an intelligent milling tool with integrated chatter compensation and adaptive control system ( Fig. 1.5).
EU-funded MC-Suite project presents relevant developments in the field of CPS application in Machine Tools. Mancisidor et al. [77] present an active damper system to suppress chatter effects during machining. In addition, Beudaert et al. [78] developed a chip breaking system to control chip length and, hence, make the automation of the processes possible.
Another example of the application of CPSs in machine tools is the intelligent fixtures. Möhring et al. [79] present an overview of the work done in this field within the EU project INTEFIX. Fixtures provided by sensors and actuators that were able to adapt to the workpieces and process have been developed in this project. For example, Gonzalo et al. [80] presented an intelligent fixture for turning low pressure turbine castings. This fixture was provided with special actuators which apply forces in specific areas of the workpiece to modify its dynamic behaviour to reduce vibrations.
The CNC of the machine can also be regarded as a CPS. It has a powerful processing power and the possibility to use actuators and sensors of the machine. In this line, new CNC models present a wide variety of compensation tools (thermal [81] and geometric [82]). There are many researchers following this approach. Indeed, Liu and Xu [4] present the expression cyber-physical machine tool (CPMT). For the authors the CPMT is the integration of machine tool, machining processes, computation and networking, where embedded computers and networks can monitor and Fig. 1.6 Cyber-physical machine tool concept as defined by Liu and Xu [4] control the machining processes, with feedback loops in which machining processes can affect computations and vice versa ( Fig. 1.6).

Conclusions
This chapter presents an overview of the possibilities that ICT provide to increase the performance of machine tools. This overview covers features like digital twins of machine tools, monitoring and data management and the concept of CPS to improve machine's performance. Some of these technologies are currently applied, and others need further development to be used in industrial environment. Indeed, currently, the main problem of this technology is that it is applied in controlled environment, for research purposes. Further efforts are needed to take all this technology to the industry.
One of the main objectives of twin control project is to develop this type of technologies for machine tools and make them a scalable, easy to apply and use in an industrial environment. To do that different activities have been carried out by developing a state-of-the-art digital twin for machine tools; that integrates most relevant features to simulate machining processes; a CPS based on a monitoring device that includes simulation models to optimize process control and a machine tool specific fleet knowledge system.
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.