Research on remote state monitoring and intelligent maintenance system of CNC machine tools

: In order to improve the operation reliability of high-grade computer numerical control (CNC) machine tools and reduce the maintenance time of failures, the remote state monitoring and intelligent maintenance system for CNC machine tools was proposed. Through collecting the basic information of equipment, maintenance information, and the information of the vibration, temperature, main current and power of the machine tool based on soft-bus technology, the system analysed the real-time state data, got the reliability parameters, extracted the fault features and established the maintenance knowledge base. Combining the dynamic monitoring data and static data, the system evaluated the key parts of machine tools. By the fault knowledge base, the system analysed the reason for failure and recommended the maintenance method. With the function modules, the system can improve the intelligent maintenance level of CNC machine tools and improve the using efficiency of machine tools.


Introduction
Computer numerical control (CNC) machine tools, as the working machine of manufacturing equipment, are an important guarantee for realising the modernisation of the country's industry. The usage efficiency of CNC machine tools directly affects the production efficiency of enterprises. In order to shorten the maintenance time of the CNC machine tools and relatively prolong the working time of the machine tools, it is necessary to monitor the status of the CNC machine tools in real time, provide the machine tools reliability analysis methods and failure maintenance methods. The research on state monitoring and real-time evaluation of CNC machine tools has become a hot issue at home and abroad. Experts from the USA, Japan, Canada and other countries and regions have conducted research on the status monitoring and fault diagnosis of electromechanical systems. Domestic research on equipment fault diagnosis has been conducted for more than 20 years. Beijing University of Chemical Technology, Tsinghua University, Xi'an Jiaotong University, Shanghai Jiao Tong University, Tianjin University, Northeastern University, and Beijing Information Science and Technology University have improved different fault diagnosis methods aiming at different objects and have obtained a large number of research results [1][2][3]. The status monitoring and fault analysis of CNC machine tools involves multidisciplinary research fields such as test technology, signal processing and intelligent analysis, judgment and recognition, and life prediction and evaluation. Some domestic and foreign companies have developed corresponding monitoring systems, such as the Switzerland KISTLER monitoring system based on cutting forces, Siemens CNC machine tools remote monitoring and diagnosis system EPS and so on [4][5][6]. However, those systems can only realise the status detection of the electrical system of the machine tools. Switzerland STEP-TEC installed the acceleration sensors on the spindle to reduce the bearing vibration and limit the spindle vibration to extend the spindle life [7]. Domestic scholar Xie Xiaoxin proposed a method based on multi-manifold local linear embedding algorithm to analyse the mechanical fault [8]. Yang Qing proposed an incremental local tangent space sort algorithm for rolling bearing fault diagnosis [9].
The remote status monitoring and intelligent maintenance system of CNC machine tools is proposed in this paper. It collected basic equipment information, maintenance information, and the information of vibration, temperature, spindle current and power of the machine tools, established real-time monitoring analysis module, maintenance knowledge diagnosis module and case analysis module, so as to achieve the monitoring of the machine operating status, reliability assessment and failure maintenance recommendation.

System structure
The remote state monitoring and intelligent maintenance system of CNC machine tools mainly includes the basic information management module, running state monitoring module, maintenance information management module, machine tools reliability analysis and evaluation module, and intelligent fault diagnosis and maintenance module.
Owing to a large number of types of machine tools and the need to interface with data from other application systems, the system uses soft-bus middleware technology to shield different application interface problems and develop system function modules. The basic information management module of the machine tools is responsible for entering the basic information such as the name, model, manufacturer, manufacturing time, and installation address of the machine tools. The running state monitoring module collects state information such as machine vibration, temperature, spindle current and power during the cutting, and it also collects the machining accuracy information by the measurement and inspection equipment. The maintenance information management module records information such as machine maintenance time, maintenance personnel, and maintenance required materials. The reliability analysis and evaluation module of the machine tools analyses the fault maintenance information of each functional component of the equipment, establishes a reliability analysis model, and analyses and evaluates the equipment status. The intelligent fault diagnosis and maintenance module collects the knowledge of the machine maintenance reference books and the effective maintenance experience of the maintenance worker, and provides guidance on maintenance methods of the machine fault.
The key component early failure warning module predicts the development trend of the key parts of the machine tools by analysing the machine operating status data and reliability analysis data. The schematic diagram of the structure of the remote state

