CPS Modeling of CNC Machine Tool Work Processes Using an Instruction-Domain Based Approach

Building cyber-physical system (CPS) models of machine tools is a key technology for intelligent manufacturing. The massive electronic data from a computer numerical control (CNC) system during the work processes of a CNC machine tool is the main source of the big data on which a CPS model is established. In this work-process model, a method based on instruction domain is applied to analyze the electronic big data, and a quantitative description of the numerical control (NC) processes is built according to the G code of the processes. Utilizing the instruction domain, a work-process CPS model is established on the basis of the accurate, real-time mapping of the manufacturing tasks, resources, and status of the CNC machine tool. Using such models, case studies are conducted on intelligent-machining applications, such as the optimization of NC processing parameters and the health assurance of CNC machine tools.


Introduction
Intelligent manufacturing is a core technology of the new industrial revolution that includes the digitization, networking, and intelligentization of the manufacturing industry."Made in China 2025," "German Industry 4.0," and the Industrial Internet in the US all focus on intelligent manufacturing and a deeper integration of information and manufacturing technologies in order to advance the next industrial revolution.Although the strategic priorities are different for each country, the core technologies converge at cyber-physical system (CPS) [1].
CPSs are the foundation for the realization of intelligent manufacturing systems that integrate computing, communication, and control, on the basis of sensor technology.The system architecture is usually composed of the equipment layer, sensing layer, network layer, cognitive layer, and control layer.After sensing, collecting, transmitting, storing, mining, and analyzing the information about the machine in physical space (PS), a digitalized machine (i-Machine) mirroring the physical machine is set up in cyber space (CS) and referred to as the digital model of the physical machine on the CPS cognitive layer (or the "CPS model of the machine," in short).
The key of intelligent manufacturing is to set up CPS models of the machines on the cognitive layer.Using these models, people can estimate the work performances of a machine for pre-determined tasks, establish an integrated environment combining information, machines, and humans, and determine an intelligent-control strategy; realize coordination, interaction, and dynamic control; and finally, achieve intelligent manufacturing.
Computer numerical control (CNC) machine tools are the most fundamental and important manufacturing equipments and the most important physical resource for manufacturing enterprises.In order to realize intelligent manufacturing, it is important to establish CPS models of CNC machine tools.Given that a CNC machine tool is a complex dynamic system that consists of machine tool, cutting tool, fixture, workpieces, and work tasks, creating a CPS model of a CNC machine tool is a tremendous challenge.
Several recent studies focused on CPS modeling methods based on mathematical and physical computation, centered on the forward theoretical modeling method.Jensen et al. [2] proposed ten steps for establishing a CPS based on a physical model and systematically described and evaluated the CPS that was established in this way.Derler et al. [3] analyzed the intrinsic heterogeneity, concurrency, and sensitivity to timing of CPS model, and proposed to build a CPS model by means of hybrid system modeling, concurrent and heterogeneous model of computation, domain-specific ontology, and the joint modeling of functionality and implementation architecture.Wu and Chen [4] established a multi-domain physical system simulation and optimization platform utilizing the multi-domain modeling language Modelica in order to realize the expression, modeling, computation, and optimization

Research
tion and data should be collected, stored, and mined in CS.Machine operators also accumulate considerable experience and technical knowledge, which should also be saved and utilized in CS.With the integration of big data with the theoretic model, the completeness and accuracy of the CPS modeling of CNC machine tools can be improved.Consequently, a dynamic and evolving CNC machine tool CPS model can be established that uses mainly the big data stored in the CS in the whole life cycle of CNC machine tool, combining with the theoretical model.
(2) It is necessary to build a CPS model of a CNC machine tool work process using mainly the electronic data generated inside a CNC system.A CNC system is composed of the numerical control (NC) device, servo drive, servo motor, etc., which is an important control unit for a CNC machine tool.For a CPS model of a CNC machine tool, the CNC system is not only an important physical resource in PS, but also an important information resource in CS.During the work processes of a CNC machine tool, a great deal of electronic data consisting of control and feedback signals is generated inside the CNC system.This data describes the tasks (or working conditions) and operation status of the machine tool in a time-specific, quantitative, and accurate manner, and has the features of non-structural and multi-dimensional.The acquisition of electronic data can be realized through many approaches, including adding an external sensor to the machine tool and direct acquisition from the inside of a CNC system.Compared to acquisition from the external sensors, the direct acquisition of electronic data from a CNC system is more direct, complete, and reliable.In the future, CNC systems will serve as the main source of the big data necessary for the CPS modeling of CNC machine tools.
(3) It is necessary to fully collect and utilize the information and data on the work tasks performed by CNC machine tools.A CNC machine tool executes the G code of the machining procedures input by the operator controlling the CNC system.Most studies collected the operation status data, such as spindle current and spindle vibration, and analyzed it in the time and frequency domains, attempting to establish a CPS model for the work process of a CNC machine tool.However, in actual machining processes, the shapes and materials of the workpieces, machining strategies, cutting tools, fixtures, and technologies often vary; thus, the operation status data that is collected based on the time domain cannot quantitatively and precisely describe the complicated machining tasks.As a result, it is impossible to establish the relationship between the work task data and the operation status data, resulting in an incomplete and uncertain CPS model with little practicability.For example, spindle current may increase when the machine tool conducts heavy-load cutting; however, it also may increase when the spindle fails.If the specific task being executed by the machine tool is not comprehended, it is impossible to determine whether or not the operation status of the spindle is normal, based only on the increase of spindle current.
To address the most important stage in the whole life cycle of a CNC machine tool, machining, this paper proposes a modeling method for a CPS model of the work processes of a CNC machine tool based on the analysis of electronic data in the instruction domain.The electronic data generated from an open CNC system is considered to be the main source of big data in this CPS model.The data collection covers work tasks, manufacturing resources, and the operation status of the CNC machine tool.The relationship between the work tasks, manufacturing resources, and operation status data is completely described by analyzing the electronic data in the instruction domain.A CPS model of the work processes of a CNC machine tool is then established in order to realize intelligent applications, such as the optimization of NC processing parameters and the health assurance of the machine tool and its components.
Section 2 of this paper provides a detailed introduction to this CPS model of the work processes of a CNC machine tool and describes the connotations of the instruction domain.Sections 3 and 4 cover the applications of this instruction-domain CPS model in the optimization of process parameters, the quality diagnosis of the feed axis assembly of machine tools, and health assurance technology.Section 5 presents the conclusions of this paper.

