The Automatic Tool Selection with the Production Rules Matrix Method

The Automatic Tool Selection with the Production Rules Matrix Method

The Automatic Tool Selection with the Production Rules Matrix Method D. Domazet; Mechanical Engineering Faculty, University of NiWYugoslavia Submitted...

1MB Sizes 0 Downloads 33 Views

The Automatic Tool Selection with the Production Rules Matrix Method D. Domazet; Mechanical Engineering Faculty, University of NiWYugoslavia Submitted by Prof. V. MilaEiC (l)/Yugoslavia Received on January 17,1990 Summay

Ihe automatic turning tool selection process is made up of sir selection steps. Two of them are realized with a newproposednon-algorithmicapptvack the which replaces IF...THEN... rvpe of &. production tule mat& method. &v using the tabkformed rule base, the procedure creates a matrix for each As the analysisof manirformed rules isdone with integer mult@lication,the rule base issearched completelyand muchf m e r than when using IF... THEN... selection steps are auiomated. r).pes of rules. Using ihis lwwwle&epmentation method the tool class and the toolholder

KEY WORDS: Tool selection, process planning, tool defnih'on parameters, knowledge presentation, p h t w n * e m . 1. INTRODUCTION

When developing generative process planning systems, one of the planning stages is the tools selection. It can be nalized in the form ofexpert systems t2,3/. usually using one of the artificial intelligence languages, such as Lisp or Prolog, or one of expert systems shells. In this paper a hybrid approach for automatic tool

For each identified influence factor a state table can be defined (Fig.2) with all possible states and its indices. I

selectionisproposedthatusesbothalgorithmicandnon-algorithmicprogramming techniques. The selection steps that mostly use experience and heuristic knowledge are d i e d with a non-algorithmic technique that uses the proposed knowledge presentation method called here: the production rule matrix method (PRMM). It will be showed that this knowledge base. presentation method offers someadvantagescomparedwiththeconventional specificationofproductionrules with one of A.l.languages. A complex A.I. problem can be decomposed in many simple subproblems where the answer to one question is obtained aner consulting the appropriate and dedicate knowledge base. In the presented approach this rule bases ~ I Zin the table form, and are called: the production rule table knowledge bases (Fig. I)

I

I

4

I

I

I

laluminium

DISCRETE INFLUENCE FACTORS

INTERVAL INFLUENCE FACTORS

Fig.2 The influence factor state tables A production rule is defined when one specifies the allowed states indices of identified and defined influence factors and their corresponding weighting coefficients. In the example in Figure 3, a production rule (b) is formed for the indicated states of the previously defined influence factors (c). A set of production rule forms production rule baw table.The first raw in the table form production rule (Fig.3.b) contains the allowed states indices of influence factors and the sccond raw contains the appropriate weighting coefficients. The weigthing coefficients can be specified atkr an expert's estimation or can be the result of the mathematid analysis.

Figure 1 A decision tree of a decomposed comple.~A/ problem where decislon nodes use dedicated rule bases

2. THE PRODUCTION RULE MATRIX METHOD

The production rule matrix method (PRMM) is a knowledge presentation method that formulates the knowledgebase production rules ina table form instead of using logical statements of the form: IF (conditions) THEN (action-solution). Decision node of the problem solution process in Fig. 1 can be realized by using algorithmic or non-algorithmic programming techniques. If using the proposed non-algorithmic method, the production rule matrix method, the solution of the knowledge base search and possible solutions analysis can be:

- a partial solution that is important for decision generation in the next decision nodes,

- a final solution of the complex problem, or - a pointer to the next decision node. The production rule matrix method can be used for well structured problems in which influence factors to possible solutions can be clearly identified. The Influence factors states are their attributeswhich define possible factors manifestations. Two principle types of influence factors can be defined: a) Diserete Muenee factors have discrete states (for example, for the material as the influence factor, the discrete states are material types: steel, iron, aluminium etc.).

b) Interval iiffluence factorshavea continuously variable parameter which is then made discrete by defining the possible intervals of its values (for example, the diameter with its different intervals of possible values).

Annals of the ClRP Vol. 3 / l / l S X l

