Intelligent instrument fault diagnosis and prediction system based on digital twin technology

In the context of informatization and intelligent manufacturing systems, digital twin technology provides new technical ideas for intelligent decision-making. Aiming at instruments with high cost and low output, this paper develops low-cost high-efficiency fault diagnosis system to realize rapid feedback and fault of fault diagnosis results. The system includes three layers: data layer, control layer and output layer. In the data layer, this uses MEMS sensors and Zigbee wireless transmission network to construct a data link the physical end and the virtual model. In the control layer, this paper stores the collected twin data through cloud technology, extracts and calls relevant data according to the function module and then maps it to the output layer. In the output layer, this paper constructs a characteristics interpretation system, which divides the test set and training set through the dynamic database, to complete the classifier and results output. The results are fed back to the judgment framework and control layer to evaluate the effects of fault diagnosis and prediction, which provides a new method for model optimization.


Introduction
The concept of digital twin was first introduced in 2002 by Michael Grieves at the University of Michigan [1]. Since then the concept has evolved with the advent of the Internet of Things (IoT). A digital twin is a dynamic virtual model of a system, process or service. Thus, a product, factory or a business service can have digital twin [2,3].Digital twin technology has been cost-effective in the context of IOT [4]. For large-scale, complex and capital-intensive equipment, the combination of digital twin technology and industry IOT also has a broad space for development.
As a backbone industry for real economy, high-end manufacturing is a key symbol of core competitiveness in a country of region. With the development of communication and manufacturing technology, the Industrial Internet popularizes rapidly in manufacturing [5]. Enterprises have higher requirements in information transmission and decision-making efficiency. Due to the high price and unique design of intelligent instruments, the traditional fault detection and diagnosis methods based on human beings have been far from meeting the current needs of complicated systems. The integration of intelligent sensor networks, intelligent diagnosis algorithms, intelligent decision making prediction systems and remote diagnosis technologies is urgent needed to suit the needs of industrial production [6]. The appearance of digital twin provides a low-cost technical foundation to solve the problem mentioned above. There are two problems in fault diagnosis of intelligent instrument: 1. Instruments are costly, and maintenance cost which relies on manual operation is high; 2. Traditional fault diagnosis methods are not suitable because of the instruments uniqueness, the lack of sample data, and low accuracy and efficiency of the failure rule judgment driven by experience. This paper aims to develop a set of material property testing apparatus, which consists of several independent components with different functions. These components are connected through the digital system, so as to carry out all-round performance testing of the measured materials. Due to the precision of instrument, the failure of any component will rapidly lower the performance of whole testing process. Therefore, it is necessary to predict faults in advance by building virtual entities, so as to reduce maintenance costs and maintain the stability of test system.
Aiming at the problem of intelligent instrument fault diagnosis, this paper establishes a set of fault diagnosis and prediction system based on digital twin technology, which can be divided into four modules: (1) The collection and transmission of field data (2) Save and control the fault feature data (3) Fault diagnosis and prediction (4) ROC evaluation

Methodology
Based on the traditional fault diagnosis process, this paper introduces the digital twin technology, designs and develops this system according to the state characteristics and key data of the intelligent instruments. This system is fitter for the operating status of intelligent instruments, which can ensure a lower trial cost and real-time feedback. Figure 1 shows the system structure. Intelligent instruments equipment and their digital models are interconnected by sensors to establish data interconnection. A large amount of historical data generated by the operation of intelligent smart instruments and equipment on the physical side is collected by sensors, stored in the cloud or database to form a data link and mapped to the digital twin model. The database management system performs preliminarily processing on the mapping data and stores it for later calling [7]. Then, according to actual needs, the digital twin model is assigned relevant performance requirements and corresponding parameters. The processed data and performance-related parameters are summarized into the judgment framework process, filtered by specific algorithms or classifiers, and the process data forms a dynamic database, and finally outputs the data characteristics. Finally, this system outputs the data characteristics which can be based on to obtain fault judgment results. Similarly, the process can perform data prediction by adjusting the judgment framework, and complete the fault prediction based on the inferred data.

Platform functions
According to the data transmission process, the system can be divided into three layers: data layer, control layer, and output layer. The system architecture is shown in Figure 2. System using modularization design, hierarchically realize the module function, including four modules: field data collection and transmission, fault characteristic data storage and management, fault diagnosis and prediction, and ROC evaluation.