Analysis of electronic data in the instruction domain and a CPS model of a CNC machine tool work process
This section will start with the definition of a CPS model for the work process of a CNC machine tool.The concept of instruction domain, work task, manufacturing resource, and operation status, and the method for collecting operation status data are introduced separately.Then the CPS modeling method of a CNC machine tool work process based on the analysis of electronic data in the instruction domain is proposed.Finally, it ends up with an overview of the intelligent applications of the CPS modeling method.

Definition of a CPS model of a CNC machine tool work process
The manufacturing resources (referred to as MR) of a CNC machine tool are the parts of the physical system which is required in order to perform machining tasks.Manufacturing resources include the equipment and materials, such as machine tool, cutting tool, fixture, and workpieces, as well as the environmental factors of the machining, such as temperature and vibration.The work task (referred to as WT) of a CNC machine tool refers to the work to be done by the machine.
A CNC machine tool performs a specific work task WT with given manufacturing resources MR.In the work process, the resulting work quality and efficiency of the CNC machine tool can be expressed by the characteristic parameters of the operation status data (referred to as Y).As a result, in the CPS model of a CNC machine tool work process, the model input consists of two parts, i.e., work task WT and manufacturing resources MR, while the output is the corresponding operation status data Y when the machine tool performs a task.
The CPS model of a CNC machine tool work process is defined as the relationship among work task WT, manufacturing resources MR, and operation status Y established in the CS corresponding to the work process in the PS.This relationship is expressed as As shown in Figure 1, the CPS is composed of the equipment layer, sensing layer, network layer, cognitive layer, and control layer; this system achieves deep integration of human, product, PS, and CS.In the CPS, the sensing layer obtains data and information from the equipment layer and transfers such data and information to the cognitive layer via the network layer.The CPS model of a CNC machine tool work process lies in the cognitive layer and is responsible for analyzing and processing the big data.It then transfers the results to the control layer in order to realize the intelligent feedback control and optimization of the equipment layer.The CPS model of a CNC machine tool work process collects data on work task WT (including the instruction line numbers in G code, instruction segment, cutting tool, spindle speed, feed speed, interpolation data, and other process parameters and control information), as well as operation status data Y (including spindle power, torque, vibration, the contour error of the feed axis, and other electronic data) with specific manufacturing resources MR (including production system data on the spindle, lead screw, guide rail, bearing, motor, and cutting tool; and external environmental data, such as ambient temperature), and establishes the function Y = f (WT, MR) in the cognitive layer of the CS so as to create a digital dynamic model (an i-Machine tool) mapping the CNC machine tool.
A CNC machine tool performs various work tasks, due to the great variety of parts to be machined.The work process of a CNC machine tool is a dynamic process driven by different work tasks.In addition, the process system is a complex system that integrates mechanical, electrical, hydraulic, and controlling functions, and the CPS model of a CNC machine tool work process is a complicated and dynamic model.Due to all this complexity, the relationship Y = f (WT, MR) cannot be expressed with a theoretical model or with mathematical formulas.
However, in today's information technology era featuring cloud computing and big data, the storage and management of massive data has become feasible.An effective approach to create a CPS model of a CNC machine tool work process is to store the characteristic variable data of work tasks, manufacturing resources, and operation statuses.With the accumulation of working experiences over the whole life cycle of the CNC machine tool, this characteristic variable data along with the relationship among them can be accumulated, enriched, and updated, resulting in the continual refinement and evolution of the CPS model of a CNC machine tool work progress.

