MSU LIBRARIES RETURNING MATERIALS: P1ace in book drop to remove this checkout from .—_‘—. your record. FINES wiH be charged if book is ' returned after the date stamped below. 4” . Li 9 . , Uwz'jemv - V 'ALMOST' REAL-TIME DIAGNOSIS AND CORRECTION OF MANUFACTURING SCRAP USING AN EXPERT SYSTEM BY David Raymond Chesney A THESIS Submitted to Michigan State University in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE Department of Mechanical Engineering 1987 ABSTRACT 'ALMOST' REAL-TIME DIAGNOSIS AND CORRECTION OF MANUFACTURING SCRAP USING AN EXPERT SYSTEM BY David Raymond Chesney Findings are presented on an expert system that uses both operator and transducer inputs in 'almost' real-time to diagnose scrap type and recommend corrective action to reduce/eliminate further production of this scrap type. During the development of the expert system, equal consideration was given to system logic, implementation in a manufacturing environment, and knowledge acquisition. The system is applied to a specific manufacturing process; however, the ideas are applicable to a wide range of problems in a production environment. This thesis is dedicated to my grandparents: John, Sylvia, Alfred, and Ellen; because they give history. It is also dedicated to my nephews: Kyle and Kent; because they are the future. iii ACKNOWLEDGEMENTS The following people deserve kudos and salutations for their assistance to this thesis: Mike Rieke, for his continuous interest and curiosity about the system. He easily found both strengths and weaknesses in the expert system. He encouraged me to develop, and therefore better understand, the expert system's strengths. And, he pointed out the weaknesses so that I might find a better way. Thanks also to Erik Goodman and Carl Page for their guidance and assistance as committee members. Their insights and thoughts continually aided me in the development of this project. There are three ingredients to an expert system of this type: control experts, domain experts, and me, the knowledge engineer. If any of the triad are missing than the system will not work. Thanks go to Mark Hunt and John Raymond, control experts. Their constant effort and belief in the expert system made it possible. Also, the experts deserve thanks. Especially, John iv Douro, Jimmy Compeau, and Mark Brodfuehrer. Their thorough technical and common sense understanding of the manufacturing process made the knowledge base in the expert system complete and valuable. Dr.'s Abdul Esfahanian, and Mihran Tuceryan for their direct and indirect ideas which applied to the expert system. Thanks to the many authors of the many papers I have read, for little clues which added up to the big picture. My parents Dale and Bev, my brothers and sister-in-laws Dale, Nanette, Doug, and Julie for keeping the faith and keeping me smiling. Jean, 51 caring friend. writing and recieving letters from her provided a necessary link to complete this research. Her sense of humor, intelligence, and creativity kept me going through some particularly difficult times. And, for that I am forever in her debt. My friends Dave L., Scot, Hushk, Fridge, Jorg, Yogi, Jeff, JO, Jane, Dave M., Ace, DPH, and others I have forgotten to mention for sharing in the struggle of higher education, and therefore, some of the accomplishment and frustration associated with the journey. And, Penny Pullmain and Marci VanDerwill, for typing and editing the manuscript. TABLE OF CONTENTS LIST OF FIGURE INTRODUCTION CHAPTER 1 - BACKGROUND OF ARTIFICIAL INTELLIGENCE The Tools The Applications History of Expert Systems CHAPTER 2 - ARCHITECTURE AND LOGIC Glossary Input Types Architecture CHAPTER 3 - COMPONENTRY AND INTERFACES Process Familiarization Hardware Implementation Hardware Problems CHAPTER 4 - KNOWLEDGE ACQUISITION PROCEDURE Background Development Triad Knowledge Acquisition Procedure CHAPTER 5 - EVALUATION (OR, WILL IT WORK?) Case 1 - Bad Transducer Case 2 Quantitative Trigger, Qualitative Does Not Verify Case 3 - Inexperienced Operator Case 4 - Experienced Operator Levels of Expertise Summary APPENDIX A - ID-3 Algorithm LIST OF REFERENCES vi vii same» 13 15 20 26 39 39 41 45 48 48 50 54 56 58 61 64 71 77 78 80 85 LIST OF FIGURES Waltz's Blocks Example of Global Definition of Forward and Backward Chains Forward and Backward Chains Using lstClass Example of Forward and Backward Chains Using lstClass Example of Quality Rating Table Expert System 1, Blackboard, and Expert System 2 Triggering Methods Quantitative Trigger Inexperienced Qualitative Trigger Experienced Qualitative Trigger Hardware Configuration vii 17 19 19 25 28 31 34 35 36 46 INTRODUCTION Artificial Intelligence, in simple terms, is the application of computers that in some way simulates human thought or information processing. There are numerous approaches to AI. A philosopher or psychologist might ask "What is thought?", while an engineer might ask "How can some area of intelligence or knowledge be algorithmically simulated?" Any reasonable solutions to the above questions could, at best, be general enough to apply to a wide range of similar applications, and would necessarily be refined to apply to a more specific domain. This is a top-down approach from a general to a specific approach. The research for the expert system described in this thesis, however, is just the opposite - a bottom-up approach. The expert system will analyze and recommend corrective action for a specific manufacturing process, but the ideas have wide use in the more general AI arena. Expert systems are an area of artificial intelligence in which the knowledge of an expert in a specific subject domain is recorded in computer software. The system is used to aid 1 and educate non-experts in arriving at logical conclusions similar to those of an expert. The specific expert system discussed in this thesis diagnoses and recommends corrective action to reduce and/or eliminate scrap production for the lost foam pattern molding process. The expert system bases its decisions on both quantitative and qualitative inputs and operates in 'almost' real—time. The long term intent is for the expert system to maintain on—line control to eliminate scrap before it is produced. The lost foam process is a metal casting process in which expanded polystyrene foam patterns (positives) are inserted in a metal box containing dry unbonded sand which is subsequently compacted by vibration. The polystyrene is vaporized when molten metal is introduced. The internal gas pressure from the decomposing foam maintains the shape of the exterior of the pattern until metal solidification is complete; thus the casting is a duplicate of the polystyrene it displaces. This expert system works on the pattern molding phase of the lost foam casting process. Pattern molding is the production of the polystyrene patterns which ‘will be assembled and eventually vaporized. Pattern molding is a fifteen-step manufacturing process with a pdethora of process variables. Briefly stated, pre-expanded polystyrene beads are blown into a preheated die cavity. Application of steam. over time allows the beads to fuse together in the shape of the cavity. Next, the foam pattern is cooled by conduction through the water-cooled die. Finally, the pattern is removed from the die after it has cooled enough to stabilize dimensionally. The entire process typically‘ requires approximately sixty seconds. Pattern molding is an ideal application for an expert system since it requires considerable expertise critical to producing quality castings. The efficiency of the lost foam casting process will be greatly enhanced if pattern scrap can be diagnosed, corrected, and eventually preventd during the foam pattern molding operation. The thesis is organized as follows: Chapter 1 is a brief description of current artificial intelligence technology. Also included in this chapter is a summarized history of the most widely accepted area of artificial intelligence -- expert systems. Chapter 2 is a discussion of the expert system architecture and logic. Also included in this chapter is a glossary of related terms and a discussion of input data types for the expert system. Chapter 3 is a discussion of the expert system component implementation, installation, and debugging in the manufacturing environment. Chapter 4 is a discussion of the manpower requirements for the development of the expert system. The triad of expertise and the steps involved in knowledge acquisition are discussed. Chapter 5 is an evaluation of the expert system using simulated case studies. Four examples, each showing a different strength of the expert system, will demonstrate the utility of the system. Through, research and studies, Artificial Intelligence has presented itself an; an expansive, nebulous discipline. Any research in AI furthers and better defines the science in general, as well as improving the quality and quantity of the specific application. CHAPTER 1 - BACKGROUND OF ARTIFICIAL INTELLIGENCE Before any discussion of the expert system developed in this thesis, it is prerequisite to understand some major concepts used in artificial intelligence. Also, as an aid in understanding, the history of early significant expert systems will be discussed. When discussing the history of artificial intelligence the names Ballard & Brown, Feigenbaum, Minsky, Newell, Schank, and Winston are often mentioned. Landmark projects, such as DENDRAL, MYCIN, and Waltz's constraint propagation have furthered the art of AI, as well as shown the potential for other areas of research. The expert system discussed in this thesis does not depend too strongly on any individual or theory, but rather fuses applicable ideas from many different authors and ideas. In ”Artificial Intelligence, Second Edition," Winston [1] divides artificial intelligence into the following areas of research: 1. representation schemes; 2. search strategies; 3. constraint propagation; 4. vision; 5. natural language understanding; 6. theorem proving ; and 7. expert systems. Representation, search, and constraint propagation are techniques or tools which are applied to the later' mentioned areas. Vision, natural language, theorem 5 proving, and expert systems, although sciences in their own right, use ‘the "tools" for' accurate and. efficient system design. A simple analogy is a builder who needs a good hammer (representation scheme) to quickly and accurately construct a house (expert system). A good representation scheme is critical for knowledge representation in an expert system, but not vice-versa. The Tools Representation schemes are methods by which the knowledge is represented and/or stored. Winston [1] defines representation as "a set of syntactic and semantic conventions that make it possible to describe things." The knowledge is divided into two types: formal and common sense. Formal knowledge is written or recorded knowledge. Common sense knowledge is heuristic, or rule-of-thumb knowledge. The knowledge representation must have certain traits that allow the knowledge to be usable and accessible. Some of the traits are: the scheme must contain a complete set of knowledge in the subject domain; the full set of knowledge must be concisely stored; natural constraints of the system, or of science, must be exposed (example: a steam thermocouple reading below 212 deg F at atmospheric pressure would indicate no steam since the vaporization temperature of water is 212 deg F); explicit rules must be correctly prioritized; implied, rule-of—thumb, and heuristic rules must be made explicit; 'long-shot' possibilities must be deprioritized and yet still be included in the representation; the representation scheme must be transparent to the end user; and it must work well with computers. Some classical examples of representation schemes are semantic nets, frames (Minsky, Schank), and primitives. Searches are methods of travel between a source and a goal. Searches are sequential in nature and can be classified as either uneducated, educated, or adversarial. Uneducated searches base the search upon an established search algorithm without consideration or knowledge of the domain. Uneducated searches are also described as blind searches. Some examples of uneducated search strategies are depth first, breadth first, and beam search. Educated searches are searches in which the next path followed is determined by some weighting factor based upon the subject domain. In other words, all paths are considered and the path with the greatest possibility of being correct is chosen as the next path to be explored. Examples of educated search strategies are A-star, dynamic search techniques, and branch and bound searches. The last type of search is adversarial. The objective of adversarial search is not necessarily to arrive at the goal quicker; rather, it is to beat an opponent. Some examples of adversarial searches are minimax and alpha-beta pruning. Constraint propagation is the exploitation of limitations in a domain caused by the domain itself, or by nature. The best way to describe constraint propagation is with examples. An example of nature-based constraint propagation is the thermocouple mentioned above. An example of domain-dependent constraint propagation is Waltz's three-face vertex world. Winston [1] describes the significance of Waltz's idea using figure 1.1 as follows: The main problem is to determine which lines are boundary lines that separate objects. We find that boundary, convex, concave, shadow, and crack lines come together at junctions in only a few ways. Then we see that this restriction on junction combinations determines the proper physical interpretation for each line in a drawing. Once correct line interpretations are know, it is easy to use known boundary lines to divide the drawing into objects. Along the way, we will see that some impossible drawings can be detected because there is no way to interpret all the lines consistently. In other words, we use what is known about possible interfaces between objects in the real world to come up with the correct interpretations of the two-dimensional image. In general, constraint propagation can greatly reduce the amount of search space by limiting the search paths. The Applications Vision, or image understanding, involves three areas: seeing, translating, and recognizing or interpreting. Seeing is a hardware problem and can involve cameras and stereoscopy. Next, the image has to be translated into some representation scheme that can be processed by the computer. Figure 1.1: Waltz's Blocks 10 Recognition is the final and most complex step in the vision algorithm. Recognition involves determining what the object is once its shape has been translated. Natural language understanding is the correct interpretation of the many ambiguities of the written or spoken word. Natural language understanding can be broken into three steps: first, parsimg the the sentences into their syntactical breakings (the sentence trees we all did in grade school) ; second, furthering the understanding by thematic-role-frame or semantic understanding; and last, at the highest level, world model or relational understanding (example: if pi was used in a sentence, the world model would understand that pi equals 3.14). Theorem proving is the exploitation of classical logic techniques (example: modus ponens) to arrive at a desired proof. In this area especially, good search techniques are necessary because of the potential for combinatorial explosion. A strength of theorem and classical logic techniques is that the theories are concise, have been developed through the ages, and are universally understood. A weakness of using this technique is attempting to 'fit' a problem that could more efficiently be solved using another method. Expert systems are the most visible area of artificial intelligence. Briefly, expert. systems involve jprogramming 11 the knowledge of an expert in a limited subject domain into the computer as an aid to nonusers and nonexperts. The rules are typically in if-then form (example: IF cloudy AND humidity is high AND barometric pressure is falling THEN there is a: 85% chance of rain). There are several reasons for the success of expert systems. One reason is that an expert system can be highly profitable to the industry for which it was developed. Successful expert systems have been constructed to find mineral deposits (PROSPECTOR), as well as blood diseases (MYCIN). Another reason for the success of expert systems is that the knowledge of competent and sometimes costly' experts can. be recorded and saved. on a medium available to the masses. History of Expert Systems The first expert systems constructed were similar in design, but very different in function. They typically had very limited domain expertise and were not time dependent, however, they did everything from determining the molecular structure of an unknown compound to diagnosing eye diseases. The following is a brief discussion of the history of some of the more significant expert systems compiled from Hayes-Roth, Waterman, and Lenat [3]. 12 DENDRAL is regarded as the first working expert system. It was developed at Stanford by Buchanan, Mitchell, Feigenbaum, Lederberg, and Lindsay around 1964 to do mass spectographic analysis to infer plausible structures for unknown compounds. Another expert system being developed by Slagle at MIT in 1961 was SAINT. SAINT eventually evolved into MACSYMA with the help of Martin and Fateman in 1971. Its function was to symbolically solve (differential. and. integral. calculus problems. One of the next expert systems developed was MYCIN, which does diagnosis and consultation for infectious blood diseases. This was developed at Stanford in 1972 by Shortcliffe. A domain-independent version was developed in 1979 by vanMelle at Stanford. The domain-independent version, called EMYCIN, was significant because it was the first expert system shell. Other significant expert systems are EXPERT, which evolved into CASNET for the diagnosis and treatment of glaucoma. It was developed circa 1970 by Weiss, Kulikowski, and Safir. And lastly mentioned will be CADUCEUS from Carnegie-Mellon University which was developed by Pople, Myers, and Miller around 1975. It contains approximately 100,000 associations between diseases and symptoms in internal medicine. CHAPTER 2 - ARCHITECTURE AND LOGIC In his paper "Sensor Fusion: The Application of Artificial Intelligence Technology to Process Control," Le Clair [4] defines sensor fusion as: the process of aggregating and understanding data from multiple sensors. Its significance and scope are best realized by considering the capability to be emulated -- human sense processing. Human understanding of the environment is accomplished by combining sights, sounds, touch, etc. Evaluation of these combined sense inputs produces a deeper and more reliable perception of the environment than does evaluation of any single sense or separate evaluation of each of them. Le Clair developed the idea of using multiple outputs from a process to arrive at a correct conclusion. He equated human understanding of the environment using sight, sound, and touch with machine understanding of the environment using sensory inputs such as temperatures, pressures, and rates. By combination of the instrumented sensory inputs a machine can assess the environment much more accurately than with just one sensory type, say temperature. Therefore, the machine can more efficiently and accurately determine the appropriate conclusion or corrective action. Le Clair's approach is an important step in the use of multiple sensory inputs. It must be noted, however, that the ”sensor fusion" discussed in his paper arrives at conclusions 13 14 based upon only measurable, or quantitative type, inputs. An example of this approach in a manufacturing environment is to instrument a production machine and to base control of the machine on transducer and thermocouple outputs. While this form of "sensor fusion" might be sufficient for some applications, another valuable source of inputs is being neglected - namely, the machine operator. The machine operator can answer qualitative questions such as: "What does the product look like?"; and "What does the product feel like?" The operator can also answer questions about machine parameters that can't realistically be instrumented. An example is checking the integrity of tooling vents if there is a large number (say 300) of vents in the tooling. Obviously, it would not be realistic to instrument all of the vents. By using both Le Clair's quantitative "sensor fusion" and the qualitative operator inputs, the most accurate assessment of the environment is possible. The use of all available inputs (quantitative and qualitative) will insure conclusions based upon ”sensor - operator fusion." The expert system discussed in this thesis relies heavily upon ”sensor - operator fusion" (SOF). This chapter will build the SOF theory by first presenting' a prerequisite glossary. Next, the quantitative and qualitative inputs will be further discussed. Third, the architecture, logic, and 15 triggering' for the scrap «diagnosis portion of the expert system will be reviewed. And finally, the strategies for the corrective action portion of the expert system ‘will be discussed. Glossary Rule-based expert systems are expert systems in which the rules are entered in an established rule format, such as IF-THEN rules. An example of a rule from a rule-based expert system is: IF temperature is greater than 50 deg F AND humidity is greater than 90% AND barometric pressure is falling THEN 75% chance of rain Example-based expert systems are expert systems in which the rules are generated. based upon real-world examples. The software in an example-based expert system shell automatically prioritizes and determines the IF-THEN rules. An example of an algorithm that determines rules based upon examples is the ID-3 algorithm which is discussed in Appendix A. Also, an excellent paper on rule generation from data is "Finding Rules In Data” by B. Thompson and W. Thompson [5]. Backward and forward chains: Chaining, in general, is connecting di fferent knowledge bases together . It is the expert system equivalent to structured programming. In the global sense, forward chaining is working from the current 16 state towards the goal state, and backward chaining is working backward from the goal state instead of forward from the initial state. The global use of forward. and. backward. chaining ‘will be explained using Figure 2.1. In the diagram, the prefix "RF" means raw fact, "DP" means deduced fact, and "DR" means deduced recommendation. An expert system using forward chaining would ask the operator for RFl and RF2 first. If both were true, then the expert system would deduce DFl. If either RFl cn:.RF2 were false, then the expert system would ask for the value of RF3. This process would continue until the system could reach either DRl or DR2, or no further motion through the logic circuit was possible Using backward chaining, the system would assume DRl was true. The system would work backwards, seeing that DFl is deduced from RFl and RF2 being true. If either one was false, the system would move to DR2 , etc., assuming it true until it was proven true or false. This process would continue until a DR was found true, or until the search through all of the DR's was exhausted. However, in this application, backward chains are knowledge base modules which are called to answer a specific question and return the answer to the calling knowledge base module. In contrast, forward chains will call another knowledge base when the expert system reaches a result, rather than 17 Figure 2.1: Example of Global Definition of Forward and Backward Chains 18 reporting the answer to the operator. In graphic form, backward chains will be shown as parallel arrows both exiting and returning to the side of a knowledge base, meaning the objectiwe is to go out, get an answer, and return. Forward chains will be shown as arrows coming out of the end of the knowledge base, meaning that control does not return to the calling knowledge base. See figure 2.2. As an example suppose the objective of an expert system was to pick the correct wine for dinner. The specific information (result) desired is the vineyard (Bolla, Gallo), type (Rose, Reisling), and year of the wine. A backward chain, called WINECOLOR, could be called to determine the appropriate color (see figure 2.3), based upon entree and sauce. The control of the expert system is momentarily transferred to WINECOLOR before it returns to WINE. After the wine color is determined, more specific questions are asked to determine the specific vineyard (say Bolla) and type (say Rose). The only needed information is the year. The knowledge base WINE can forward chain into the knowledge base BOLLA-ROSE to determine the year. Note that the expert system does not return to WINE after the correct year for the wine is determined. The expert system shell used for the development of this expert system was lstClass by Programs in Motion. It is an example-based system shell that works very efficiently with forward and backward chaining. l9 Backward Chain Knowledge Base Module Question T lAnswer Originating Forward Chain Knowledge Base > Knowledge Base Module Module Figure 2.2: Forward and Backward Chains Using lstClass Knowledge Base: WINECOLOR What is Red wine color? Originating Knowledge Base: Knowledge Base: BOLLA-ROSE WINE Figure 2.3: Example of Forward and Backward Chains Using lstClass 20 Input Types QUALITATIVE: - Qualitative inputs are classified into two types: those that are truly qualitative in nature and those that are quantitative in nature but can't easily be instrumented. An example of the first type of qualitative input is 'What does the part look like (n: feel like?‘ An example of a qualitative input that can't easily be instrumented is the integrity of tooling vents if there are (say) greater than 300 vents in the tooling. QUANTITATIVE - As mentioned earlier, quantitative inputs are operating parameters that are measured from the manufacturing process using transducers. The quantitative inputs for this application are time, temperature, and pressure. It must be noted that all of the transducer inputs can be measured at varying times in the machine cycle. Therefore, it is possible to obtain values for temperature or pressure at the beginning of the cycle step, or at the end. It is also possible to obtain local or global maximums and minimums. Since time can be measured, it is possible to record rates of changes of temperatures and of pressures. In other words, the expert system has an abundance of data on which to base its decisions. Careful identification of both the critical qualitative and quantitative questions and parameters is necessary: under-identification. will leave the expert system lacking 21 enough information 11) make correct decisions; over- identification of the process may unnecessarily complicate the analysis. Also, another advantage of proper instrumentation. of’ the manufacturing' process is the possibility of yielding a process parameter on which machine control should be based. INPUT DATA INTEGRITY or WHAT'S GRAY, HAS A TRUNK, AND LIVES IN A TREE? - The answer to the riddle used by Brachman [6] is "an elephant, I lied about the tree." The point of the riddle is that a final conclusion will only be as accurate as the facts upon which the conclusion was based. The expert system is basing decisions and branching according to the input data supplied. Suppose the question is asked "Is an object black or white?" and the reply is "black.” The expert system depends on the fact that the object is actually black in future decisions. The expert system must be able to depend upon the integrity of the input data. However, electrical and mechanical measuring systems (transducers) can, and do, fail in harsh environments such as automobile manufacturing. Therefore, some checks should be built into the expert system to insure the integrity of the transducers. The checks can be classified into two types: common sense and error code. Common sense checks are limits that are based on scientific facts. Examples: A thermocouple reading steam temperature 22 would not be expected to read less than 212 deg F (the boiling point of water at atmospheric pressure equal to 1 atm). If the thermocouple read less than 212 deg F then it could be assumed that the thermocouple is malfunctioning. Other examples are a pressure transducer reading a negative value, indicating the transducer is faulty, or a thermocouple reading negative indicating that the connection is backwards. The other type of transducer "check" is an error code. Some transducers and thermocouples have intrinsic error codes. Example: A thermocouple that reads 772 when the thermocouple wire is broken. In many cases the error code limits are built into the transducer. In this particular system, the transducer error code and common sense limits are checked at a higher level in the expert system logic than might seem logical. The reason is because of size limitations of the lstclass software, rather than lack of sound system logic. The transducer data can be used for process analysis after they have been accepted as not exceeding or matching any common sense limits or error code values. The expert system proceeds from this point assuming that the transducers are giving the actual values. LOW AND HIGH ORDER ANALYSIS OF QUANTITATIVE DATA - The quantitative data can be used to determine the ”health" of the process after validation using error code and common sense limits. There are many different levels and types of 23 analysis using the recorded data. If a machine is properly instrumented, it becomes difficult to sort all the data into a usable format. Rather than not having enough data on which to base decisions, the amount of data can be overwhelming and must be sorted and used appropriately. The appropriate first level of process analysis for the expert system is using the recorded quantitative data to determine statistical operating parameters. This analysis is the simplest or lowest form and involves determining means and standard deviations of the process. Windows or limits are determined in which the process is said to be healthy. While the manufacturing process continues to operate within the specified windows the assumption is made that the process is OK. If' any jprocess limits are exceeded then further evaluation is completed. However, after the data are available, there are many higher order types of analyses that could (should) be done. Some possible uses of the data are: Control envelopes (volumes, spaces): As an example, when the steam temperature increases the process need not maintain the same amount of steam pressure. In other words, the values that could be exceeded are represented in a control volume, rather than by a simple control limit. 24 Seasonal variance: the analysis and data could account for and adjust to seasonal variances in the process. Example: the cycle time for the process might be longer in the summer than in the winter. A possible cause for the increase in cooling cycle time is a higher ambient temperature, and therefore higher cooling water temperature. Process-related. quality’ rating: Note that in the first- order analysis discussed above, only simple statistical limits were calculated. No comparisons were made against objective quality ratings. In other words, we recorded data and had only a binary value to compare it against (keep or scrap). To take advantage of the strengths of an example-based expert system shell, the data should be ecompared. and recorded. against. objective quality' ratings, such as a 1 - 5 scale on surface quality. An example is in figure 2.4. An example-based shell can sort the data and determine the cause of the differentiation in the surface quality based on the operating parameters used to create the specific part. In-house quality’ control. programs (SPC, Pre-control): In most manufacturing environments a well—established procedure for process control is already established. If a quality control program is established, the math on which it is based can be built into the expert system. A Z 0.. 15mm EEQLOLZ," mm 100 I25 90 97 150 25 200 0.5 250 0.5 90 1.0 185 0.95 150 0.6 Figure 2.4: Example of Quality Rating Table 26 Architecture This portion of Chapter 2 is a discussion of the architecture of the expert system. The rationale of why it was constructed will be included with the discussion of how it was constructed. An attempt was made to simulate the human thought process when designing the overall architecture of the expert system. The overall objective is to decrease the production of scrap in a manufacturing environment. The human algorithm to solve the problem is first, to determine or diagnose the scrap type, and second, to determine the corrective action to reduce and/or eliminate the scrap. The human thought process might also involve diagnosing' a process deviation. before scrap is produced, but that is beyond the scope of this discussion. The expert system architecture parallels the human thought algorithm. The overall expert system has two major subdivisions, expert system. 1 (E81) and expert system 2 (E82). The objective of the first subdivision (E81) is to interpret the appropriate quantitative and qualitative inputs (sensor - operator fusion) to determine the scrap type. The second subdivision (E82) searches for the specific cause of the scrap and recommends the appropriate corrective action to the operator. E81 and E82 communicate to each other through a "blackboard.” E82 can't be triggered until E81 writes the 27 scrap type to the blackboard. In other words E82 begins where E81 ends. Figure 2.5 is a graphical description of E81, E82, and the blackboard. The following discussions will further explain the logic of both E81 and E82. E81 Triggering - The expert system (E81) can be triggered in one of three ways: 1. By a process parameter exceeding some predetermined limit. 2. By an operator who is inexperienced and/or doesn't know the scrap type. 3. By an operator who is experienced and knows the scrap type. First Method (quantitative) - As earlier discussed, the process limits determined by either the expert system shell software, or higher-order analysis can be used as a quantitative trigger of the expert system. Through some hardware scheme (see Chapter 3) the current-cycle process parameters are recorded and compared against the predetermined limits. If any limits are exceeded then the expert system is 'awakened.‘ If no limits are exceeded then the process continues. Second Method - (qualitative inexperienced) - The expert system triggers when the operator realizes a scrap problem 28 Expert Diagnosis of Sys't em scrap type C Blackboard ) 1 Expert Recommendation System of corrective 2 action Figure 2.5: Expert System 1,, Blackboard, and Expert System 2 29 exists, but cannot determine the specific type of scrap (i.e. "I know this part in my hand is scrap but I don't know why"). It is critical to ask the minimal number of questions in an expert system to arrive at the correct conclusion, in this case the correct scrap type. Again, too few questions can lead to an incorrect diagnosis of the scrap type. Too many questions can annoy the operator because of the perceived triviality of the answers. Originally, E81 was developed to ask qualitative questions in the same order as the machine cycle. However, if the scrap type was caused by a later step in the machine cycle, then the operator had to answer unrelated questions in order to finally arrive at the correct scrap cause. An example will more clearly demonstrate this point. Suppose the manufacturing process is the production of polystyrene (Styrofoam) coffee cups. The machine cycles through. the steps: die close, bead inject, steam heat, die cool, die open, and part eject. Thus, if the operator has a scrap coffee cup caused by the part eject step, he/she would have to go through the die close, bead inject,...,die open steps before the actual scrap cause (part eject) would be determined. Although this method has its weaknesses, it is also inherently logical. Another method might be to prioritize the cycle steps in the order of greatest scrap production, rather than sequential. If the bead cool step 30 produced the most scrap then questions to determine if the cup scrap was caused by bead cool would be asked first. A third procedure, and the method used in this thesis, is to preprocess with large scope questions that can quickly narrow the scrap type choices. A number of questions are asked to get the operator in the correct area before going further to determine the exact scrap type. The sequential method discussed above is used if none of these questions effectively narrows the scrap type choices. Third Method - (qualitative experienced) - The third triggering method is for the operator to write the scrap type directly to the blackboard. Typically, a highly experienced operator will write directly because he/she already knows the type of scrap. In this case, the operator will immediately be interested in the cause of the scrap and the corrective action. The third method is a bypass of E81 (the scrap characterization subdivision of the expert system). The triggering methods are best explained in figure 2.6. A simple example will best show the above triggering types. First, assume the manufacturing process is, again, styrofoam coffee cup production. The process step are die close, bead inject, steam heat, die cool, die open, and part eject. There are only two critical process parameters: die temperature and cooling water temperature. 31 Expert ‘ Limit System Exceeded [ Blackboard )‘i 3 . Expert System 2 Method l: Predetermined Process Limits Exceeded Method 2: Inexperienced Operator - knows part is scrap, doesn't know type Method 3: Experienced Operator - knows scrap type, bypasses ESl Figure 2.6: Triggering Methods 32 The predetermined range for the die temperature is 150 to 175 deg F and the predetermined range for the cooling water temperature is 55 to 85 deg F. The first method would trigger if, say, the measured process parameters for die temperature and cooling water temperature were 160 deg F and 100 deg F, respectively. Now suppose the operating parameters were within specification but the cup was a visual scrap, and the operator didn't know what the scrap type was. The second triggering method would ask some critical preprocessing questions to attempt to narrow down the possible scrap type, such as "Is the coffee cup shrivelled?" or "Are there indentations in iflua coffee cup?" E81 would ask sequential questions to determine the scrap type only if the preprocessing didn't yield any help. In other words, E81 would ask die close questions, then bead inject questions, then bead heat questions,..., until the scrap type was determined. An example of the third method is if the operator has a visual scrap and knows exactly what the scrap type is - say, part eject. The operator could then write the scrap type directly to the blackboard, bypassing E81 completely. E81 Logic - The next area of discussion is the logic for E81. The E81 logic is the method by which the expert system uses the above-mentioned triggering. 33 Logic Table: 1. IF (quantitative triggers) AND (inexperienced qualitative verifies) THEN (write to blackboard) See figure 2.7. 2. IF (quantitative triggers) AND (inexperienced qualitative does not verify) THEN (give operator warning) See figure 2.7. 3. IF (inexperienced qualitative triggers) THEN (find specific qualitative type) AND (obtain process parameters) AND (write to blackboard) See figure 2.8. 4. IF (experienced qualitative triggers) THEN (obtain process parameters) AND (write to blackboard) See figure 2.9. The next logical question is "Why the difference in the logic rules?" Rule 1 states that if the quantitative triggers E81 and the relevant qualitative inputs from E81 verify the scrap type, then scrap has definitely been produced and the expert system writes to the blackboard. An example is a thermocouple indicating cooling scrap type, and the operator visually verifying cooling scrap. However, if the cell controller triggers but the relevant qualitative inputs do not verify the scrap type (rule 2) then scrap has not actually been produced. An example of this is a thermocouple indicating a cooling scrap for the coffee cup, but the 34 [Continue I ‘ A Quantitative no D Triggers yes Inexperienced Qualitative Verification run Warn Operator '— yes Write to Blackboard Figure 2.7: Quantitative Trigger 35 Inexperienced no Qualitative DI Continue triggers? Find Specific Qualitative Scrap Type i Obtain Process Parameters l, Write to Blackboard Figure 2.8: Inexperienced Qualitative Trigger 36 Experienced Qualitative Triggers no DI Continue l Obtain Process Parameters (7 Write to Blackboard Figure 2.9: Experienced Qualitative Trigger 37 operator cannot verify the fact that is it is cooling scrap upon visual examination. Therefore, the operator is given a warning and the machine continues to cycle. Rule 3 states that if the E8 is triggered by the inexperienced qualitative method then the ES obtains the process parameters from the cycle that produced the scrap coffee cup, and writes to the blackboard. An example of this is an operator seeing a visual defect in the coffee cup, but not knowing the cause of the defect. In other words, the scrap type is determined and written to the blackboard without regard to quantitative inputs. The logic for Rule 4 is obvious. The operator is writing directly to the blackboard and the process data is obtained to be used in E82. Example: the operator knows that he/she has coffee cup damage caused by part eject and wants to know immediately how to correct the machine so this scrap type does not recur. E82 Logic - The logic in E82 pales in comparison to the logic in E81. Simply stated, E82 is :1 Shortest path search from the scrap type to the proper recommendation of corrective action. The search begins (root node) at the blackboard and ends with either a specific recommendation, or information telling the operator what the corrective action should not be. E82 relies heavily on forward chains to higher and higher (or narrower auui narrower) degrees of expertise. Example: The blackboard result is cooling scrap type. E82 would first 38 determine if the cause was water harness malfunction or corrosion build tq>