Design of an expert system for the prediction and comprehensive diagnosis of CNC machining fault

. Unlike the earlier research works which only focused on fault diagnosis, in this paper a smart fault preventive step is taken in avoiding some category of failures which may be predicted at the initial stage of CNC operation before a fault is diagnosed. Besides this, the domain of fault diagnosis has also been expanded by incorporating human error which was not part of the earlier system. This is the first phase of the study and a comprehensive fault diagnosis expert system algorithm for CNC machine is going to be designed, which can later on be transformed into a knowledge-based intelligent computer applications program. This will be accomplished by consulting experts on various aspects of CNC operations.


Introduction
The failure of CNC refers to the numerical control machine losing functionality wholly or partially. Owing to the various kinds of functions in CNC such the involvement of electronics, machinery, hydraulics, pneumatics, optics and many others, it is difficult to repair and diagnose numerical control machines. Once the machine is broken, it is difficult for the professional to find the reason for the breakdown in a short time or even repair fast, which this hinders productivity. The point of CNC machine fault diagnosis is to make a precise estimation on the failure of the machine in a short time, that is to say to identify the faulty part or parts and the reasons of the failure through troubleshooting.

Related work
Failure prediction and fault diagnosis have received a lot of attention from the research community and a lot of research has been conducted in this regard. However, an observation made from previous studies is that none of the model-based techniques appear to be universally appropriate [l]. For example, Yee and Blomquist [2] have studied the use of time domain analysis techniques for an accelerometer signal to predict failure of 1 mm drill bits, a rather small subset of a larger problem domain. In another study by Yee [3,4], failure prediction of large tools was attempted with limited success, due to variations in signal-to-noise ratio with accelerometer position relative to the tool. While acoustic emission techniques [5] and spindle current monitoring techniques [6] have been applied successfully for tool failure detection, their utility in failure prediction is still an open question. Using statistical techniques, Radhakrishnan and Wu [7] have correlated hole quality to dynamic characteristics of lathing thrust force for a particular class of work material, namely composites. In works [8,9] a criterion for evaluating the efficiency of modes of functioning of complex systems is described, which can be used to identify complex processes and solve problems of optition.

The components of an expert system
In artificial intelligence, an expert system is a computer system that emulates the decisionmaking ability of a human expert [2]. Expert systems are designed to solve complex problems by reasoning about knowledge, like an expert, and not by following the procedure of a developer as is the case of conventional programming [3][4][5][6].

Knowledge Acquisition System (KAS)
The knowledge acquisition system is the interface of an expert system. At present, the expert system usually gains knowledge by artificial transplantation. Using literature search and the questionnaire survey method, sociological investigation is introduced into scientific research and the production line to extract expert knowledge which is put into the knowledge base after being collected and cleared up. The setting module of knowledge acquisition in a system should be updated in order to develop the knowledge and the real servicing examples.

Knowledge Base
In expert system technology, the knowledge base is expressed through natural language rules. This formulation has the advantage of speaking an everyday language which is very rare in computer science (a classic program is coded). Rules express the knowledge to be exploited by the expert system. There exist other formulations of rules which are not in everyday language and are understandable only to computer scientists. Each rule style is adapted to an engine style. The whole problem of expert systems is to collect this knowledge, usually unconscious, from the experts.

Inference Engine
The inference engine is a computer program designed to produce some reasoning based on giving rules. In order to produce that reasoning, it uses logic. There are several kinds of logic: propositional logic, predicates of order 1 or more, epistemic logic, modal logic, temporal logic, fuzzy logic, etc. Except propositional logic, all are complex and can only be understood by mathematicians, logicians or computer scientists. Propositional logic is the basic human logic. The expert systems that use that logic are also called zeroth-order expert systems. With logic, the engine is able to generate new information from the knowledge contained in the rule base and data to be processed.

Man-Machine Interface
The man-machine interface function module includes two parts: input and output. The manmachine interface is the bridge between the expert system and users including the interface between the expert system and the user and the interface between the expert system and the engineer 4 System Operational Structure After starting the system, it will first of all perform a system scan to insure that all connections are ok and the system is ready for use. The system is meant for the universal CNC machine, so the next step shall be to select from the options of operations the kind of operation that is going to be performed.
Having selected the operation, the system will have to perform initial predictive diagnosis to detect worn out tools based on information provided by the sensory history.