Ipihrsnw fa&x &ate tabla8 rltb mar308d albrsd d a b and thbir

iudbw rhbh dotine o m rule

Fig.3 An Bxample of a production rule definition and rule base table for-

mation The factors indices and their weighting coetfcients correspond to the conditional part of IF... THEN... formed mle. The action-solution part of this logical statement is specified at the beginning of the production rule's first raw. The table form production rule replaces one logical IF.. .THEN... statementwith AND logical relations only. If a rule must have one or more OR logical relations, such rule has to be decomposed in two or more table formed rules. For an actual set of influence factors states, the production NIC table base (Fig.3.a) is sequentially searched. All NICS with specified combination of influence factors states are extracted and arranged according to the value of their weighting coefficients. The rule's weighting coetfcient is obtained by multiplication of the weighting coefficients of its influence factors states. The solution produced by the production rule with the highest weighting coefficient value is normally chosen for further analysis. As the rule base search speed is very important for the proposed method applicationsuccess,thelogical statementofIF...THEN... formareavoided when analysing each rule. In efforts to avoid logical analysis of each rule, for each rule a matrix fm is formed. It contains the influence factors weigthing coefficientson the positions according to rule's states indices (index+ 1). The matrix fm for the rule with the solution R1 from Fig. 3.a has the following form:

497

RI

F1

F2 C1

C2 -factors

2

3 4

2 1

5

1 1

-indices -weights

F1

F2 C1

C2

fm=

the rule's table

the rule's matrix

The weighting coefficient of the production rule is calculated with the following expression:

where IS(i) is the vector of the actual (given) influence factors states indices. If this vector is identical with the vector of the rule's indices, then W>O, and is W=O when the rule does not satisfy the required states. The elements of the first raw of the matrix fkn are set to be equal to 1 in order to obtain W >O when one or more rule's states indices an?set to be 0. This is done when one wants to declare that one or more corresponding factors have no influence on the solution produced by this rule.

By using the expression (2) to test the satisfaction of rules conditions (i.e. the influence factors states indices), the time consuming logical evaluations, normally used in IF..THEN... formed rules, and rules interpretations when they are written in Lisp or Prolog, are replaced with fast integer multiplication. The matrix form of production rules (I) allows fast rule testing with expression (2) and fast production rule base. scanning. The best weighted rule solution is then chosen. The rule's table conversion to the rule matrix (1) permits fast rule testing. It explains the origin of the method's name. When comparing the proposed matrix formulation of production rules (1) with the conventional IF...THEN... form, one c8n notice the following benefits: 1.The search and interpretation of rule base. is much faster.

2.As all rules in the rule base. are analysed, the best solution contained in the rule base is always obtained.

3.The user can easily modify the rule base., using even ordinary editors, without knowledge of any programming languages. 4.A hybrid programming approach 0.e. the algorithmic and m-algorithmic)caneasilyberealised,usingthebenefitsof~programmingtechaiques. 5.0btained results contain the rule numbers which have produced the accepted solutions.It simplifieseventual modification of the decision logic.

3. THE TOOL SELECTION PROCEDURE When developing a generative process planning system (CAPP), it is necessBfy to develop a module for automatic tool selection. By using the A.1 techniques and the expert system approach, the system implementation flexibility is obtained, because tool selection rules can be easily modified. Here a hybrid appmch is proposed that uses both algorithmic and non-algorithmic programming techniques. This combines the best features of bolh techniques.

In Fig.4 the tool selection procedure for external straight turning, decomposed in six stages is presented. In each stage a part of the toolholder or the insert

IS0 code is determined (Fig.5). The wn-algorithmic approach is implemented in the most creative and experience based stages: the tool class selection and the toolholder type selection. The production rule matrix method in this stages is implemented. The similar procedures can be implemented for other tool classes (internal turning. coping turning etc.). Here each selection stage will be briefly described. 3.1. The tool class selection

