Combination of a knowledge-based system with a data extraction system for determining optimal machine settings

Combination of a knowledge-based system with a data extraction system for determining optimal machine settings

Expert Systems With Applications, Vol. 11, No. 3, pp. 391-396, 1996 Copyright © 1996 Elsevier Science Ltd Printed in Great Britain. All fights reserve...

499KB Sizes 0 Downloads 70 Views

Expert Systems With Applications, Vol. 11, No. 3, pp. 391-396, 1996 Copyright © 1996 Elsevier Science Ltd Printed in Great Britain. All fights reserved 0957-4174/96 $15.00+0.00

Pergamon PII: S0957-4174(96)00053-X

Combination of a Knowledge-Based System with a Data Extraction System for Determining Optimal Machine Settings HENRY LAU AdvancedTechnologyEducationService,RegencyPark 5010,Australia

Abstract--GenFlow is a program developed by the Advanced Technology Education Service (ATES) with the aim of extracting "selected" alphanumeric data from system datafiles of computer systems (e.g. the computer system of a Laser Sintering Machine). This extracted information, which includes parameter settings such as material warm-up time, pressure and temperature as well as time for the manufacturing process, is essential for the analysis of product quality particularly related to the dimensional accuracy of the component. It is proposed that GenFlow can be used in conjunction with a Knowlege-Based System (KBS) or Expert System to provide advice on rectifying the dimensional problem based on knowledge of past experience. With this approach, "expert" advice can be generated through the KBS which also has a "dynamic" knowledge database. This can provide a more realistic suggestion for the optimal machine settings in order to achieve improved productivity. This paper examines the viability of a KBS combined with GenFlow to determine the optimal settings of parameters for a Laser Sintering Machine Model SLS2000 which is deployed in the Advanced Manufacturing Facility (AMF) of a company in Australia. The KBS has been developed by ATES and implemented in the company and is named the Parameter Determination Knowledge-Based System (PDKBS). Copyright © 1996 Elsevier Science Ltd

DATA E X T R A C T I O N OF SYSTEM DATAFILES

fore a tedious, error-prone and time-consuming process and the machine is always left idling during the analysis. The geometric data for the production of prototypes comes from ComputerVision which is a proprietary Computer Aided Design (CAD) package used by the company to design products for manufacture.

(AMF), the Sintering Station SLS2000 is used to produce prototypes, which are the pre-production components produced according to the preliminary component design for evaluation purposes before finalizing the design of the product, in a relatively short period of time, say, within a few hours. Quality of components produced by SLS2000 is affected by a number of factors including temperature and pressure settings, process time etc. In the existing practice, the optimum settings for the production of components can only be determined by "trial and error". The database of the computer system of SLS2000 contains detailed technical information for every job operation performed on the machine. In order to improve the quality of components, engineers are required to obtain the technical datafiles from this machine and then analyse the data. The technical datafiles from the computer system of SLS2000 are all in text form with a size of up to more than 10 A4 pages. However, in actual cases, only relevant data, which can be just a
GENFLOW Genflow is a program designed to achieve data transfer among various computer systems which may be running in different computing platforms such as DOS/Windows, Macintosh and Unix (Lau & ZockeL 1994). Data to be transferred has to be in ASCII format which is a "crossplatform" format supported by most operating systems. Users can just "point and click" to identify data to be transferred directly from the system datafiles which are created from the source computer systems. GenFlow extracts and converts the data to neutral format transparently so that the data can be "read" by other systems. In AMF, GenFlow is used to extract the technical data from the computer system of SLS2000. An extract of the data is as shown below: 391

392

H. Lau

