Journal of Materials Processing Technology 155–156 (2004) 1583–1589
Construction of PC-based expert system for cold forging process design Tsutao Katayama a , Masami Akamatsu b , Yoji Tanaka a,∗ a
Faculty of Engineering, Doshisha University, Japan b Akamatsu Forsys Ltd., Japan
Abstract Cold forging process design is a field where the theory has not been established until present, and it depends on skilled designers with long time experience and intuition. Consequently, it is difficult for designers with shallow experience to cope, since process design needs time and cost. Thus, computer-based expert system for cold forging process design targeted to beginners has been developed in this study. In this system, a case base is used as the knowledge base and the fuzzy pattern matching is used as a reasoning theory. Due to the case base, composed of geometric data, been designed by the human expert, it has uncertain factors such as the subjectivity of the human experts. Therefore, the fuzzy pattern matching can be applied to generate appropriate design results from little and uncertain knowledge included in the case base. © 2004 Published by Elsevier B.V. Keywords: Cold forging; Expert system; Fuzzy pattern matching
1. Introduction Cold forging process design repeatedly carries out trial and error based on intuition and experience of the skill designer who is familiar with the forging problem. As this result, time and cost for the design are high, and it is difficult for the designer who is shallow on designing. At present, cold forging field is shifting to less form mass productions to more form less productions, and also time for designing process is reducing. Such a situation like this, operation of making longer life for metal mold and more accuracy process design is desired, but optimum process design has to depend on metal mold design. From such a situation, PC-based expert system for cold forging process design targeted to beginners has been developed in past study [1,2]. This system has been constructed by using the database that is actually designed by experts. That is to say, the database has been constructed on the basis of field-proven data. Process design is carried out using the database and the fuzzy algorithm [3] that will express intuition and experience of the skill designer. Also, finite element method (FEM) which needs the experience for the evaluation of the analytical result will not be used on this system, because the target of this system is design beginner and also instant output. By
∗ Corresponding author. E-mail address:
[email protected] (Y. Tanaka).
0924-0136/$ – see front matter © 2004 Published by Elsevier B.V. doi:10.1016/j.jmatprotec.2004.04.256
such a system structure, the design beginner would be able to quickly and easily carry out high reliability process design. In recent study, algorithms of fuzzy pattern matching, AHP, neural network, and UBET were adapted. By using those algorithms, expert system was constructed perfectly, but on fuzzy pattern matching, fuzzy rule needs to be constructed by expert system programmer’s hands having discussions with cold forging experts. Moreover, scheme must be constructed to make the system match the case base, and that could only construct by programmer’s trial and error meaning taking a very long time. Mounting a genetic algorithm on this expert system to auto-tuning the fuzzy rule will solve this problem.
2. Overview of expert system Expert system is a tool that has a database that was constructed using case base. Case base is based on the actual expert’s designs that were actually used in industries. When user demanded for such product, expert system will inference and outputs using database. Compared to simulation CAD system, expert system can output in split seconds while simulation CAD system takes time on such as FEM analysis and estimation. Demerit for expert system is that its performance depends on database. So if there were not enough databases to inference for user’s demand, expert system could not output useful design.
1584
T. Katayama et al. / Journal of Materials Processing Technology 155–156 (2004) 1583–1589
Fig. 1. Example of actual cold forging constructing process design.
Those who were beginners on cold forging process design, usually use analysis simulation without their cold forging experience. This takes long time on such as FEM analysis and needs long time on estimating. Also experience will be need for simulating, so using expert system for beginner is desirable. For expert and also beginner designers, simulation CAD system will be efficient. The example of actual cold forging constructing process design is shown in Fig. 1. Eighty percent of products are done in five processes of coining, drawing, extrusion, upsetting, and piercing shown in Fig. 2. Actual process design will begin designing on form of final process and designing form of one process before the next step. Process design goes on to the next step until the former state of material. When there was no definite formula, product will be designed by expert’s vague decision. Compared to that, the process of expert system designing is similar. The system will also start with form of final process and same goes on. When designing, experts design vaguely, so the system expresses this by using fuzzy pattern matching. To construct expert’s vague design, it was expressed by trapezoid shaped scheme shown in Fig. 3. In expert’s actual design, form of one process before will be decided vaguely. To express and mount vague decision to expert system, first, inference target is expressed to characteristic value shown in Fig. 3.
Next, this triangle will be made by making that value an apex and with ambiguous width. Then, this triangle will be set on previously prepared trapezoid shaped scheme, and by considering the overlap of this triangle and trapezoid, the measure and process will be decided. In Fig. 3, triangle is more overlapped to trapezoid of Form B, so the decision of one process before will be Form B. This characteristic value, ambiguous width, trapezoid shaped scheme are previously prepared by programmers that was constructed to fit with actual expert’s design. Eq. (1) was used for fuzzy pattern matching: N
A = M × sup(A ∩ B) + (1 − M) × inf(A ∪ BC ) B (1)
where A is the scheme that depends on data base and B the characteristic value of the product. 2.1. Actual progress on PC (GUI) System was constructed by using Borland C++ Builder. The system is based on Windows OS. On actual progress, user could input the dimension of product shown in Fig. 4. After the input, affirmation of input window will show up on the monitor screen of the PC shown in Fig. 5. The output of
Fig. 2. Basic forming methods.
T. Katayama et al. / Journal of Materials Processing Technology 155–156 (2004) 1583–1589
1585
Fig. 3. Constructing scheme.
Fig. 4. Screen of input window on PC.
inference is shown in Fig. 6. User could confirm dimension of every process shown in Fig. 7.
3. Constructing database using fuzzy pattern matching 3.1. Problem of constructing fuzzy pattern matching The role of fuzzy pattern matching in current system is when designing a form of one process before and if there
was no production rule, fuzzy pattern matching will be used. By using that algorithm, form will be decided ambiguously and similar with expert designing without using if–then rule. The problem in recent system is that when making triangle with apex of characteristic value and with ambiguous width, changing ambiguous width will make the infinitude of possibilities, so the width was decided randomly to value of 0.1 and never be considered to construct fuzzy rule. Also, when constructing fuzzy rule, the programmer needs to discuss with experts that will take time and labor. Some
1586
T. Katayama et al. / Journal of Materials Processing Technology 155–156 (2004) 1583–1589
Fig. 7. Dimension of every process. Fig. 5. Affirmation of input.
3.2. Adapting genetic algorithm of the fuzzy rules were constructed forcedly to fit to actual expert’s design, so after user’s input, there is a possibility of having the output without a fuzzy inference. These problems happen, because fuzzy rule have been constructed by trial and error. The programmers construct fuzzy rule until the system’s output fits to actual expert’s design, so there will be infinitude possibilities and there will be a limit to construct the optimum fuzzy rule.
To solve this problem, adapting genetic algorithm that is useful for combinatorial explosion problem is proposed. By using this algorithm, it is possible to adjust the fuzzy rule automatically and reduce time on constructing. Comparing with trial and error, adapting genetic algorithm to the system could consider more number of inferences than programmer’s trial and error. In general, genetic algorithm
Fig. 6. Output screen.
T. Katayama et al. / Journal of Materials Processing Technology 155–156 (2004) 1583–1589
1587
Fig. 9. Dimension of fuzzy rule.
Fig. 10. One point crossover.
Fig. 8. Flow of genetic algorithm.
takes time to calculate, but in this study, it will be used to construct fuzzy rule so taking time on constructing fuzzy rule does not matter. Fig. 8 shows the flow of basis of constructing the fuzzy rule. Flow is based on genetic algorithm that is useful for Rastrigin problem (2). FRastrigin (x) = 10n + (−5.12 ≤ xi ≤ 5.12),
n i=1
(xi2 − 10 cos(2πxi ))
min(FRastrigin (x)) = F(0, 0, . . . , 0) = 0
(2)
First, scheme (ambiguous width and shape of trapezoid) will be constructed randomly. Next, the value of fuzzy rules will be decoded to binary bits. In recent study, ambiguous widths were expressed to 0.1, so 8 bits will be enough to express that value (A = 8 bits, B = 8 bits in Fig. 9). To express trapezoid, horizontal axis value (center of upper base) and upper base will expressed to 11 bits (C + C = 11 bits in Fig. 9). Edge of trapezoid will be expressed to 8 bits (D = 8 bits, F = 8 bits in Fig. 9). To estimate the scheme that has been constructed randomly, fitness will be calculated by comparing with actual expert’s designs. Twenty two designs were used for calculation. Each design has fitness of fuzzy pattern matching (overlap of scheme) and total of that value will be
Fig. 11. Constructing fuzzy rule using genetic algorithm.
1588
T. Katayama et al. / Journal of Materials Processing Technology 155–156 (2004) 1583–1589
the fitness of the genetic algorithm. Roulette formula and one point crossover shown in Fig. 10, will be used as scaling and crossover that has been used for Rastrigin problem. 3.3. Process of constructing fuzzy rule using genetic algorithm (GUI) The progress of constructing fuzzy rule using genetic algorithm is shown in Fig. 11. It can show the fuzzy rule visually on the PC monitor. All of the actual expert’s designs are already scripted on the source code. Computing will be started by pressing “Run” button. It shows fuzzy rule, percentage of progress, how many trials left, number of generation, and number of population. Fuzzy rule will be changing their shapes on every trial and that shape shown on screen will be the elite. Progress will end if it is end of trial and the shape shown on screen at that time will be the final answer of the progress.
4. Discussion and conclusion
4.2. Meaning of automatically adjusted fuzzy rule In recent study, the system was constructed that is useful for industrial use. This is to say, we have succeeded to construct the root of the system to be useful. The next problem is to construct the fuzzy rule to inference more products that has not been constructed on system. So the key-point for adapting genetic algorithm will be the fitness of the scheme, percentage of crossover, and percentage of mutation, but if this fulfills, system will have a rule with useful inference outputs. In recent study, fuzzy rule was constructed trial and error and also by optical. For example as shown in Fig. 12 if the characteristic value had overlapped completely with trapezoid, the inference will be definite (product A). If the characteristic value was on edge of trapezoid, inference will be ambiguous (product B). If the characteristic value was on out of bounds of the trapezoid, there will be no such inference for that process (product C). So, if the trapezoid was wide, it has a meaning of high possibility of such inference. By reviewing the shapes of the trapezoids that has been automatically tuned, process design rule is optically understandable.
4.1. Constructing fuzzy rule using numerous actual expert’s designs
5. Orientation for future
As mentioned before, fitness will be calculated using entire actual expert’s design and fuzzy rule will be constructed depending on that design. So if there were numerous designs scripted on the source code, there will be a possibility of inference well applicative designs. This is to say, if there were numerous designs on the system, the system is well experienced. Again, if constructing fuzzy rule by programmer’s trial and error and if there were numerous designs, it is impossible to construct such rule.
Genetic algorithm is useful for constructing the fuzzy rule using numerous designs, but there are still problems. Because there is limit to the scripted actual expert’s designs to calculate, there is a possibility of constructing extremely wide trapezoid scheme. That means if there was limited process for the inference, extremely wide trapezoid will output high fitness value. To solve this problem, adaptation of actual expert’s design that has not worked out well will be the solution. Registering that database will avoid from constructing extremely wide trapezoid.
Fig. 12. Concept of fuzzy rule.
T. Katayama et al. / Journal of Materials Processing Technology 155–156 (2004) 1583–1589
To prove the usefulness of the fuzzy rule that has been constructed by genetic algorithm, co-operating with company (Akamatsu Forsys Ltd.) will prove the usefulness. If the system outputs the useful design that has not been constructed to database in the system, this system will be proved that it is reliable on cold forging process design.
1589
References [1] T. Hirai, T. Katayama, et al., Expert system for cold forging using fuzzy theory, J. Jpn. Soc. Technol. Plasticity 34 (1993) 428–435. [2] T. Katayama, K. Akamatsu, et al., Expert system for cold forging using fuzzy theory, J. Jpn. Soc. Technol. Plasticity 36 (1995) 35–40. [3] M. Cayrol, H. Farreny, H. Prade, Fuzzy pattern matching, Kybernetes 2 (1982) 103–116.