Work task and the instruction domain
In the field of digital signal analysis, a signal domain such as a time or frequency domain provides a means of describing, observing, and analyzing signals from a specific perspective.Changes in the operation status data Y of a machine tool (e.g., current changes in a feed axis during the machining process) can be described as a time-dependent curve in the time domain: Y = f (t).That is, if the independent variable t is taken as the horizontal axis, the vertical axis displays the current in the feed axis, as shown in Figure 2.However, this curve cannot indicate what kind of task is being executed by the machine tool in the time-domain description.
to be machined, and generates an instruction set-the G-code programs-for machining control based on process requirements, machining patterns, and machining parameters.Different parts are machined by using different machining technologies, and therefore require different G-code programs.
The G-code program of the part to be machined constitutes a quantitative description of the work task of the NC machining of the part.The G-code program and the machining instructions describe the data and information of work tasks, such as shape features, sizes, and the machining processes and patterns of the parts to be machined.The line numbers for the G-code instructions indicate the execution sequence of the instructions.The sequentially arranged G-code instructions describe the motion track and machining pattern of the process system.The cutting tool follows the G-code instructions to move, and its envelope surface describes the shape features of the part, such as freeform surfaces, ditches, grooves, and bosses.G-code instructions explicitly and implicitly describe the process parameters, such as the shape and material of a cutting tool, the material of a workpiece, fixture, spindle speed, and feedrate.In the post-processing of cutter location files, the G-code instructions also implicitly describes the kinematics of a CNC machine tool and the control character of the CNC system.
It should be noted that the CNC system interprets and executes the instructions according to the sequence number i (referred to as the line number) of each instruction in the G-code program.As the content of instructions differs, the length of time for executing each instruction also differs.The execution time of an instruction assigns the time attribute to the corresponding sequence number.Therefore, according to the order and time attribute of instruction sequence i, the instruction domain can be defined as the collection of the G-code instruction sequence i and the time sequence t corresponding to the sequential execution of the instruction sequence in the CNC system.
The instruction domain includes both the execution sequence of the instruction and the corresponding time intervals.Figure 3 shows the waveform of the operation status data given in Figure 2 in the instruction domain.Although both waveforms are the same, the horizontal coordinate contains information on the instruction sequence i and the execution time t of each instruction.In a computer aided design/computer aided manufacturing (CAD/CAM) software system, the programmer carries out a machining process planning according to the shape features, sizes, and other technical requirements for the parts In the instruction domain, the instruction sequence i and the execution time t are the variables used to analyze a particular G-code program and to obtain the work task WT described by the G-code program, which is expressed as WT = g(i(t), t).The collection of G-code instructions which contains line number, instructions segment, cutting tool, spindle speed, and feedrate, as well as instruction execution time constitutes the description of the work task WT in the instruction domain.
Accordingly, the CPS model of a CNC machine tool work process Y = f (WT, MR) may be expressed in the instruction domain as follows: In the process of building a CPS model of a CNC machine tool work p ro cess, the variable WT that is used to describe the work task of a specific CNC machine tool may be extracted directly from the control data generated when the CNC system executes the G-code program.In the instruction domain, this data comprises a collection of ordered data to describe the work task WT = {x 1 , x 2 , ..., x n }, where n represents the sampling numbers of the variable WT.For example, the work task variable of the work process of a threeaxis CNC machine tool is WT = { p x , p y , p z , T, S, F, M, ...}, where ( p x , p y , p z ) identifies the position of the motion instruction, T represents the cutting tool, S represents the spindle speed, F refers to feedrate, and M stands for auxiliary instructions (e.g., the startup/shutdown of cooling liquid).In the work process of a CNC machine tool, the data of the work task variable WT changes in different sampling periods, that is, where k indicates the k-th sampling period.
By collecting the work task variables of a CNC machine tool in the instruction domain according to the G-code instructions and corresponding execution time, information about specific work tasks of the CNC machine tool may be quantitatively and exclusively described.As a result, the completeness and practicality of the CPS model of a CNC machine tool work process can be improved.

Operation status data of a CNC machine tool
The operation status data Y of a CNC machine tool is the direct or indirect quantitative description of the quality, accuracy, and efficiency of the NC machining of a part.It includes the massive electronic data, such as spindle power, spindle current, feed axis current, tracking error, and material removal rate, that is obtained through the internal feedback of the CNC system when the CNC machine tool is performing a task.It also includes the physical and geometrical data acquired by external sensors, such as cutting force, temperature, vibration, spatial (volumetric) error, thermal deformation, and surface roughness of the part.Some of the above data may be directly acquired from the CNC system (e.g., current, feedrate), and some may be indirectly calculated (e.g., power, acceleration).However, some data (e.g., temperature, vibration, and roughness) must be obtained from add-on sensors or measuring instruments.This operation status data reflects the work status of the CNC machine tool, the part quality, and the process efficiency.
During the building process of a CPS model of a CNC machine tool work process, a sensitivity analysis and feature extraction are first conducted for the electronic data variables, physical variables, and geometric variables from the operation status variables set of the CNC machine tool, Φ = {y 1 , y 2 , ..., y q }.Next, the collection of the operation status characteristic variables that are closely related to intelligent functions (e.g., machining quality and efficiency optimization), Y = {y 1 , y 2 , ..., y m }, may be determined, where m labels the characteristic variables, and m q.Sampling period is conducted with the same as the work task data in the instruction domain in order to obtain the sampled operation status characteristic variables, where k indicates the k-th sampling period.