Field data collection method
The collection of field data involves sensors and monitoring technology, which is also the characteristic of digital twin technology. It can perceive the performance of system in real time and collect environmental information around the system, which requires the use of sensing and monitoring technology to achieve. The information of system status and loading variation, or operation and service environment can be obtained by the distributed sensor network installed on the surface of the system structure or embedded in the structure to monitor the manufacturing and maintenance process in real time. The continuously acquired sensor data can be used not only to monitor the current state of the system, but also to predict the future state of the system based on big data, dynamic data-driven analysis and decision-making technology [8]. Micro-Electro-Mechanical Systems (MEMS) is one of non-conventional chip manufacturing technology. In addition to the conventional semiconductor circuits inside the MEMS chip, there are also micron/nano-level mechanical structures, which can complete the collection of vibration data of sensitive parts. In this paper, MEMS sensors are used to collect environmental data, such as temperature, humidity, vibration and operating speed of key components. Multiple sensors realize information interconnection through Zigbee network technology to form the bottom layer of data and complete field data collection.

Data storage and transmission
3.2.1. Digital twin and twin data. The digital twin, one of the effective ways to realize double-effect engineering, is a technical system aiming at creating a digital model or digital twin to cover almost all experience [9]. The accuracy of diagnosis, evaluation and prediction of digital twin can be improved by real-time monitoring of system status and digital model. Online optimization for system operation management and maintenance can reduce the redundancy of structural design, avoid frequently periodic maintenance, and ensure the safety of the system.
The outstanding characteristics of digital twin are listed as follows: 1) Concentration. All data of the physical system during its lifetime is stored in the digital mainline to carry out unified management, which makes the bidirectional transmission of data more efficient.
2) Dynamic. The sensor data describing the environment or state of the physical system can be used for the dynamic update of the model. The updated model can dynamically guide the practical operation. The real-time interaction between the physical system and the digital model enables the model to develop continuously during its lifetime; 3) Completeness. For complex systems, its digital twin integrates all subsystems, which is the basis of high precision modeling; while real-time monitoring data can further enrich and enhance the model to contain all the knowledge for the system. Twin data is the core driving force of digital twin, providing accurate and comprehensive information sources for the integration of virtual entities and physical entities. Both the variation of data classification and the incompatibility of data formats lead to complex interoperability and inconvient data fusion. Starting from the data to enhance the understanding of the problem can help explore the hidden correlation between multi-source heterogeneous data, so as to achieve better diagnosis, forecasting and decision-making guidance.

Cloud storage technology.
Driven by the characteristics of twin data, the transmission of characteristic data of intelligent instruments requires a huger storage space and a higher transmission rate. The use of cloud storage technology can overcome this difficulty. In the background of SaaS becoming the application trends, cloud database, a database deployed and virtualized in the cloud computing environment, develops gradually. Cloud database has the characteristics of dynamic scalability.
Theoretically, cloud databases possess infinite augmentability and can meet the ever-increasing data storage requirements. Facing the constantly changing conditions outside, cloud databases can show very good flexibility. Meanwhile cloud storage technology supports the large-scale parallel processing of data. It is an important technical support for the digital twin model.

Data information management system.
The modeling of data information is based on the definition of the CIM reference model of IEC61970, and the persistent processing is performed on the relational database to achieve a unified description and definition of various energy forms. Based on the big data analysis platform, the system is built on a distributed cloud platform for big data. Based on Hadoop, Spark, Mycat and other projects, the cloud platform is built to store and deal with massive data. The platforms can provide a good processing and storage solution and upload it to the data information management system whether it's structured data or not. The data information management system is based on part of the functional applications in the MES framework under the Industrial Internet, which mainly includes the analysis dynamic data driver and decision-making technology.
Among them, real-time interactivity and dynamic evolution are the two most important characteristics of digital twin. Dynamic Data Driven Application Systems (DDDAS), a brand-new simulation application mode, can organically combine the model with the physical system. Using the real-time monitoring data to update model dynamically, the updated model can get a lot of data which can not be directly output during its service to predict the system status more accurately and guide the decision-maker more effectively.

Fault diagnosis and prediction
3.3.1. Feature data extraction. Using time nodes as tags, the environmental characteristics collected under MEMS [10] sensors, such as temperature and humidity; key components of smart instruments, such as vibration frequency, dimensional variables of the connection structure, operating speed or acceleration of components that may cause instability failures; through data such as the degree of fit between part of the component waveforms calculated by the information management system and the standard waveforms are summarized into the cloud database and input into the classification structure module below through the information management system. Figure 3 shows the fault diagnosis process.  (1) Data unification: unify the format of the data collected by the sensor, keep the category consistent, and facilitate processing.

