System and method utilizing a real time expert system for tool life prediction and tool wear diagnosis
NOTICE 
     © Copyright Texas Instruments Incorporated 1991. A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyrights whatsoever. 
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to manufacturing automation and in particular to a system and method for timely replacement of cutting tools through early prediction of cutting tool life and accurate diagnosis of tool wear using an Influence Diagram Expert System and multiple sensors. 
     2. Description of the Related Art 
     The background of this invention is described in conjunction with manufacturing automation as an example. 
     Automation in manufacturing is a rapidly growing field with significant impact on improved product quality, high productivity and reduced manufacturing cost. While it has been adopted successfully at different levels of manufacturing process, one of the main hindrances of completely automating any metal cutting operation is the timely replacement of cutting tools. Currently, human intervention is required to change the cutting tools at appropriate heuristically chosen intervals and typically, one machinist is assigned to supervise and replace cutting tools for a batch of automated machining centers. With adequate sensors for in-process monitoring of the tool condition, an improvement can be obtained in machining economics, especially in high volume production lines. Cutting tool condition monitoring, wear diagnostics and appropriate machine control problems have been investigated through different methodologies: real time expert system based approaches and mathematical model based approaches. While these on-line monitoring techniques provide a solution to correctly identify a damaged or worn tool, they are postmortem techniques; waiting for an appropriate decision after the tool is worn or damaged. 
     A tool changing operation may involve multiple tasks like procurement of a replacement tool from a centralized storage area, loading tool-setting software from the plant manager to the machine controller, dynamic re-scheduling of the production line to account for the anticipated machine down time, and so on. The present tool monitoring techniques do not provide adequate lead-time to initiate these multiple tasks in preparation for a tool-change, and hence, no significant improvement is made in reducing the downtime due to cutting tool changes. Another added limitation of present continuous on-line monitoring is the requirement of dedicated processors on each machine, primarily because of stringent response time requirements of the present day real time diagnostic systems. 
     In order to automate the cutting tool replacement task with adequate forewarning, a reasonably accurate estimate of the life of the cutting tool is required. As mentioned earlier, a significant advantage would be that the predicted tool life information could be utilized for dynamically re-scheduling machining operations and cutting tool replacements with a reduction in inventory and labor costs. 
     Mathematical model based techniques, called Taylor&#39;s tool life equation, and extensions thereto, may be applied to estimate the cutting tool life. However, these equations provide a poor estimate of the life of the cutting tool. For example, in the case of drilling, work piece material hardness is an important factor affecting the life of the drill but is not taken into account. While modified forms of Taylor&#39;s equation with corrections for work piece hardness have been applied to determine the drill tool life, such an approach is impractical in a production line since hardness for each work piece is not readily available or easily measurable. Furthermore, in some other machining situations, Taylor&#39;s model has been found unsuitable. 
     Therefore, it would be desirable to have a system in which a cutting tool&#39;s life can be accurately predicted during the initial use of the tool so as to provide adequate lead-time for the replacement of the tool. 
     In the area of cutting tool wear diagnosis, some present day techniques are pattern recognition (PR), neural nets (NN) and real-time expert systems (RTES). PR and NN, use pattern samples that are already classified based on some wear criteria and train the system to recognize this fact. This approach is called `supervised learning`. In `unsupervised learning`, no wear criteria is used and hence, the knowledge about the class to which the samples belong is not available a priori. Such an unsupervised training approach using fuzzy clustering technique has been applied to the drill tool classification problem. Using thrust and torque data from a torque dynamometer, a fuzzy classification of the state of the drill tool has been performed successfully. However, the drill is classified as worn only after the cutting edges are severely damaged. This prediction is delayed until the drill is about to fail. 
     The advantages of the RTES techniques are the ease of modification, the ability to select optimal control decisions by optimizing over a cost function after classifying the current state of the tool, and the facility to repetitively utilize the same inference engine while applying to different machining operations. If the diagnostic system needs to be updated to handle new combinations of machining parameters or new sensors, then in case of PR or NN techniques, the system has to be retrained with new as well as old data, a rather time consuming process. However, in case of RTES, the knowledge base can be easily updated with the new information. 
     Heretofore, one of the problems with the present RTES technique has been the lack of learning capability. The development and tuning of the RTES requires detailed analysis of pertinent data to extract features and subjective estimate of the conditional probability distributions that form the critical elements of the knowledge base. 
     SUMMARY OF THE INVENTION 
     A system for predicting the life of a cutting tool in an automated metal cutting machine, comprises a plurality of sensors for measuring physical data relating to a cutting operation of said machine, and a computer connected to these sensors. The computer comprises a feature extractor for transforming the physical data into feature values, a tool life predictor for arriving at a prediction of the life of the cutting tool. The tool life predictor has an influence diagram having an input level of feature nodes, intermediate nodes connected to the feature nodes and to a machining class node, an output node connected to the intermediate nodes, a first module for computing averages of feature values for each sensor, a second module responsive to the feature averages for making a classification of the feature average as indicative of a long life or a short life, and a third module connected to the influence diagram for combining the classifications to arrive at a classification and a conditional probability at each intermediate node and a classification at the output node which is the predicted life of the cutting tool. 
     Furthermore, a method to enable a real-time expert system to learn comprises the steps of creating a relational structure corresponding to the influences that a first and a second variable have on a third variable, obtaining data for these variables over some duration of time, determining a tolerance zone around a sample which divides classes and using a dynamic distance classifier, which is responsive to the tolerance zone, to determine decision boundaries for the first and second variables and probabilities associated with the decision boundaries. The probabilities indicating the confidence with which a decision boundary classifies values of the first and second variables with respect to the value of the third variable. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the drawings: 
     FIG. 1 is a block diagram of a computer aided manufacturing (CAM) system; 
     FIG. 2 is a schematic diagram showing the logical links between sensor data in a CAM system and an Influence Diagram Expert System (IDES). 
     FIG. 3 is a flow chart for operating a CAM system using an IDES to predict tool life and to monitor tool wear; 
     FIG. 4 shows the relationship of the training phase to the operations phase; 
     FIG. 5 shows an example influence diagram; 
     FIG. 6 shows the influence diagram topology for predicting tool life according to the present invention; 
     FIG. 7 is a graph of experimental data used during the training phase of the present invention; 
     FIG. 8 shows the influence diagram topology for monitoring tool wear according to the present invention; 
     FIG. 9 is a flow chart showing how a dynamic distance classifier according to the present invention is utilized in a computerized machining operation. 
     Corresponding numerals and symbols in the different figures refer to corresponding parts unless otherwise indicated. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
     In FIG. 1, is shown in an automated manufacturing operation using this invention. A metal cutting machine 90 has a drill bit 100 attached to a quill 108, rotated by a spindle motor 106. The spindle motor 106 is connected to an AC electrical power source 117 via wires 116. 
     Drill bit 100 is lowered by feed motor 110 into a work piece 102 attached to a work table 126 by vise 104. Feed motor 110 is connected to a DC electrical power source 119 via wires 120. 
     A number of sensors measure physical data pertinent to the drilling operation of machine 90. A spindle motor current gage 114 senses the AC current transmitted through wires 116, a feed motor current gage 118 measures the DC cuttent transmitted through wires 120, a strain gage 122 is attached to quill 108 for measuring the thrust force exerted by the tool 100 on work piece 102, an accelerometer 128 senses vibrations in vise 104, and a dynamometer 124 measures the force exerted by vise 104 on table 126. The outputs from these sensors are fed into an analog signal conditioner 130 for adjusting the raw signals into a range acceptable as input by analog-to-digital converter 132. Conditioned signals from the analog signal conditioner 130 are transmitted through lines 160 through 170 into analog-to-digital converter 132 of a digital computer 134. Computer 134 contains a central processing unit 136 and a memory 138. Connected to computer 134 are monitor 144, keyboard 148, disk drive 140, and tape drive 142. 
     Adjacent to machine 90 is a measurescope 148 which has a monitor 150 attached to it. The measurescope 148 is positioned so that it can visually measure the wear scars of drill bit 100. 
     Computer 134 processes inputs from sensors 114, 118, 122, 124, and 128 to predict when drill bit 100 will be worn out and at the end of predicted life to monitor drill bit 100 for wear on a continuous basis. The prediction and diagnosis of wear may either be displayed on monitor 144, for a human operator to take some action, such as replacing the tool, or may initiate the automatic procurement and replacement of drill bit 100. The replacement may be done by some process control hardware 112 attached to computer 134. 
     During certain phases of the operation of machine 90, computer 134 will be idle with respect to processing data and controlling machine 90. That idle time may be used to service other machines (not shown). Thus, computer 134 may be used to predict tool life and diagnose tool wear in multiple machines which operate in parallel. 
     The operation of machine 90 is controlled by an Influence Diagram Expert System (IDES) 154 shown in FIG. 2. As FIG. 2 shows, computer 134 executes Influence Diagram Expert System (IDES) 154. It predicts the length of life of drill bit 100, monitors drill bit 100 for wear, and initiates the replacement procedure when drill bit 100 has been diagnosed as worn out. FIG. 2 shows a schematic of the logical links between sensor data 156 and IDES 154. The sensor data is, for example, sensors 114, 118, 122, 124, and 128, of FIG. 1. IDES 154 is also connected to knowledge base 152, in which IDES 154 stores information it uses to process data obtained from the sensors to make decisions which are displayed on monitor 144 or which initiate some action on the part of process control hardware 112. Knowledge base 152 may be physically located in memory 138 of FIG. 1, on disk 140, on tape 142, or distributed over these devices or other storage devices not shown. 
     IDES 154 is also logically connected to parameters 156. These may, for example, be entered from keyboard 148, of FIG. 1, or retrieved from data files on disk 140 or tape 142. Parameters 156 includes, for example, information for categorizing the machining operation, such as, tool size, work piece material, drill feed rate, and drill speed. 
     The operation of machine 90 and IDES 154 consists of the following phases: 
     1. An experimental phase in which the drilling operation is carried out and sensor measurements are taken at regular intervals throughout the life of the tool. Furthermore, the point at which the drill has been worn out, i.e., its life has been expended, is noted. As each hole is drilled its number is noted and each data point is indexed by it. Similarly, the point at which the tool is deemed to have been worn out is also noted by hole number. This experimental data is later used to build knowledge base 152 for both tool life prediction and tool wear diagnosis. The knowledge base 152 may be stored on disk 140 or tape 142. 
     Both raw sensor data and quantities computed from the raw sensor data are used in both tool life prediction and tool wear diagnosis. The manner in which the computed quantities are derived from the raw sensor data is discussed in greater detail below. The raw sensor data and the computed quantities are collectively called features. 
     2. A training phase, in which the knowledge base is built and fine-tuned consists of two distinct aspects: first, building the knowledge base for accurate prediction of tool life and, second, the knowledge base for the diagnosis of tool wear. Certain portions of the training phase are automated by using the Dynamic Distance Classifier algorithm described below. 
     3. An operations phase in which IDES 154, utilizing the knowledge base which was built during the training phase, predicts tool life and monitors tool wear. 
     Thus, the goal is to build a knowledge base which an IDES 154 uses to predict tool life and to monitor drill wear. The training phase is more easily understood if the operations phase is considered first. 
     OPERATIONS PHASE 
     FIG. 3 is a flow chart showing the operation of a computer aided manufacturing operation according to the present invention. A drilling operation starts at Step 601. In conjunction with the drilling, measurements are taken from the various sensors used in the Influence Diagram to predict tool life. Early in the operation, for example after three holes, the features are computed, Step 603. These features are used by IDES 154 to predict the life of drill 100, Step 605. 
     If the prediction is that the tool will have a long life (Step 607), the machine continues drilling until the tool&#39;s predicted mid-life, Step 609. At which point, a verification procedure is invoked. If the earlier prediction of a long life is verified the drilling continues until the end of the predicted life of the tool, Step 615. At that point sensor data is collected and features computed for the next three holes, Step 619. The process cycles back to predicting the remaining life of the drill, Step 605. 
     During the time between prediction of a &#34;long life&#34; (Steps 605 and 607) and the verification at mid-life (Step 609) computer 134 does not process data from machine 90. Thus, during that time, computer 134 is available for other tasks, for example, servicing other machines attached to it. 
     If a long life is not predicted in Step 605, or if a predicted long life is not verified at the predicted mid-life in Step 609, then a replacement tool is obtained, Step 613. One embodiment is represented by the dashed path from Step 613 to Step 623. Drilling continues until the predicted end of the life of the tool, Step 625. The tool is replaced at the point at which IDES 154 has predicted that the tool&#39;s life ends, Step 625. 
     An alternative embodiment is indicated by the solid path emanating from Step 613. Because it is desirable to never use a tool beyond the point at which it is worn out, the tool life prediction is adjusted to be a conservative estimate. For that reason, tools which have not worn out may have been predicted as worn out. Rather than discarding such tools, the embodiment represented by the path through Steps 613, 617, and 619, provides a method for using the sensors 114, 118, 122, 126, and 128, to diagnose the tool for wear. Thus, IDES 154 continuously monitors the sensors and diagnoses tool wear, Step 617, and drilling continues, Step 621, until IDES 154 diagnoses the end of the life of the tool, Step 621. When the tool has been expended the tool is replaced, Step 623. The entire operation starts over with the fresh drill at Step 601. 
     The method described above in conjunction with FIG. 3 may be implemented to be executed on computer system 134. One embodiment has a functional module to compute features from the raw sensor data (Step 603), a functional module each for the tool life prediction (Step 605), the verification of the prediction (Step 609), and the tool wear diagnostics (Steps 617 and 621). 
     TRAINING PHASE 
     FIG. 4 shows the relationship of the training phase for tool life prediction to the operation of the IDES 154 and the automated manufacturing system shown in FIG. 1. A similar approach is used for training the system for tool wear diagnosis. 
     The training operation may be divided functionally into two major categories: off-line knowledge base generation and on-line tool-life prediction. The off-line task generates the qualitative and the quantitative knowledge base for the influence diagram model of the drilling process. The knowledge base is used by the real-time system for on-line prediction of tool-life and tool wear diagnostics. The input to the system are the multi-sensor raw data and the cutting tool wear measurements collected during the experimental phase as well as the machining category. The term &#34;machining category&#34; represents the combinations of machining parameters that are used for collecting the training data. When the machining parameters vary considerably, the sensor features also vary widely. Hence, without any knowledge about the machining conditions and with just the sensory data it is difficult to establish a diagnostic mapping between the sensory features and the cutting tool state. Subsequently, the knowledge engineer divides the broad spectrum of machining conditions into several categories such that each category represents the machining parameters that resemble close to each other. An example of machining categories is given in Table 1. 
     
                       TABLE 1                                                     