part-l-offset 0.000000 0.000000 0.000000 part-l-min_bounding__box - 122.901437 - 123.321709 0.000000 part-l-max_bounding_box 118.259599 122.995438 5.000000 part-I-parallel_segmenttolerance 0.000000 part- 1-segment._activationtolerance 0.000000 part- 1-segment_sort_tolerance 0.012700 part- 1-coplanarity tolerance 0.000000 part-l-exposure_tolerance 0.000000 part- 1-how_placed 2 part- 1-STL filename/usr2/sls2k/geometry/stl/parts/ _stl/nylon-warmup.bo22 part- 1-job filename For every operation performed by the machine, a datafile is created automatically with all the important data such as warm-up time, temperature etc., put in a text file in the format as shown above. This data may be difficult to read for a novice but an experienced engineer is able to interpret it and obtain the necessary information. GenFlow is used to extract the "selected" data from this file and the data can be sent to a third-party program, e.g. Excel, for analysis. The details of GenFlow have been covered in other papers and are not to be covered here (Lau & Zockel, 1992, 1994, 1995).

input from the user about the geometrical and other relevant features of the component, the Component Shape Group (CSG) of the component is determined. This classification process is done by a program specifically developed by a local computer firm for AMF. The PDKBS was developed with the help of an Expert System Shell called CLIPS Version 6.0. [CLIPS stands for C Language Integrated Production System. See CLIPS Reference Manual (1993) for more details.] The main feature of PDKBS is that the knowledge base grows with experience every time a new test result is available. In the case of AMF, the number of classifcations of components is around 100. For simplicity reasons, there are no more than five dimensions and three parameters to be selected for analysis. Although there may actually be more than five dimensions and three parameters, it is found that in most circumstances, only a small number of dimensions and parameters are the key attributes of the problem.

STRUCTURE OF PDKBS

KNOWLEDGE-BASED SYSTEM

As mentioned in the previous context, CLIPS was chosen as the expert system shell for developing PDKBS. Templates are created to define the structure of the facts, e.g. the five dimensions and three parameters. The following shows the template which contains CSG, five dimensions and three paramters:

Data extracted through GenFlow, such as the temperature and pressure of the process, can be used in conjuction with a Knowledge-Based System. For example, it is found that the dimension of a hole of a component manufactured from the SLS2000 is not within the tolerance range. There are a number of parameters which may cause this problem such as material warm-up time, pressure, temperature and time of operation etc. This information can be quite useful for the KBS to provide a realistic suggestive action to the user for tackling the dimensional discrepancy problem. A KBS called PDKBS (Parameter Determination Knowledge-Based System) has been developed and implemented in AMF to handle dimensional problems of components produced by SLS2000. Like other expert systems, PDKBS consists of several units including a knowledge base, an inference engine and a general database. The descriptions of the functions of these units can be obtained from other literature such as Giarratano and Riley (1993) and Stefik et al. (1983) and are not to be covered in this paper. Before using PDKBS, it is important to classify which group the component belongs to. It should be noted that the variation of parameters such as temperature, pressure and process time affect the final outcome of dimensions of a component with a "specific" shape. Based on the

(deftemplate csg_dimension_parameter (slot csg; component shape group (type STRING) (default '"')) (slot dl; first dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (defanlt?NONE)) (slot d2; second dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (default?NONE)) (slot d3; third dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (default?NONE)) (slot d4; fourth dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (default?NONE)) (slot d5; fifth dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (default?NONE)) (slot pl; first paramter

Determining Optimal Machine Settings (type SYMBOL) (allowed-symbols increase decrease nochange) (default?NONE)) (slot p2; second parameter (type SYMBOL) (allowed-symbols increase decrease nochange) (default?NONE)) (slot p3; third parameter (type SYMBOL) (allowed-symbols increase decrease nochange) (default?NONE))) Another template is required for the dimensional check results as shown below: (deftemplate dim_check_result (slot r_csg; component shape group (type STRING) (default '"')) (slot rl; result for first dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (default?NONE)) (slot r2; second dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (default?NONE)) (slot r3; third dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (default?NONE)) (slot r4; fourth dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (defanlt?NONE)) (slot r5; fifth dimension (type SYMBOL) (allowed-symbols correct oversize undersize) (default?NONE))) A number of rules have been written for components of different CSG. An example of the rule is as shown below: (defrule csg_3 rule 1 (dim_checkresult ( r c s g "3") (rl correct) (r2 correct) (r3 correct) (r4 oversize) (r5 correct)) (csg_dimension parameter (csg "3") (dl correct) (d2 correct) (d3 correct) (d4 oversize); oversized dimension (d5 correct) (pl?paraml) (p2?param2) (p3?param3))

393 ~;

similar to Then (printout t "parameter 1 ---, "?paraml crlf "parameter 2 ~ "?param2 calf "parameter 3 --, "?param3 crlf))