The tool class is here defined as a group of tools for a specific turning operation (Fig.@, with specific design, clamping system, and features and produced by the specific manufacturer. By grouping tools in classes, the search is focused and directed to a limited tool data area related to the selected class. As the class seleclioncriteria are hquently changeable, the production rule matrix method is implemented. In Fig. 7 the influence factors states tables are presented. For each possible tool class a set of selection rules is specified. The best weighted solution is selected and the first code number is defined.

3.2 The insert type and material selectiou

is defined by the insert shepe* clearanCe The insert and c h i p - b d e n design. It specifies the first four Is0 codes, though some insert f y ~ e use s s w i f i c manufacturer's lwo code digits at the end of IS0 code number tb;tool i&rts. A set of different weighted inserts is specified for each type of

Fig. 5 IS0 codes for axternai turning toolholdersend inserts turning operation, the workpiece material type and turning phase, as well as the proposed insert materials. By readingsugg&ted inserts from-a specific sequential file for the given implementation conditions. the t h m k t weighted insem taken for further anelysis, as well as suggested feed ranges.

of them with the highest rule weighting coefficients are taken for the further analysis.

Fig.9 The influence factor tables and the rule form for the 3th toolholder code determination

3.4. Insert dimeusions determination Important insert dimensions: cutting edge length (the 5th insert code), thickness (the 6th insert code) and radius (the 7th insert code) an determined by using an algorithmic approach with the following procedure:

I . For each elementary operation a depth of cut (a) is determined. Fig.? The lnlluence factor state tables end a too/ class selection M e fomred rule 33. The toolholder type selection

The toolholder type is defmed by its design and entering angle (which determines the 3th IS0 code, Fig.8). the insert shape (the 2nd IS0 code). the insert clearance angle (the 4th IS0 code) and feed direction version (the 5th IS0 code). As the insert type is preliminary determined. the 2nd, and the 4th code is specified to be equal as the 1st and the 2nd insert codes. The 5th toolholder code is determined by specifying the feed direction @,Lor N). The 3th toolholder code is determined after the appropriate rule base table had been searched.

2. For each insert type the suggested cutting edge length and the maximum effective cutting length ratio (k) is read from an appropriate data fde. 3. A minimal effective cutting length is determined with the equation Imin=a/sin(XJ, where X is the entering angle. 4. The actual edge length is chosen from the insert file, satisfying the condition: 1 > k.lmin.

The insert fhickneJs and radius an read from the insert file for thespecified insert type and inscrt edge length. As several radii are available, the chosen one m u t satisfy the following condition: r < 1.5s (where s is the feed rate) for rough turning, and r > 3s ,for finish turning.

3.5. Toolholder dbiieiuiotu deterniination The toolholder dimensions are: the shank height Q. the shank width @) and the tool length (11). They defme the 6th, 7th and the 8th IS0 code. These dimensions are read from the toolholder file. For each specified toolholder type the highest possible shank height is chosen that satisfies the restriction: h
3.7. Wnal tool set determination

Fig. 8 Toolholderdeslgns and enterlng angles that speclfy the 3th IS0 code Thc idcntified influence factors are: cutting conditions ( m l ) , cutting phase(F22), tool movement directions(F23,F24,F25,F26), and tool entering (F27)and going out (F28) conditions(Fig.9). As each influence factor state in defined mles is specified with a weighting coefficient between 1 and 5. all possible toolholder types are extracted and three

Using the previously explained procedure, the developed programming system for turning tool selection determines one to three possible toolholder-insert pairs for each elementary operation which machines one elementary workpiece surface (Fig.10). As a turning operation for a given workpiece conrains all elementary operations that are done on a lathe, the number of obtained different tools is higher than it is necessluy. In effort to minimize the q u i r e d number of tools, the tool selection programming module analyses obtained tools for one operation taking into BccouIIt:

Fig. 1 1 An iliustratlve axampie of the tool selection and toolo reduction

Fig. 10 The final turning tool choice for one turning operation

- the number of tool positions in the turret of specified lathe. - the preliminary cutting costs with different tools /3I,i.e, tool costs, tool utilisation costs and mounting costs. and

- the tool weighting coefficients. 4. INDUCTIVE LEARNING AND AUTOMATIC RULE GENERATION