Fault diagnosis process.
(2) Data preprocessing: After removing invalid information such as redundancies and outliers contained in the data, it is manually labeled. During the labeling process, three people are used to label them at different time periods. The fault data is labeled 1, and the normal data is labeled. Is 0, and the data is randomly divided into a test set and a training set using a random segmentation method. The ratio of the test set to the training set is 2:8, the training set is used to train the LSTM model, and the test set is used to test the classification effect of the classification model.
(3) Converting individual data to continuous feature vectors: Since the training set of the digital twin system is very large, this article is based on the Skip Gram model to train in an unsupervised manner to obtain the continuous vector representation of individual data. This method can compress the data scale while capturing feature information, and the high dimensionality of the vector solves the problem of multi-directional divergence of the data set, thereby ensuring the stability of the model. In the input layer, each word is represented by one-hot encoding, that is, the feature data set of all time nodes is represented as a D-dimensional vector, where D is the total number of individual data in the data set. In the vector, the dimension corresponding to each data is set to 1, and the values of the remaining dimensions are 0.The value of the output layer vector can be calculated through the hidden layer vector (K dimension) and the K×D dimension weight matrix connecting the hidden layer and the output layer. The output layer is also a D-dimensional vector, and each dimension corresponds to a feature in the data set. Finally, the activation function is applied to the output layer vector to calculate the generation probability of each feature data.
(4) Feature data weighted sentence vector: weighted average of all individual data vectors in the data set, the weight of each vector can be expressed as , where a is the parameter and p(w) is the word w frequency. Then use PCA/SVD to modify the vector value, and output the vector representation of the features of the smart instrument, that is, the overall feature vector. (5) Build LSTM network: As shown in Figure 3, the overall feature vector passes through the LSTM network. In order to prevent the model from overfitting, the Dropout stochastic optimization factor is added to the LSTM network to make the model fit well in complex data sets. Increase the applicability of the model. Then output a value between [0, 1]. The experimental example steps of this method are as follows: calibrate the training data set, such as training data; normalize the features to obtain; use the Support Vector Classification, SVC method, select the RBF Kernel to build the model and train, and get the parameters C=1.28, g=3.56 SVM classification model.

Model evaluation and optimization
3.4.1. Confusion matrix. The confusion matrix makes judgments based on the true category and classification model of the matrix, and summarizes the records in the data set in the form of a matrix. Take the binary classification problem as an example. Table 1 shows the structure of the confusion matrix. Confusion matrix is a tool for performance evaluation of classification models. Specify a threshold after the classification model returns the probability. By constantly changing the threshold, different substitution matrices can be obtained, thereby changing the ROC curve, the expected profit curve and the promotion coefficient curve. This approach can be more comprehensive evaluation and comparison of the performance of classification models. The confusion matrix structure of the binary classification problem given above can be easily extended to the multivariate classification problem.

ROC curve.
The ROC curve is originated first in signal processing. In the ROC curve, the abscissa is False Positive Rate (FPR), and the ordinate is True Positive Rate (TPR). The fault prediction system based on classifier has a variety of classification methods, and the uncertainty of its overall characteristics may affect the weight of different types of data. Therefore, a universal black- box-like prediction system is needed, which can input different types of data into the system to obtain the classification results. The rest is to train the model continuously to fit the available standard, which in this paper is the AUC index corresponding to ROC matrix.

Random chance
Equal error rate False positive rate True positive rate 0 1 1 Figure 4. ROC curve diagram. Figure 4 shows the ROC curve diagram, AUC [11] parameter is an indicator of the ROC curve, and its collective significance lies in the area enclosed by the ROC curve and the horizontal axis [12]. As a measure, for a forward classification problem, under the specified threshold, the larger the AUC value, the higher the model's resolution performance. AUC calculation formula is as follows:

Discussion
In this paper, a set of fault diagnosis and prediction system is designed for intelligent instruments to achieve high-efficiency, data-based and intelligent fault diagnosis and prediction of high-cost, lowyield equipment. Compared with the traditional diagnosis process, the system has the ability of selfiteration, strong learning ability, can reduce costs, increase the rate of fault information transmission, and intelligently manage the production site. As shown in Figure 5, the fault prediction system classifies the current running state according to the real-time data comparison, and obtains the normal judgment result.  According to the prediction model described in this paper, the fault prediction accuracy of transverse stress loading component and composite field loading component of indentation tester reaches 91% and 90%. However, this system still needs improvement due to its shortcomings. The data feature selection and threshold selection of this system still have data black boxes, the precise use of data still needs to be improved, and there is still room for optimization of the model's operating efficiency and iteration speed.

Conclusions
To sum up, the main research results of this paper are as follows: (1) Through literature research and field data collection, the problems existing in fault management of precision instrument components are analyzed, and a module with fault prediction function is developed based on digital twin technology.
(2) The process architecture of fault diagnosis function is constructed.
(3) A set of model evaluation method is designed to guide the optimization direction of the model.