This rule is specifically for the component of CSG3 with the fourth dimension oversized. There may be another rule for the same CSG with the fourth dimension undersized and so on. This means, just for CSG3, there are a significant number of rules to cope with different dimensional problems. Altogether there are hundreds of rules in the knowledge base to cope with the wide variety of CSGs (about 100 of them). It is quite possible that there is no previous experience related to certain situations. For example, there is no previous record regarding CSG100 with dimension three oversized. In this case, PDKBS will display all the previous experience for CSG100 for other dimensions and the parameters involved to rectify the problem. Based on this information, the user can obtain some hints and tips on the possible action to be taken. LOGICAL SEQUENCE FOR USING PDKBS The flow chart as shown in Fig. 1 shows the logical sequence for using PDKBS as summarized in the following context: (a) Dimensional check of components. The components are first checked in the company using projectors and other automatic checking equipment. For each Componet Shape Group (CSG), there is a group of important dimensions to be checked. As shown in Fig. 2, five different dimensions of the component are checked. For the sake of identification for the expert system, the dimensions are labelled as dl, d2, d3 etc. A program developed by a computer firm is used to classify the CSG of that component. This classification program was specially designed for the situation of thatcompany based on the similarities of the shapes of the components manufactured by the company. For example, the CSG for the component as shown in Fig. 2 is 5, the assigned label for the dimensions are as specified below: Dimension in Fig. 2 (CSG=5) Assigned Label

a

b

c

d

e

dl

d2

d3

d4

d5

(b ) Input dimensions on Visual Basic form. As shown in Fig. 3, a form specially designed by Visual Basic is used for the input of dimensional data (Microsoft Corporation, 1993a, b). The main feature of this form is that when the user clicks the OK button after finishing data entry, the program checks if there is any dimensional discrepancy by comparing the input data with the data stored in the database file which can be accessed in the VB program. When any dimension is found to be oversized or

394

H. Lau

undersized, a message will be automatically displayed on the screen and the user is asked if advice from the Expert System PDKBS is necessary. If the answer is YES, the dimensional check result will be sent to the PDKBS. The input data from the Visual Basic form can be collected and sent to PDKBS using the following steps:

content for the component as shown in Fig. 2 with five dimensions (fourth dimension is oversized) and CSG equal to five is shown as below: (deffacts dimresults (dim_check_result (r_csg "5"); CSG = 5 (rl correct); 1st dimension OK (r2 correct); 2rid dimension OK (r3 correct); 3rd dimension OK (r4 oversize); 4th dimension oversized (r5 correct))); 5th dimension OK

• Put the data in a text file. This can be easily done by using Visual Basic commands to retrieve the text (textbox.text) from the input boxes. The text file

I Dimensional Checkusing ! Pro~or,

1

ii

l lnputDimensions ! on VB Form

I~

Extract l Pararnetersl~]

/

PDKBS (Expert

System)

FIGURE1. Flowdiagramof usingPDKBS.

I I <

L

.~i ~.

~a

I

f

b

I .

l

FIGURE2. Componentsample.

c

Determining Optimal Machine Settings

395

i~'.~-~~~:"..1:-.:...::.::".:.::-:.:

: . :. :.l":~~'-~~.~g~"..~t:

.:.::. :- :-.~--..i..:.. :..-..- ~:

FIGURE 3. Dimensions input form.

Save it with a filename, e.g. data.bat. Start PDKBD by loading the original CLIPS program and then load the file "data.bat" afterwards. Type (reset) (run) PDKBS will add the additional fact from the file "data.bat" to the original CLIPS program and the inference engine of the program runs to provide the result.

(c) Extract parameters from GenFlow. As mentioned in the above context, GenFlow can be used to extract the values of the paramters such as temperature and warmup time from SLS2000. GenFlow was also written in Visual Basic. The extracted parameter data will be displayed in a form which pops up when a "Short-cut" key, e.g. , is pressed. As PDKBS runs in a Windows environment, the "pop-up" form can be displayed together with PDKBS which means that the user can view the suggestions provided by PDKBS and at the same time browse through the actual parameter values on the same screen.

DYNAMIC KNOWLEDGE BASE OF PDKBS It is important to have a "dynamic" knowledge database that grows with experience. The knowledge database contains a number of facts based on past trial results. As discussed earlier, the knowledge database includes the facts under the "Deffacts" Construct (CLIPS Reference Manual, 1993). This database can be stored under a separate text file. This file is loaded to the CLIPS

environment once PDKBS is started. The benefit of doing this is that more flexibility can be achieved if a separate knowledge database file is maintained. For example, a new test found that by increasing the warmup time for a component with CSG equal to five, dimension three is reduced. A form developed by Visual Basic is again used for the input of this new result, the new fact is appended to the original file using VB command for "appending string" to file. The string to be appended is as shown below: (csg_dimension_parameter (csg "5")(dl correct) (d2 correct) (d3 oversize) (d4 correct)(d5 correct)(pl nochange)(p2 increase)(p3 nochange)) Note: p2 is the parameter for warm-up time. With this technique, the knowledge database can be updated in an easy way. Facts can also be deleted or modified using an customized program (written in Visual Basic, ToolBook or Delphi) which allows the editing of the database, with familiar Windows graphical interface features and functions. SUMMARY An expert system PDKBS can be used in conjunction with GenFlow to enhance the quality performance of the Laser Sintering Machine. This system allows users to build up knowledge by inputing data to the knowledge database based on the actual results experienced. Feedback from AMF indicate that a significant amount of time has been saved in suggesting the correct settings to tackle dimensional problems. Machine utilization has been greatly increased. Decisions can be made without

396

H. Lau

relying on experienced personnel as most of the expertise and knowledge can now be stored in a knowledge database that grows with experience. Further study is underway to embed the CLIPS program in a Visual C + + program. Most of the applets created in Visual Basic can also be rewritten in Visual C + + and as CLIPS is part of the whole C + + program, it will be a fully integrated expert system and should be easier to use with significant increase in speed and more open to possible interfacing with other programs.

REFERENCES CLIPS Reference Manual, Version 6.0. (1993). Giarratano & Riley (1993). Expert systems: Principles and program-

ming. New York: Thompson. Lau, H. & Zockel, M. (1992). An economical database management system for CIM. Proceedings of the International Conference on Manufacturing Automation, Hong Kong. Lau, H. and Zockel, M. (1994). A generic non standard-specific rationalised information flow and storage system for computerbased manufacturing. Proceedings of the Industrial Automation '94 Conference, Singapore. Lau, Hi & Zockel, M. (1995). The role of GNSIFS in simultaneous engineering. Proceedings of the 3rd International Conference on Manufacturing Technology, Hong Kong. Microsoft Corporation (1993a) Language reference. Microsoft Visual Basic. Microsoft Corporation (1993b). Programmer's guide. Microsoft Visual Basic. Stefik, M., Aikins, J., Balzer, R., Benoit, J., Bimbaum, L., Hayes-Roth, E & Sacerdoti, E. (1983). Basic concepts for building expert systems, Reading,/VIA: Addison-Wesley.