As it is shown, the matrix form ofproduction rules is used for tool class and toolholder type determination. In a usual case, rules are expected to be defined by an experienced process planner. But the table formed rule bases can also be obtained automatically. by analysing the actual operation plans in a factory.The procedure is as follows: 1. By analysing existing turning operation plans from operation plans files, for each used tool (i.e.too1 class and toolholder type) all cutting conditions are noted, i.e. all influence factors states are registered. 2. For each used tool one or more selection rules are defined, depending on the number of different influence factor states combinations registered. 3. For each new (or existing) production rule the weighting coefficients can be determined by using the equation:

wf(ij) = 5*N(ij)/NSUM where:

(3)

wf(i,J) -the weighting coefficient of the state (i) of the influence factor (j) in the NIC under definition, N(ij)- the number of registered states (i) of the influence factor (j) when a specific solution (tool class, or toolholder type) was used, and NSUM- the number of tests with the same registered solution (tool class, or toolholder type). With this procedure, an existing rule base can be automatically modified, by modifying the rule weighting factors. 5. ILLUSTRA'IWE EXAMPLE

The tool selection procedure for external turning operations described above is demonstrated &I the example in Fig. I I. As it c&e seen, t h m tools have been chosen aAer the tool reduction at operation level. 6. CONCLUSIONS

The CAPROT system, a generative process planning system for rotational parts which is being developed at the Mechanical Engineering Faculty of N~ University. uses the descrihxl fool selection rpproach. The CAPROT system automatically extracts all the necessary data from a special developed product model I l l and generates a process plan and operation plans for rotational parts manufacture. The tool selection module works completely automatically in such programming enviroment.

By using both algorithmic and non-algorithmic approaches, good features of both approaches became apparent. The system is flexible, as the user can easily modify rule bases or used files. but in the same time very fast, as the rule bases searches are very short because of the rule analysis by using only integer multiplication. The table form of production rules permits an easy rule base development and modification. The rules matrix form enables fast rule base analysis, determination of best solutions contained in the rule bases as they are completely searched, identification of rules that produced accepted solutions and an easy automaticgeneration of new rules or correction of existing ones. As the usage of A.I. languages (Lisp, Prolog) is not necessary, usual programming languagescanbe successfully applied for expert systemsdevelopment that employ the proposed production rule matrix method. Here Fortran was used.

For other machining operations (internal and copying turning, machining of groovcJ.trcads. etc.) the developed programming module for turning tool selection uses similar procedures as described here. REFERENCES 1. Domazet.D., Mani6.M.. 1990, CADROT: aProductModellerandCAD Module for Integrated CADICAPPICAM systems for Rotational parts. The 28th International MATADOR conference. UMIST,Manchester (accepted paper) 2. Giusti,F.,Santochi,M., Dini,G., 1986. COATS: an Expert Module for Optimal Tool Selection, Annals of the CIRP, Vo1.35/1:337-340

3. Hinduja S., Barrow G.. 1986, TECHTURN: aTechnologicallyOriented System for Turned Components. International Conference Computer-Aided Production Engineering, Edinburg 4. Mathieu,L., Bourdet,P.. 1987.. Tool Automatic Choice: A Step to Elaborate Automatically Process Planning, Annals of the CIRP, Vo1.36/1:347350

5. Milati6 V.R., Putnik G.D.. 1989, Logical Structure of Tooling System Design-Fundamentals of Tooling Selection Expert System, 6" Symposium on Information Control Problems in Manufacturing Technology-INCOM'89, VOl .II:529-534

6. Pumik G.D., 1988, A Contribution to the Expert System Development for Machining CenterTool Selection (in Serbocroatian), M.Sc thesis, Mechanical Engineering Faculty, University of Belgrade

7. van? Ewe A.H., Kalas H.J.J, 1986. XPLANE. a Generative Computer Aided Process Planning Systems for Part Manufacturing. Annals of the CIRP, VO~.35/1:325-330 8. van Houten F.J.M./Kalas H.J.J,1986, Strategy in Generative Planning of Tutning Processes. Annals of CIRP, Vol. 35/1:331-336 9. vanHoutenF.J.M., KalasH.J.J., 1984, ROUND,aFlexibileTechnology Based Process and Operation Planning System for NC-lathes, 16" CIRP International Seminar on Manufacturing Sytems. Tokyo