______________________________________                                    
Categorization of Widely Varying Machining Conditions                     
        Workpiece  Drill     Speed   Feedrate                             
Category                                                                  
        material   size/type (rpm)   (inch/rev.)                          
______________________________________                                    
0       Ductile cast                                                      
                   0.25&#34;     1100-1400                                    
                                     0.006-0.011                          
        iron       Tungsten                                               
1       Ductile cast                                                      
                   0.25&#34;     1600-2000                                    
                                     0.003-0.006                          
        iron       Tungsten                                               
2       A36 steel  0.25&#34; High                                             
                             3600-3900                                    
                                     0.002-0.004                          
                   Speed Steel                                            
3       A36 steel  0.25&#34; High                                             
                             2300-2700                                    
                                     0.002-0.004                          
                   Speed Steel                                            
4       A36 steel  0.25&#34; High                                             
                             2300-2700                                    
                                     0.008-0.010                          
                   Speed Steel                                            
5       A36 steel  0.125&#34; High                                            
                             3700-4000                                    
                                     0.006-0.007                          
                   Speed Steel                                            
6       A36 steel  0.125&#34; High                                            
                             3700-4000                                    
                                     0.009-0.010                          
                   Speed Steel                                            
7       A36 steel  0.125&#34; High                                            
                             2900-3100                                    
                                     0.009-0.010                          
                   Speed Steel                                            