Message bus
The information conveyed in the network, such as operating status information, machining process information, and equipment management information of the machine tools can be regarded as messages. The message queue mechanism is used to reliably manage the sending and routing of these messages. The feedback mechanism will effectively solve the application coupling in the distributed system, reduce the difficulty and technical complexity of the application system development, and achieve high performance, high availability, scalability and consistency. The message bus of the soft bus provides a cluster of message channels, as well as message consumer terminals and message management terminal modules. It provides the following functions: (i) Message terminal registration or cancellation; (ii) Terminal 'heartbeat' monitoring: The message consumer terminal, the message management terminal, and the message channel in the cluster periodically send a 'heartbeat' message to the channel to indicate that they are online; (iii) News subscription; (iv) News push; (v) End-to-end message push based on message channel cluster routing.

Database service bus
The remote state monitoring and intelligent maintenance system of CNC machine tools is aiming at a variety of databases, such as Oracle, PostgreSQL, MySQL etc. It needs to develop standard access interfaces of these databases. The database service bus of the soft bus establishes a set of standard interfaces for database access and provides a comprehensive technical solution for solving the synchronisation mechanism of database service cluster access, in-memory database and persistent database.

3.2.1
Componentised database standard access interface: The database service component (dbService.dll/.so) can be responsible for establishing connection with different database servers at the same time. The application component can call a unified SQL interface or NoSQL interface as long as it registers the dbService handles on the K4 software bus and the data exchange bus (The technical details of different types of database data access operations are encapsulated under the unified operation interface), so as to achieve the addition, deletion, modification, investigation, or other operations. The programmer of the SOA application service component only needs to pay attention to the access statement of business layer data and perform data access operations with the target database, which reduces the technical development complexity in a variety of database environments.

Main memory database and persistent database combination operation:
The characteristic of the traditional database access operation mode is that the SOA application service component directly accesses the hard disk database and consumes a large amount of input/output (IO) read and write resources because the system overhead of system reading and writing is far greater than the memory operation. The main memory database access operation mode completely solves the drawbacks of the traditional database operation mode. The main feature is that the SOA service plug-in no longer deals with the database. Through the dbService, it directly interacts with the main memory database, changing the IO reading and writing into memory access, completely avoiding bottleneck caused by IO reading and writing. The dbService provides the main memory database and the hard disk database asynchronous transaction queue mechanism for data synchronisation, and the data synchronisation is completely decoupled from the data operation of the SOA service. Changing the traditional database access operation mode to the main memory database access operation mode enables SOA application service components to greatly increase the efficiency of massive data access operations and it is a powerful support tool for big data processing.

Database service cluster:
Since the dbService can connect multiple remote database servers concurrently, a database service cluster is established. At the same time, multiple remote database connection handles are provided to SOA application components, and the application component modules can easily implement redundant backup of data, or formulate database data storage policies, implement data distributed storage management and exploit the advantages of database service clusters.

Cloud bus
The information remote collection, information push, and data query of CNC machine tools are completed through the network. On the soft-bus network there is a server that acts as the cloud bus host role (knESB process residency host), and other servers can distribute service hosting processes (knMaster). When each service management process (SOA application service components managed by this process) starts up, they all register the knESB with the service agreement. For example, service A can provide a map query service, and service B can provide a search query service. The various services are packaged into a dynamic library of SOA interfaces. When the system application interface (UI) makes a service request, it first queries the knESB for the interested services, and the knESB verifies that the service requirements of the client requests are correct, then the client is informed of the network location of the service, and the client automatically finds the relevant service according to the network location, obtains the service resource, and realises the application function of the service request. The knESB implements service 'transparent' management at the application layer. The enterprise application system client in the knESB environment, as long as the bus knows the service name they need, the bus will query the service's network address in the service registry and feedback to the client. According to the target service network address, the client will establish a connection with a specific service and obtain services (Fig. 2) .