Preventive Diagnostic Model (PDM)
In this model, the expert system integrates multiple sensors for predictive diagnostics, monitoring and supervisory control of CNC machining operations such as turning, boring, drilling, milling, broaching, sawing, shaping, planning, reaming, and tapping, or grinding. The PDM diagram shall perform probabilistic inference and decision making by integrating dynamic but noisy sensory data and subjective expertise in symbolic and numerical data structures designed for CNC operations.
In order to fuse the features extracted from the sensors to predict tool wear/failure and detect tool failure, the mapping from signals to symbols is modeled in the influence This multiple model technique adopted due to resource constraints is termed as the 'Bounded Rationality Principle' in the recent literature [3].

Sensor Fusion, Inference and Decision Mechanism
Using the information from the machining parameters (speed, feed, work-piece material, and tool size) each operation is categorized deterministically ("class" node). This is done to reduce the cross product space of the relevant sensors and thereby speed up the inference engine. Since the above information is available even before machining, the classification is done off-line to speed up the solution procedure. The estimation of the probability that the tool is worn ("wear" node) is done by fusing information about wear ("wear l" and "wear2" nodes) from the two sensors: spindle and feed motor current. Since only one sensor, the spindle mounted strain gage, is used for failure prediction, the probability of tool failure ("fail" node) is obtained from the relevant features from strain gage data without any sensor.

Influence Diagram Model for Wear and Failure Prediction
The decision variable which includes three states ('continue', 'reduce feed' and 'replace tool') is influenced by information available from the sensors and the type of operation being performed ("machining quality" node). If the operation is an expensive one, a warning message pops up saying 'replace tool', but if it is an inexpensive operation, the system would risk the operation with reduced feed rate even after tool wear is predicted until tool failure prediction occurs.

Failure detection
In this case, too, the classification is done off-line. The probability of tool failure occurrence is instantly obtained by absorbing information about the maximum value of the strain gage data ("mu"). At this juncture, a control signal would normally be sent to the machine controller to retract the tool.

Fault Diagnosis
The fault diagnosis expert system of CNC makes estimation of failure with the reasoning process based on the fault code or phenomena put by users and finds possible sites and reasons for the failure. Then the user looks through the conclusions of the failure, until the real cause and location of failure are found and suggestions for troubleshooting are made. Below is the flow diagram for fault diagnosis.

Proposed Algorithm for Fault Diagnosis
THEOREM: There is a fault F described by Si ... Sn set of possible causal symptoms with each symptom having Aj ... Am of attributes. Also, each set of symptoms corresponds to a particular solution description ωi ... ωn in a knowledge database. There is another database , where one complete iteration of i that is n = j.Check for similarity between each set of possible causal symptom attributes and each recorded attribute. By assigning Qi ... Qn as the cumulative value for each case of the comparison, there will exist some Qmax that has the largest value referred to as Qδ. And that Qδ is equal to distinctive causal symptom Sδ for the fault. The above can be expressed mathematically as follows: Therefore, the application of the formula to each case will result in the following expressions.
Let i = m for i = 1, i + + do while i ≤ n, If there is an intersection, assign 1, and if there is no intersection, assign 0.
Case2: when i = 2 and j = [1 ... m, j+ +] Case3: when i = 3 and j = [1 ... m, j+ +] Next, the maximum Qith value is found using the brute force method. And the maximum Qith value is Qmax, which represents the distinctive causal symptom Sδ having a corresponding solution ωδ in the expert system knowledge base.

Solution database
The solution database contains two items: the solution key index table and the solution description table, and there is a one to one mapping between the two tables in a sequential order of increasing index value, hence the first index key maps to the first solution in the solution description table. Below is a diagram to illustrate the solution database.

Conclusion
The simulation results of the study show that the learning rate of this procedure is fast. After the learning process, the output functions of neurons that are the sources of faults approach the unity and the outputs of other neurons approach zero.