CPS modeling based on the analysis of electronic data in the instruction domain
To ensure a comprehensive and complete data set for a CPS model of a CNC machine tool work process, the electronic data obtained should include both the work task data and the operation status data.By guaranteeing the consistency between these two kinds of data, the relationship between work task and operation status in the CPS model may be realized.
Due to the complexity of a CNC machine tool and its work processes, it is difficult to obtain a mathematical expression for the relationship between WT, MR, and Y. Therefore, this paper proposed an electronic data analysis method in instruction domain in order to synchronously collect the data on work tasks, manufacturing resources, and operation status, with the same sampling period of the instruction domain for a specific NC machining G-code execution process, as shown in Figure 4.The instruction line number i, the work task data WT k , the manufacturing resources data MR k , and the operation status data Y k are recorded at each sampling period to generate the mapping of the data.With the electronic data analysis method in the instruction domain, the coordinate system is established on a 2D plane in order to express the relationship between work task data and operation status data.In this 2D coordinate system, the G-code instruction sequence number, which contains the information on execution time, is taken as the X coordinate and the corresponding operation status data of the machine tool (e.g., current and power) is taken as the Y coordinate.Thus, the instruction-domain waveform of the CPS model of a CNC machine tool work process is generated.This method is similar to how an oscilloscope shows an electrical signal or how an electrocardiogram shows a bio-electricity signal.The method showing the waveform of the operation status data in the instruction domain is also referred as the "instructiondomain oscilloscope." Figure 5 shows a part containing three-step features on a CNC lathe machine tool.When machining this part, the instruction sequence number in the instruction domain, the corresponding rough machining G-code instruction, and other technical information constitute the machining work task WT.Data collected on the spindle current is the machining operation status data Y.The relationship between WT and Y for the process of turning this part is clearly indicated by the waveform of instruction domain, as shown in Figure 6.In Figure 6, the G-code instructions for lines 11, 13, and 15 correspond to turning the three steps of different depths.As the cutting depth sequentially decreases, the corresponding spindle motor current decreases as well.In contrast, the heavy currents of instruction lines 4 and 19 are the impulse currents when the CNC machine tool executes the spindle startup and braking instructions, respectively.

A method for collecting the operation status data of a machine tool based on the instruction domain
In a CPS model of a CNC machine tool, big data is collected in two ways.In the first method, data is indirectly acquired via add-on sensors on the CNC machine tool [11].For example, the spindle vibration is acquired via piezoelectric and strain gauge sensors.Previous studies have widely adopted this method to obtain data.The disadvantage of this method is that space must be reserved for installing the sensors on the machine tool, which increases the complexity and cost of the system.In addition, when the CNC machine tool operates in an unfavorable work environment with a complicated electromagnetic interference (EMI), the stability and reliability of the signals from the add-on sensors is poor.
In the second method, data is directly acquired from the CNC system [12,13].Massive electronic data, including control data (e.g., interpolation positions, feed speed, acceleration, spindle speed, and surface-cutting speed) and feedback data (e.g., spindle power, spindle current, feed axis current, and position contour error), is generated inside the CNC system in real time, as shown in Figure 7.These data contains a huge amount of useful information describing work tasks WT, manufacturing resources MR, and operation status Y.The internal electronic data of a CNC system is standardized, reliable, and is not affected by external interferences (e.g., pollution, cutting chips, cutting fluid, machinery, and EMI).The cost of collecting internal electronic data from CNC systems is low, and there is no disturbance to the machining process.
In previous studies on the CPS model, the method of obtaining electronic data directly from inside the CNC system was mostly ignored.The CNC system is an important physical and information resource in the PS and CS, respectively.It is very convenient to acquire data directly from a CNC system.In the work process of a CNC machine tool, massive amount of original data is generated inside the system.These data is composed of control signals and electric signals, and is detailed, real-time, quantitative, and reliable.These nonstructural and multi-dimensional original electronic data should be the main source of the big data to be acquired for the construction of a CNC machine tool CPS model, while other add-on sensors should be considered as available means of data acquisition.