Reliability analysis module of machine tools
In order to improve the reliability of CNC machine tools, we must identify the potential weaknesses of key components that affect the reliability of the machine. The reliability analysis module of the machine tools is based on multi-source data acquisition of CNC machine tools. The data includes equipment basic information, machining accuracy information, operating status information, reliability test information, and maintenance information. The equipment basic information includes: equipment number, equipment name, model, manufacturer, main technical parameters (maximum cutting diameter, maximum part length, spindle speed, spindle motor power etc.), key function part number, name, model and manufacturer. The processing accuracy information includes: biaxial positioning accuracy of each axis, rotary axis rotation accuracy, surface roughness of often-processed parts, S-piece processing precision. The sensor detection information includes: vibration, acoustic emission, temperature, stress-strain, ultrasound, acoustic array etc. The maintenance information includes: current equipment failure phenomenon, occurrence time, maintenance time, maintenance methods, maintenance personnel etc. The evaluation of the reliability index of CNC machine tools includes historical reliability evaluation and operational reliability evaluation. Historical reliability evaluation is based on statistical methods of historical failure data. It mainly focuses on the distribution characteristics of failure data, and establishes a corresponding failure data distribution model, and then obtains reliability evaluation indicators based on the failure data distribution model. The system formulates a variety of computing methods to classify data and dynamically set weights. The reliability values are calculated based on the Markov chain model, to complete the reliability evaluation of five-axis linkage CNC machine tools and output evaluation indicators of reliability evaluation results. The specific evaluation indicators mainly include MTBF, MTTR, inherent availability and precision retention time. The evaluation objective is to evaluate the reliability of each key functional component first, and then complete the overall reliability evaluation of the machine tool.
The reliability of the flexible production line is based on the reliability analysis and evaluation index of the 5-axis linkage CNC machine tools. The data fusion analysis technology is adopted according to the test data provided by manufacturers such as onsite operating status data, production units or numerical control machining centres etc. According to the equipment characteristics and operational requirements of the flexible production line, the reliability evaluation index of the flexible production line was studied from the three aspects that are inherent reliability, running reliability and maintenance reliability. It adopts the analytic hierarchy process to determine the core reliability evaluation index and its weight coefficient in order to determine the comprehensive evaluation index of the flexible production line. According to the comprehensive evaluation index of the flexible production line, the weak link of the production line is analysed. The data collection and the analysis of the operating status of weak links are performed. The Markov probability model is used to simulate the degradation process of important CNC machine tools on the flexible production line (Figs. 3-5).

Intelligent fault diagnosis maintenance module
Since the product manuals or precautions provided by CNC machine tools manufacturers are not perfect and the structure of  CNC machine tools is becoming more and more complex, the equipment maintenance engineers need more training. However, in fact, it is a lack of sufficient training and lack of guarantee technology of CNC machine tools. With the increasing number of CNC machine tools, maintenance engineers have become 'firemen', especially in the event of frequent equipment failures. In order to solve this passive situation, the intelligent fault diagnosis and repair technology of CNC machine tools is urgently needed. The traditional maintenance mode of CNC machine tools is necessary to be transformed into an intelligent maintenance mode, and gradually adjust the goal of 'repairing in time' to 'near-zero fault operation and self-maintenance'.
According to the actual business process, the task division of fault treatment and the workflow mechanism, the intelligent fault diagnosis and repair module achieves fault reporting, fault review, troubleshooting plans, fault detection, fault repair, cutting experiments, machine tool status assessment and other business process management. The system will meet the needs of different users for system functions, business processes and views based on functional configuration and view configuration. It will also provide board technology modules to achieve global sharing of information such as flexible line and machine tool operation status, machine failure maintenance progress, and equipment management work, and establish a transparent device management environment.
The core of intelligent fault diagnosis and maintenance module is fault knowledge acquisition, representation and reasoning. The knowledge of fault diagnosis of CNC machine tools is more than the summed-up experience of maintenance experts in long-term practice. It also includes the solution provided by the CNC manufacturer's maintenance and user manual. The fault diagnosis knowledge includes the fault phenomena, on-site inspections, causes of failures and maintenance solutions. If similar or identical faults are encountered, the fault diagnosis and troubleshooting can be performed directly with reference to the previous troubleshooting plan. Using computer technology, it actively pushes relevant fault diagnosis knowledge when maintenance personnel need to use it. The acquisition of fault diagnosis parameters is limited by various factors, including the requirements of the structural integrity of the machine tools. The installation of some sensors will destroy the structure of the machine tool and affect the stable operation of the machine tool.