______________________________________                                    
 
    
     The knowledge base generation is divided into several subtasks: feature selection, building the relational structure, determining feature state descriptors, and subjective estimation of the conditional probability distributions. 
     1. Feature Selection 
     In FIG. 1, the spindle motor current sensor 114 is an AC current sensor. It is a noninvasive induction sensor that is simply clipped around the input power line. The AC current sensor output is rectified and low pass filtered in order to acquire low frequency energy of the sensor signal. This energy is directly proportional to the cutting torque exerted by the tool on the work piece. As the tool wears, the cutting force experienced by the tool increases. This increase in cutting force causes a corresponding increase in spindle motor current. The RMS value of spindle motor current thus becomes a valuable feature for observing the trend in tool wear during the initial phase of drilling. 
     In addition to the RMS value, the change in RMS value compared to a fresh tool (ΔRMS) is a useful feature as it indicates the temporal trend of the cutting torque. A faster rate of change indicates a rapid wear and hence shorter tool life. 
     Another valuable source of information about the drilling process is the spindle mounted strain gage 122. It indicates the thrust force exerted by the tool 100 on the work piece 102. As the tool 100 wears, the thrust forces increase due to a constant feed rate and an increase in energy required to penetrate the work piece 102. The actual value used is the mean of the strain gage force during the drilling of one hole. 
     Furthermore, as in the case of the spindle motor current sensor 114, the raw value (the mean) as well as its incremental change from a fresh tool (Δmean) are used to predict the tool life. 
     In the preferred embodiment the features extracted from the measurements of the spindle motor current sensor 114 and the strain gage sensor 122 are used to predict tool life and to continuously diagnose tool wear at the end of the predicted life of the tool. However, in an alternative embodiment other sensors, for example the feed motor current sensor 110, the accelerometer 128, and the dynamometer 124, are used either in lieu of or in conjunction with either the spindle motor current sensor 114 or the strain gage sensor 122. 
     2. Building the Relational Structure 
     An Influence Diagram Expert System (IDES) is an expert system in which relationships between variables are qualitatively and quantitatively represented and manipulated to arrive at some decision. An influence diagram, i.e., the relational structure, which is a graphical network and theoretical structure for knowledge, provides probabilistic inference and expected value decisions, and has two hierarchical levels: symbolic and quantitative. At the symbolic level, an influence diagram consists of an acyclic directed network with nodes representing relevant system state variables and the arcs representing state variable interrelationships. For example, the diagram in FIG. 5 is a simple influence diagram which schematically shows the probabilistic influence three variables, RMS, ΔRMS, and category, have on the state of a cutting tool (wear1). At the quantitative level the mapping between the relevant states are represented by discrete conditional probability density functions. For example, in the sample influence diagram in FIG. 5, node 3 would be quantitatively represented by the conditional probability {wear1|RMS, ΔRMS, category}. Also, in a general model, the root nodes 1, 2, and 3 are quantitatively represented by their respective marginal probabilities. However, when the influence diagram technique is used in a real-time paradigm, they are represented by uniform distributions. A diagnostic inference, for example, the marginal probability of the cutting tool being worn, results from a set of transformations applied to the diagram in response to a specific query. The topological structure remaining after the set of transformations represents the answer to the query in symbolic form. At the quantitative level, these transformations would provide the answer to the query in numerical form. Three types of transformations used in this reduction process are Sensor Node Removal (table look-up operation), State Node Removal (applying summation rule of probability) and Arc Reversal (applying Bayes&#39;  rule). Once diagnostic inference has evaluated the likelihood of critical events, the best course of action must be determined. 
     FIG. 6 is an influence diagram for predicting tool life in the preferred embodiment. Verification uses an influence diagram with the same topology. However, at the numerical level, the state space of each feature and the subjective estimates of the probability distributions are different for different phases. Hence, the portion of the knowledge base corresponding to the influence diagram for the verification phase is different from the corresponding portion of the prediction phase. 
     The features Δrms and rms from the spindle motor current sensor influence the life1 variable, an intermediate node in the influence diagram, strain gage force features Δmean and mean influence the life2 variable, and machining parameters speed, feed, work-piece material and tool size influence the class variable. The latter is not a probabilistic influence but rather a categorization. An example categorization based on these particular parameters is shown in Table 1. However, other categorizations are possible. The class variable also influences the life1 and life2 variables. The range of values for life1 and life2 is &#34;long life&#34; or &#34;short life.&#34; Thus, given particular values of each feature, for example rms and Δrms, both values together indicate with a particular conditional probability that the value of life1 is &#34;long life.&#34; 
     Finally, life1 and life2 influence the life variable, which is an output node in the influence diagram. The values available for the life variable is &#34;long life&#34; and &#34;short life&#34;. Both of which are values dependent on the type of tool in question. For example, for 0.25&#34; drills, based on experimental results, &#34;long life&#34; is defined as 100 holes and &#34;short life&#34; as 10 holes, and similarly for 0.125&#34; drills, &#34;long life&#34; corresponds to 50 holes and &#34;short life&#34; to 7 holes. However, in alternative embodiments these definitions may be different. 
     3. Determining Feature State Descriptors 
     The quantitative level of the influence diagram, as part of knowledge base 152, each node is divided into many states depending on the range of values, symbolic or numerical, the variable can take. The values that divide the range into many states are referred to as the state descriptors. The number of states varies. For example, for the life node 423, the life1 node 417, and the life2 node 419, there are two states &#34;long life&#34; and &#34;short life.&#34; The class node 421, has as many states as the total number of categories, e.g., eight in the case of Table 1. In one embodiment, using the categories in Table 1, node 415 has &#34;0.25-inch&#34; and &#34;0.125-inch&#34; states, and node 413 has the states &#34;steel&#34; and &#34;cast iron.&#34; Thus, the states for nodes 423, 417, 419, 415 and 413, are all qualitative. The remaining nodes in FIG. 6 have state descriptors defined by quantitative intervals. The states for nodes 409 and 411 are obtained by dividing the normal operating ranges of speeds and feeds respectively, over as many intervals as needed to uniquely define each category in Table 1. For node 411, and Table 1, a state 0 represents feed rate less than 0.008 ipr, and a state 1 represents feed rates greater than or equal to 0.008 ipr. Similarly, in the case of node 409, a state 0 is defined by drill speeds less than 3200 rpm, and a state 1 is defined as speeds greater than or equal to 3200 rpm. In the case of feature nodes 401 through 407 the state descriptors are decided by analyzing and correlating the raw experimental data with the actual life for the tool for all the categories. 
     FIG. 7 is an illustration of raw data collected for two category 5 cases. It illustrates how to obtain the decision boundaries associated with the RMS feature. Thus, the figure represents a specific feature, RMS, of node 403, and a specific category, category 5. The experimental data may be plotted in similar graphs for other features and categories. In FIG. 7, the RMS feature of spindle current signal for both drills is plotted as a function of number of holes drilled. Each point in the graph represents the RMS value for signals collected for one hole. The vertical dotted lines (labeled &#34;Drill #1 Worn&#34; and &#34;Drill #2 Worn&#34;, respectively) indicate the hole number at which the drills were actually declared as worn by wear measurement criterion. This hole will be referred to as the &#34;wear hole.&#34; The circles to the left of vertical line for drill #1 belong to the good tool condition and ones to the right belong to the worn tool condition for drill #1. Similarly drill #2 is represented by plus symbols. Note that the life of Drill #1 is a &#34;long life&#34; whereas the life of Drill #2 is a &#34;short life.&#34; The objective is to select one threshold (horizontal line called decision boundary) value that separates the &#34;long life&#34; state from the &#34;short life&#34;  state for both the drills. For the prediction phase the average RMS value for the first three holes is used. Thus, the decision boundary for the prediction phase (labeled a) is selected so that the average RMS value for the first three holes will indicate whether a &#34;long life&#34; is indicated or not. In the example of FIG. 7 the average RMS for the first three holes of Drill #1 is approximately 0.45 and the average RMS for the first three holes of Drill #2 is approximately 0.36, therefore the selected decision boundary for RMS for Category #5 drills is 0.4. Similar analysis is done for the verification phase. However, in the case of verification the maximum feature values for the drills up to the mid-life is used rather than the average for the first three holes. In the case of Drill #1 the max value is 0.59, as indicated by the boxed ring. The max value for Drill #2 is 0.5. Therefore, the selected decision boundary for the verification phase for RMS for category #5 drills is 0.57. 
     The decision boundaries for all features and all categories is done in the same manner as explained above for RMS and category #5. Thus, a quantitative knowledge base of decision boundaries is built. 
     4. Subjective estimation of the conditional probability distributions. 
     The next step is to assign marginal probabilities associated with the decision boundaries. The marginal probability for a given feature and category is a subjective evaluation on the part of the knowledge engineer. It indicates the probability that the decision boundary accurately predicts &#34;long life.&#34; 
     Having assigned the marginal probabilities for all feature nodes 401 through 407, the knowledge engineer determines conditional probabilities for the intermediate nodes 417 and 419. The class node, node 421, representing machining category, is assigned a binary deterministic conditional distribution (0 or 1) given any element of its conditional cross product space consisting of all the combinations of states of the predecessor nodes 409 through 415. 
     Using node 417 as an example, for each of the predecessor features rms (node 403) and Δrms (node 401) a subjective weight on a scale of 0 to 1 is assigned based on how well each decision boundary separated the &#34;short life&#34; from the &#34;long life&#34; states of all the categories. Let these weights be w 403  and w 401  for rms and Δrms, respectively. For each category, critical states are identified for nodes 401 and 403, below which the feature values correspond to the &#34;long life&#34; state and above which the feature values correspond to the &#34;short life&#34; state. For some category c, let s 403  and s 401  be the critical states for nodes 403 and 401 respectively. Let Ω 403  and Ω 401  be the state spaces for nodes 403 and 401 respectively. The conditional probability assessment is made as follows. 
     For category c, the conditional probability, P, that the node 417 is in &#34;short life&#34; for (i×j)   Ω 403  ×Ω 401  ##EQU1## where 
     
         Q=(i+j+s.sub.403 -s.sub.401 +1) 
    
     and Δ 1 , Δ 2 , and Δ 3  are smoothing factors that gradually change the conditional probabilities in discrete steps as the features&#39; states gradually change from those corresponding to a drill with a short life to those corresponding to a drill with a long life. They typically assume values ranging from 0.05 to 0.1, and are chosen subjectively. All these subjective quantities are different for different categories and this procedure is repeated for all the categories. While tuning the knowledge base, they are iteratively updated until the system responds correctly for the training data. Typically no more than five iterations are necessary. The equations above are heuristic, and a person skilled in the art will realize other possible equations. 
     As to the training phase with respect to tool wear diagnosis, FIG. 8 shows the topology of the influence diagram used by IDES 154 during the continuous diagnosis of drill wear in Step 617, of FIG. 3. A comparison with FIG. 6 indicates the similarity between the influence diagram for tool life prediction and tool wear diagnosis that takes place at the end of the predicted life of the tool. However, interior and output nodes differ. In the tool wear diagnosis influence diagram, the features derived from the spindle motor current influence the wear1 variable and those derived from the strain gage force influence the wear2 variable. Those intermediate nodes influence the output node, wear. The values for wear1, wear2 and wear are &#34;Fresh drill&#34; and &#34;Worn drill.&#34; Furthermore, at the numerical level, the decision boundaries and probabilities differ from the influence diagrams associated with tool life prediction. 
     In the case of tool life prediction discussed above the knowledge base is manually built by a knowledge engineer. The knowledge base for the continuous diagnosis of tool wear (of Step 621 of FIG. 3) is automatically created using a dynamic distance classifier. FIG. 9 shows the relationship of the dynamic distance classifier to the total operation of the computer aided manufacturing system having an influence diagram expert system. 
     The dynamic distance classifier generates the decision boundaries between the fresh and worn tool classes as well as the probability of correct classification for each feature. It uses the Euclidian distance between the sample points and the mean of each class as the measure for classification. It bears the name &#34;dynamic&#34; due to an iterative update of the fresh tool class mean based on a new separability criterion defined below. The method is generic in that it is applicable to drilling as well as other machining operations, for example milling or turning. Furthermore, applications outside of the computer aided manufacturing environment will be apparent to a person skilled in the art. 
     The method assumes that the data is collected at regular intervals for a short period of time and the sample points, classified based on some tool wear criteria, represent a time history of the state of the tool. This assumption is not a restriction but is in-line with the true situation in a machining environment. 
     1. Nomenclature 
     The variables used in the method are defined as follows: 
     C 0  --Fresh cutting tool class 
     C 1  --Worn cutting tool class 
     d--Decision boundary 
     w--Actual sample # that divides classes 
     T--Tolerance zone, in terms of number of samples, about w (e.g., T={4,5,6,7} given w=5) 
     w min  --Minimum of i for all i   T (e.g., w min  =4 given T={4,5,6,7}) 
     x--Feature under evaluation for its classification capability 
     x i  --Value of x at i th  sample 
     g i  --The feature mean of class C i   
     p--Probability of successful classification for the feature under evaluation 
     2. Separability Condition for Cutting Tool Classes 
     Conventionally, in pattern classification using linear discriminant function F, two classes C 0  and C 1  are separable if 
     
         F(x.sub.i)&lt;0 for all x.sub.1   C.sub.0 and 
    
     
         F(x.sub.i)&gt;0 for all x.sub.i   C.sub.1, 
    
     where x i  denotes the feature value for sample i and the decision boundary d is defined by 
     
         F(d)=0. 
    
     Since it is undesirable to have any fresh tool states to be classified as worn, the condition 
     
         F(x.sub.i)&lt;0 for all x.sub.i   C.sub.0 
    
     is a requirement for correct classification. After w samples the tool is defined as worn based on some wear criterion. For conventional separability, the classifier diagnoses the tool to be worn for each sample collected beyond the w th  sample. However, in case of robust diagnosis, at the first instance of wear diagnosis, a decision would have been made; either to replace the cutting tool or continue operation in degraded mode, depending on the economics of that particular machining operation. Hence it is sufficient that there exists just one correct classification of the worn drill within a tolerance zone (T) of a few samples about the actual worn tool sample w. The tolerance zone T may consist of a few fresh tool samples before the worn tool sample w (as indicated in the definition of T). Consequently, fresh and worn tool classes are defined as separable if 
     1. F(x i )&lt;0 for all x i    C 0  and 
     2. there exists i   T such that F(x i )&gt;0, i.e., x i    C 1   
     This relaxed but adequate separability condition simplifies the search for a decision boundary that would provide robust classification. For each individual feature, this decision boundary is nothing but a point. This one dimensional search for the decision boundary is considerably faster than the search for the n-dimensional decision surface where the features are arranged into an n-dimensional vector. 
     3. Classifier Method 
     The following pseudocode determines the decision boundary and the marginal probability for each feature. 
     
         ______________________________________                                    
For (x = Feature(1) to Feature(n) )                                       
______________________________________                                    
Begin For loop 1                                                          
(1) Compute mean of each class (g.sub.j ; j = 0,1).                       
(2) If (g.sub.0 ≧ g.sub.1) then return (p = 0) and exit.           
(3) For (i = First sample to Last sample)                                 
    Do classification using decision rule,                                
     x.sub.1   C.sub.k if |x.sub.i - g.sub.k | = min    
    |x.sub.i - g.sub.j |, j = 0,1                       
(4) If (x.sub.i   C.sub.0 for all i   T) then return (p = 0) and exit.    
(5) If (x.sub.i   C.sub.0 for all i &lt; w.sub.min) and                      
      (there exists i   T such that x.sub.i   C.sub.1) then               
     ##STR1##                                                             
(6) While ( there exist i   T such that x.sub.i   C.sub.i)                
       and (there exists i   T such that x.sub.i   C.sub.1)               
    BEGIN While                                                           
     ##STR2##                                                             
     ##STR3##                                                             
        where s =  S ,                                                    
         S = {x.sub.i     C.sub.1 for all i &lt; w.sub.min }                 
     ##STR4##                                                             
        where x.sub.i   C.sub.1 for all i &lt; w.sub.min                     
      If (g.sub.0 ≧ g.sub.1) then exit While loop.                 
      Repeat step (3) only.                                               
    END While                                                             
(7) If (x.sub.i   C.sub.0 for all i &lt; w.sub.min) and (there exists i   T  
      such that x.sub.i   C.sub.1 then                                    
     ##STR5##                                                             
      else return (d,p) and exit.                                         
END For loop 1                                                            
______________________________________                                    
 
    
     Thus, the dynamic distance classifier computes decision boundaries (d) and their associated probabilities for correct classification (p) for each feature under consideration. The dynamic distance classifier relies on a predetermined tolerance zone T, for timely diagnosis of tool wear, and the fact that samples are sequential in time, to minimize the generation of false alarms. A false alarm is a diagnosis of a tool as being worn that is made while the tool is still good, i.e., before the tolerance zone. In step 6, by iteratively updating the relevant parameters until the condition terminating the While loop has been satisfied, false alarms are avoided. Furthermore, p is weighted by s, the number of false alarms. 
     Returning to FIG. 9, the heuristic rules for computing the conditional probabilities when using the dynamic distance classifier differ from those described above with respect to tool life prediction and verification of tool life prediction. The decision boundaries generated by the dynamic classifier are assigned as the state boundaries for each feature node. Using the marginal probability of correct classification for each feature, some heuristic rules are used to automatically generate the overall knowledge base for the real-time expert system. In the influence diagram of FIG. 8, for the rms node 803, the decision boundaries for each category 0 to c, be denoted by a 1  . . . a n , where n≦c+1, and the corresponding marginal probabilities for correct classification is denoted by r 1  . . . r n  (n can be less than c+1, because the decision boundaries of some the categories may be made to coincide if they lie close to each other. Similarly, b 1  . . . b n  and r 1  . . . r n  denote the decision boundaries and marginal probabilities for the Δrms node 801. The node rms 803 is divided into n+1 states and the node Δrms is divided into m+1 states. For example, node 803 is in state 0 if x&lt;a 1 , in state 1 if a 1  ≦x≦a 2 , . . . in state n if x≧a n , where x is the rms feature value. The node 821 is in state 0 if the machining parameters correspond to category 0, . . . , state c if the category is c. Also, the wear1 node 817 is divided into two states, state 0 for a fresh tool and state 1 for a worn tool. If k is the state of the category node 821, the critical state corresponding to the decision boundary and probability for the rms feature are k1 and r k1 , respectively, and for Δrms, k2 and s k2 . 
     Based on the above definitions, for each point (x x y) in the conditional cross-product space (Ω 803  ×Ω 801 ) of nodes 803 and 801, where x and y denote respectively the current state of nodes 803 and 801, the following heuristic rules are used to compute the conditional probability that the wear1 node is in state 1, i.e., worn tool state. 
     Conditional probability that node wear1 817 is in &#34;worn drill&#34; state for (x x y)   (Ω 803  ×Ω 801 ) ##EQU2## 
     If the computed quantities using the above equations lie beyond [0,1], then the corresponding limit values are substituted for the conditional probabilities. Also, the above formulation can be extended to include more than three nodes as the predecessors of the result nodes like wear1 817. 
     Returning to FIG. 9, the dynamic distance classifier computes the decision boundaries and probabilities for correct classification. The latter are used in the heuristic rules described above to generate the conditional probabilities. These, combined with the decision boundaries and the relational structure, e.g., the influence diagram shown in FIG. 8, are used to automatically generate the knowledge base. This step consists of writing the required information into the format for the knowledge base structure the Influence Diagram Expert System 154 expects. The generated knowledge base is used according to the method described above with respect to FIGS. 2 and 3. 
     While this invention has been described with reference to illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications and combinations of the illustrative embodiments, as well as other embodiments of the invention, will be apparent to persons skilled in the art upon reference to the description. It is therefore intended that the appended claims encompass any such modifications or embodiments.