Intelligent optimization of work tasks
Assuming that manufacturing resources MR remain unchanged (expressed as MR0) when the CNC machine tool is performing work task WT, that is, assuming that the process system of the machine tool is in a good and stable state, the CPS model of the CNC machine tool work process may be simplified to Y = f (WT)| MR0 .
Anomalies and the quality of the operation status data Y may be assessed based on the instruction-domain waveform, in which the instruction number and the content of a specific instruction may be found.Consequently, the process parameters contained in the instruction (e.g., feedrate F and spindle speed S) may be optimized, thus achieving intelligent optimization.Typical applications are shown as follows.
(1) Offline optimization of process parameters.In batch production, initial process parameters are set for the given work task WT.When the first part is processed, the operation status data Y (e.g., contour error and current) reflecting the processing quality is collected in the instruction domain.By using the operation status data to adjust the process parameters, optimized process parameters for processing the subsequent parts are obtained offline.For example, in cutting operations, the instruction sequential number and the instruction may be identified based on characteristic parameters, such as the spindle current and spindle vibration, contained in the operation status data Y.The intelligent optimization of machining parameters can be achieved by adjusting the feedrate F and spindle speed S in the instructions.
(2) Real-time online adjustment of process parameters.The operation status data Y (e.g., current and vibration) is collected in real time during the machining process.If an abnormality occurs in the operation status data, breaking the constraint conditions for the work task WT and operation status data Y, the process parameters should be adjusted immediately according to the constraint conditions in real time (e.g., spindle speed and feedrate) in order to keep the operation status data Y within a normal range and to realize real-time online adjustment of the process parameters.In the case of vibration during a machining process, the adjustment of spindle speed or feedrate may be adopted to realize vibration abatement.The feedrate may be adjusted in real time based on the spindle current during the machining process so as to balance the cutting force, improve machining efficiency, and realize self-adaptive machining.
(3) The creation of a self-learning cutting technology database.The cutting technology database describes the relationship between the process parameters of the machining process (e.g., the variable space made up of material of the workpiece, the material and structure of the cutting tool, cutting parameters, the state of cooling, the power and rigidity of the machine tool, and fixture) and the machining status (e.g., the state space made up of the cutting force, the wear and chip breaking of the cutting tool, cutting vibration, and surface quality).The traditional way to create a cutting technology database requires machining tests, which are workload-heavy, time consuming, and expensive.
The essence of a cutting technology database lies in the CPS model of a CNC machine tool work process.Massive amount of electronic data is continuously generated during the whole life cycle of the CNC machine tool, from which data can be extracted that reflects the correspondence between the process parameters and operation status data Y; thus establishing a selflearning cutting technology database.As machining process data continuously accumulates over the whole life cycle of a CNC machine tool, the cutting technology database is personalized and corresponds to the tool, and its use conditions continue to accumulate, expand, and evolve.The technology database may also be shared between and integrated with different pieces of CNC equipment via the Internet.The machining process parameters may be dynamically predicted, optimized, adjusted, and controlled using the data and information from the cutting technology database.

Intelligent health assurance of manufacturing resources
When a CNC machine tool is set to perform a certain work task WT0, the CPS model of the CNC machine tool work process may be simplified to Y = Anomalies and the quality of operation status data Y may be assessed based on the instruction-domain waveform.The difference in the operation status data Y of the manufacturing system implementing the same work task (WT0) in different periods indicates the change in the health condition of the CNC machine tool and the manufacturing system.Thus, intelligent health assurance can be achieved.Typical applications are shown as follows.
(1) Checking and diagnosing the work quality of manufacturing resources.The work task WT0 is set to include a diagnosis of machine health (e.g., when a feed axis moves the head at a constant speed over the entire travel distance).The operation status data Y (e.g., the current of the feed axis servo motor) that reflects the quality of the manufacturing resources MR is collected in the instruction domain.If an abnormal fluctuation of Y is detected, checking and fault diagnosis may be conducted (e.g., checking and diagnosing the assembly quality of the feed axis and any wearing or damage of the tool).
(2) Checking and diagnosing the health of manufacturing resources based on historical operation status.The key idea for the health checking and diagnosis of manufacturing resources MR is to check and assess changes in the health condition of the machine tool by analyzing and comparing the work process CPS models at different stages of the whole life cycle of machine tools.
Assuming that the CNC machine tool repeats one work task WT0 (e.g., repeatedly machining one part or one program of performance diagnosis at different stages over its whole life cycle), then theoretically, the corresponding operation status data Y collected in the instruction domain should be consistent.Inconsistency in data Y indicates that the health condition of manufacturing resources (or manufacturing system) has changed due to, for example, the prediction of tool life, the faults in functional components such as the spindle or the ball screw, or the changes in the accuracy of the machine tool.
Taking the batch NC machining of automobile parts for example, the CNC machine tool performs the work task of repeatedly machining the same part.The complex process capability index (CPK) becomes an important indicator to reflect the stability of the manufacturing system.By analyzing the electronic data in the instruction domain and comparing data against the historical operation status data Y for the machining of the same part, performance degradation and the health of the manufacturing system may be monitored so as to ensure system stability.