CNC machine tool failure knowledge base
The CNC machine tool failure knowledge base establishes all information entities as an object-oriented information model. Based on the object model and knowledge model, the system abstracts fault diagnosis maintenance knowledge as a record for easy retrieval, matching and application. The object class is the basis of the database and the knowledge base. It defines the description, relationship and hierarchy of the entity information. In this system, the flexible line, CNC machine tools, CNC machine tools subsystem, CNC machine tools related information, CNC machine tools failure related records and related analysis and evaluation reports are all defined in terms of object classes, and then they are stored and accessed as object instances. Based on a model-driven mechanism, the system achieves a unified storage access mechanism for data objects, in order to facilitate system maintenance, development, and function optimisation.
The fault features in the knowledge base are used to record various characteristic information when the faults occurs. The quantitative fault features include voltage, current, temperature, pressure, vibration signal time-domain characteristic values etc. The qualitative signs are mainly for the description of fault phenomena. For example, the description of the noise size includes the descriptions of small, medium, and large categories. Each fault feature property is represented by the two tuples (property name, property value). The types of property values mainly include a text description, logical judgment, numerical representation, measurement signal etc. These feature sets have the overall properties of the machine, such as the alarm number, noise size, whether it occurs during the operation, whether the emergency stop. The features also include local features, such as the control cabinet temperature, spindle rotor vibration signal and spindle temperature.
The CLIPS tool is used to organise knowledge in a framework and establish a 'frame-slot-value...' nested structure for expressing different aspects of knowledge. After creating a knowledge template, the module can add facts that can actually happen based on the template. The production rules are created using the 'IF ... THEN ...' statement. The condition part of the rule consists of events. The events relationships' are organised by the basic logical relationship (or, and, and not) or nested logical operation relationship expression. The conclusion of a rule consists of a set of actions, which is to output a conclusion or declare new facts and instances or modify existing facts and instances. Each rule has own confidence degree. CLIPS defines rules in the form of: (defrule (rule name) (patterns)*. The predecessor of the rule is the conditional part = > (actions)*. The following part of the rule is the conclusion or execution part. Using CLIPS to build framework production rules, the construction template is as follows. For example, build a fault attribute template: (deftemplate fault_attribute (slot name (type STRING)) (slot weight_coef (default 1.0)) (slot fault _detects (type STRING)) (slot fault_explains (type STRING)) (slot tree_layers (type INTEGER)))

CNC machine fault case library
The representation of CNC machine tools fault cases is the most important issue of the case-based reasoning system. The representation of the case will directly affect the efficiency of case management and case retrieval, and it will also affect the operating efficiency of the entire system. The problem of representation of cases is mainly to determine a common data structure to express reasonable and accurate fault cases, determine efficient case organisation methods and facilitate the retrieval and structural calculation of case libraries.
For CNC machine tools failure case, the main contents to be expressed include: basic machine information, such as the machine model, the model number of the numerical control system, and machine environment parameters and other background information; fault phenomena and fault feature parameters; the cause of the fault and the specific location of the fault; the troubleshooting method, which is the most direct suggestion for maintenance personnel to perform maintenance; effect evaluation after taking corresponding troubleshooting measures.
The failure case can be defined as four tuples:

CNC machine tools fault reasoning
The CNC machine tools fault reasoning engine simulates the thinking of a human expert and controls the entire intelligent fault diagnosis and maintenance module program. According to the current input data, It uses the knowledge in knowledge base and case library to solve the current problem with a certain reasoning strategy. Then it explains external input facts and data, exports conclusions and gives tips. The reasoning engine prefers a case database and selects case information with a similarity degree above a certain threshold. If there is no case being found, it will search for a general rule base and a fact base. The system adopts the RETE algorithm and saves the matching state to the node by saving the state of the matching process, thereby reducing a large number of duplicate calculations. If there are identical matching conditions between different rules, the different rules can share one node, thus simplifying the matching process and shortening the matching time. The system forward reasoning method adopts the fact-driven control strategy, matches the known fault facts with the previous conditions of the fault knowledge in the dynamic database, and decomposes the knowledge back conditions as the intermediate fault to continue reasoning until there is no fault knowledge that can match the fact of failure in the dynamic database, and then the reasoning ends. The reasoning conflict resolution adopts a priority control strategy. The recently activated rule is placed before the same or lower priority rules, but after all rules with higher priority (Fig. 6).

Conclusion
The state monitoring and intelligent maintenance technology of CNC machine tools can ensure reliable operation of equipment and improve production efficiency. The system proposed in this paper can collect the dynamic and static information of the equipment, establish a mass database, knowledge base and case base, and realise the monitoring and early warning of machine tool running status, the reliability evaluation of functional components and the recommendation of the fault maintenance methods. The system can be applied to the intelligent management of other mechanical and electrical equipment in enterprises and improve the level of equipment management.

Acknowledgments
This research was supported by the National Science and Technology Major Project of China (grant no. 2015ZX04001002).