Optimal design and manufacturing of CNC machine tools
In essence, the big data contained in a CPS model of a CNC machine tool work process is the ultimate manifestation of the performance and function of the multi-physics system of a CNC machine tool and production system.As a result, the big data obtained during the whole life cycle of a CNC machine tool may be utilized to realize parameter identification and the optimization of the theoretical model on one hand, and to trace the source of performance shortcomings and monitor the quality and reliability of the machine tool and production system on the other hand, so as to improve and perfect the CNC machine tool design.
The electronic data analysis and the method and principle of CPS modeling based on the instruction domain described in this paper are also applicable to the CPS modeling of other digital control-based automatic equipment (e.g., robots, electric automobiles, and production lines).Third-part software that is used usually to process the data in the time and frequency domains (e.g., Watchdog Agent® [6]) can also be adopted conveniently to analysis the electronic data of the instruction domain for the health diagnoses and performance prediction of a CNC machine tool and its components.In addition, an open intelligent-manufacturing ecosystem enabled by intelligent applications (APPs) and offering extensive prospects may be created based on the CPS model of a CNC machine tool work process and the combination of an open CNC system, big data, and cloud computing.
The next part of this paper introduces the intelligent application of a CPS model of a CNC machine tool work process with two specific case studies.As research in this field progresses, the applications are expected to expand to more cases.

A case study on machining parameteroptimization technology based on instructiondomain electronic data analysis
Electronic data may be acquired during the initial NC machining of a part.By analyzing electronic data in the instruction domain, instruction sequential numbers corresponding to the abnormal operation status can be found, enabling the optimization of the instruction process parameters.In this study, two experiments are performed to optimize the process parameters in the rough machining.

Experiment I
The manufacturing resources used in this experiment include the slant bed CNC machine tool CK4055 with the Huazhong HNC-818A/T CNC system as shown in Figure 8, and the experimental conditions are shown in Table 1.As shown in Table 2, the statistical analysis is conducted to current values corresponding to the G-code instructions N11, N13, and N15 in Figure 9. Before and after optimization, the maximum spindle current is reduced from 7.1 A to 6.3 A, and the minimum spindle current is increased from 4.9 A to 6.2 A. As a result, the cutting force becomes balanced and the machining time is shortened from 14.8 s to 13.7 s, which leads to an improvement of the machining efficiency.
Experiment I explains the application of the lathing parameters optimization using the electronic data analysis method based on the instruction domain.Experiment II will show the capability of milling parameter optimization on the machining of a mobile phone shell.

Experiment II
The manufacturing resources used in this experiment include a Z-540B drilling and tapping center with the Huazhong HNC-818A CNC system as shown in Figure 11(a).The work task WT is the rough milling of a mobile phone shell as shown in Figure 11(b).The experimental conditions are given in Table 3.The tool path and the corresponding G code of the part are shown in Figure 12.
The spindle current in the cutting process is acquired as the operation status data Y.According to the actual current corresponding to each instruction before optimization, the G code is optimized by recalculating the feedrate.When the mean current of an instruction is relatively higher before optimization, the feedrate of the instruction is decreased.However, when the mean current of an instruction is relatively lower before optimization, the feedrate of the instruction is increased.The resulting instruction domain waveform is shown in Figure 13.
In Figure 13(a), the red and blue lines indicate the spindle mapping relationship between Y and WT is established with the electronic data analysis method based on instruction domain, as shown in Figure 9.The feedrate parameters corresponding to the three-step lathing are modified respectively to obtain the balance of cutting force according to the average value of the spindle current.Figure 9(a) shows the instruction-domain waveform of the spindle current before optimization.The spindle currents of the three-step shaft are inconsistency for the reason of the constant feedrate value 260 mm .min -1 as shown in the left part of Figure 10.In order to achieve the balance of spindle current for machining the three-step shaft, the feedrate values are adjusted respectively to 200 mm .min -1 , 300 mm .min -1 , and 600 mm .min -1 as shown in the right part of Figure 10.The correspondent instruction domain waveform of the spindle current after optimization is shown in Figure 9(b).

Research
Engineering Volume 1 • Issue 2 • June 2015 www.engineering.org.cncurrent before and after optimization, respectively.Compared with the red lines, the maximum value of the optimized blue lines is reduced and its minimum value is increased.Figure 13(b) is the details of the current data waveform in an enlarged scale from line 380 to line 490, and Figure 13(c) means the correspondent feedrate data.It can be seen that the feedrate (red lines) is a constant value equal to the pre-determined value F5000 before optimization and it is adjusted according to the spindle current after optimization.For example, ① a higher feedrate can increase the spindle current in machining at position and ② a lower feedrate can decrease the current in machining at position.Table 4 is a statistical analysis of machining parameters in Figure 13(a).Compared with the data before and after optimization, the maximum value, the peak-to-valley value, and the variance value of the spindle current are respectively reduced from 3.57 A, 2.49 A, and 0.0545 A to 3.23 A, 1.62 A, and 0.0494 A. The minimum value is increased from 1.08 A to 1.61 A. The optimized result shows that the effect of the balancing cutting load is significant by modified the feedrate.Although there is no obvious change in the average value, the machining time is shortened from 210 s to 162 s, and the machining efficiency is improved by 22.9%.The electronic data analysis method based on the instruction domain is adopted in both experiments above.The feedrate is optimized according to the change of the operation status data (the spindle current), so that both the load balance of cutter and the machining efficiency are significantly improved.
The optimization technology of machining process parameters based on the analysis of electronic data in the instruction domain has been described in detail in Section 2.6.The main applications of this method include the optimization of process parameters for the control of a constant cutting force by adjusting the feedrate and for the vibration abatement by modifying the spindle speed.The two applications may be further realized using the methods of online and offline process parameter optimization in the rough and finish machining.The second application may be further divided into online and offline process parameter optimization.In addi- Figure 15.The feed axis mechanism of X axis.tion, the data collected during the whole life cycle of the CNC machine tool may be stored to create a self-learning cutting process database.

A case study on machine tool health assurance technology based on instruction-domain electronic data analysis
Acquiring the operation status data when a CNC machine tool works according to a pre-determined work task, the electronic data analysis method is used to diagnose the fault of machine by analyzing the anomaly of the acquired data.Comparing the operation status data collected at different time over the whole life cycle of a machine tool, the health degradation of the machine tool and its components can be found.The following machine tool assembly

Analysis of feed axis current
Before a specific analysis is conducted on the assembly quality, a component analysis is performed on the load current acquired.As shown in Figure 16, the current is acquired when X axis moves in a straight line at the feedrate 1000 mm .min -1 for the entire travel distance.In this study, the fast Fourier transformation method is also used for the current analysis in the frequency domain.
In Figure 16(a), the current of X axis is fairly uniform and consistent over the entire travel range, which indicates the good assembly quality.
The high-frequency current fluctuation shown in Figure 16 Further analysis shows that the frequency at 5 Hz is caused by the non-uniform distribution of the magnetic field as the result of the manual winding of the motor, while the frequency at 60 Hz is caused by an improper design of the cog slot of motor.Therefore, this method of electronic data analysis based on the instruction domain can realize both the assembly quality diagnosis of the machine tool and the motor.

A comparison of current analysis when the lead screw is not parallel to the guide rail
In Figure 17, the red curve represents the measured current after the moving average acquired when X axis moves in a straight line at the feedrate 1000 mm .min -1 for the entire travel range.The degree of bending of the curve near the right end is greater, so an abnormal installation of the bearing seat of the lead screw at the end may be diagnosed.Abnormal installation of the bearing seat leads directly to non-parallel alignment of the lead screw and the guide rail.Based on the analysis, the bearing seat at the bending end is adjusted several times, so that the lead screw is aligned parallel to the guide rail as much as possible.The blue curve in Figure 17 indicates the measured current data after adjustments, which significantly decreases near the right end, and for which slight bending is observed at both ends.In summary, the red curve, which represents the current from a non-parallel as-quality diagnosis and machine tool health assurance experiment are conducted to explain the method mentioned above.

An experimental study on the diagnosis of machine tool assembly quality
The manufacturing resources MR used in this experiment include a vertical machining center XHK715 with the Huazhong HNC-818B/M CNC system as shown in Figure 14.The work task WT is to make X axis move in a straight line at constant speed.The load current of X axis is acquired as the operation status data Y.As shown in Figure 15, the drive mechanism of X axis is a ball screw nut pair.The lead screw is connected with the servo motor via a bellows coupling.The servo motor is a GK6081-6AC61-J20B permanent magnet synchronous motor.  is to keep a single feed axis move at constant speed.The manufacturing resources MR is the experimenting machine tool for diagnosing the assembly quality, as shown in Figure 14.The feed axis current is acquired as the operation status data Y.By comparing data from the first and second spanned for halves of the year, the changes in the condition of the feed axis system are analyzed.
In Figure 18, the red curve represents the measured current on April 29, 2015 after the moving average acquired when X axis moves in a straight line at the feedrate of 1000 mm .min -1 over the entire travel range.The blue curve represents the counterpart data on October 28, 2014.The change of two lines shows the health degradation of the X axis.The initial flat blue curve changed into a red curve with bending ends, and the overall average of the current decreased.The reduction of the overall average value of the current indicates less pretensioning force of the lead screw, while the bending ends of the current curve indicate non-parallel alignment of the lead screw and the guide rail.Proper maintenance strategies may be put forward based on the above degradation situation.For example, a maintenance strategy may involve aligning the lead screw, adjusting the guide rail, and properly increasing the pre-tensioning force of the lead screw to prevent further deterioration of the situation and to maintain the machine tool in a good condition.
The application of the health assurance system based on the electronic data analysis method in the instruction domain sembly of the lead screw and the guide rail, is consistent with the diagnosis.
In the above diagnostic experiment, the electronic data analysis method based on the instruction domain is fully utilized.This method can quantitatively and uniquely provide information about the work task, including the instruction sequence, motion track, operating location, and feedrate; it can also diagnose the assembly quality by analyzing the CPS model of the machine tool.

A CNC machine tool health assurance system
The health assurance system based on historical data monitors the condition of a CNC machine tool and its critical functional components.The work task WT of this experiment and the CPS model of machine tool has been described in detail in Section 2.6.The main applications of this system include the checking and diagnosis of the work quality of manufacturing resources based on the current operation status (e.g., a quality diagnosis of the feed axis assembly and of the spindle assembly), the checking and diagnosis of the health of manufacturing resources based on the history operation status (e.g., the health check and diagnosis of a CNC machine tool and the monitoring of the stability of the machine tool process system).
In addition, by acquiring electronic big data during the whole life cycle of a CNC machine tool, a set of unified methods to assure the good health of the machine can be applied.These methods will define the health assurance standard of the CNC machine tool based on the analysis of electronic data in the instruction domain, and will establish a health assurance system that consists of a regular and thorough examination as well as long-term monitoring.

Conclusions
In this paper, a method is proposed to build a CPS model of a CNC machine tool work process based on instructiondomain electronic data analysis.Several case studies of intelligent-machining application are conducted.The method has the following features.
( With continuous accumulation and updating of the feature variable data for a CNC machine tool over its whole life cycle, a dynamic and evolving CPS model that combined with the theoretical model can be improved over time.(3) Large amount of electronic data from CNC systems is the main data source for and are important to the CPS model of a machine tool work process.The data required for the CPS modeling of the CNC machine tool may be acquired from external sensors or directly from the CNC system.CNC systems are not only important physical resources in PS, but also important information resources in CS. (4) By collecting and analyzing the work task data, manufacturing resources data, and operation status data in the instruction domain, it is possible to express the relationship between input and output variables in a CPS model of a CNC machine tool work process in a realtime and accurate manner.The G-code programs contain massive amount of data and information, which can be used to derive workpiece features, sizes, machining processes, and machining strategies that quantitatively describe the work tasks WT of the NC machining processes.
(5) Via the instruction-domain electronic data analysis, using the anomalies and quality of the operation status data Y, it is feasible to realize the following intelligent tasks: the optimization of work processes, the health assurance of manufacturing resources, and the optimal design and manufacturing of CNC machine tools.In the future, an ecosystem supported by an open intelligent-manufacturing environment based on this CPS model will be established and applied extensively.

Figure 1 .
Figure 1.The CPS architecture of CNC machine tools with a CPS model.

Figure 2 .
Figure 2. A time-domain waveform of the operation status data of a machine tool.

Figure 3 .
Figure 3.A waveform of the operation status data of a machine tool, using instruction domain as the horizontal coordinate.

Figure 4 .
Figure 4.The mapping of work task data, manufacturing resources data, and operation status data of a CNC machine tool.

Figure 6 .
Figure 6.The current waveform of a CNC machining spindle in the instruction domain.
There are two input variables (work task WT and manufacturing resources MR) and one output variable (operation status data Y) in a CPS model of a CNC machine tool work process.In the work process, data on the input variables and data on the output variables are both collected in real time, and are mapped to each other in the instruction domain for analysis and processing.The intelligent optimization of work tasks, www.engineering.org.cnVolume 1 • Issue 2 • June 2015 Engineering the intelligent health assurance of manufacturing resources, and the optimization of design and manufacturing are then made possible as following.

Figure 7 .
Figure 7. Big data acquirable inside a CNC machine tool.

Figure 10 .
Figure 10.A comparison of G codes before and after optimization.

Figure 13 .
Figure 13.(a) The instruction-domain waveform of the spindle current; (b) a partially enlarged drawling of spindle current; (c) a partially enlarged drawing of feedrate.

Figure 14 .
Figure 14.The testing environment for the assembly experiment.Figure15.The feed axis mechanism of X axis.
(b) is the intrinsic fluctuation property of the motor.In Figure 16(c), the frequency at 5 Hz (3/r) indicates the fluctuation of the motor related to the number of pole pairs, representing the low frequency component in Figure 16(b).The frequency at 60 Hz (36/r) indicates the current fluctuation caused by the cogging effect, representing the high frequency component in Figure 16(b).

Research Engineering Volume 1 •
Figure 18.Changes in the operation condition of a machine tool.

Figure 16 .
Figure 16.An analysis of the X axis current.(a) Diagram of the original current in the time domain; (b) a partial enlarged drawing; (c) the global amplitude spectrum.

Figure 17 .
Figure 17.A comparison of the currents acquired in a normal condition (blue) and when the lead screw is not parallel to the guide rail (red).
) The CPS model of a CNC machine tool work process establishes the relationship among work task WT, manufacturing resources MR, and operation status data Y in CS: Y = f (WT, MR).(2) Due to the complexity of CNC machine tools and their work processes, it is difficult to obtain an exact mathematical expression for the function Y = f (WT, MR).It is more effective to establish and use feature variables instead.

Table 5 . Experimental parameters. Pitch of lead screw Travel range of X axis Feedrate Number of pole pair of motor Number of tooth slot of motor Sampling frequency
Table 5 lists other parameters.