Strojniški vestnik - Journal of Mechanical Engineering 56(2010)6, 402-408 UDC 621.7/.9:658.51:005.53 Paper received: 12.09.2009 Paper accepted: 16.04.2010 Conceptual Framework for NPN Logic Based Decision Analysis Goran Devedžič1* - Miodrag Manic2 - Dejan Tanikič3 - Lozica Ivanovič1 - Nenad Mirič4 1 University of Kragujevac, Faculty of Mechanical Engineering, Serbia 2 University of Niš, Faculty of Mechanical Engineering, Serbia 3 University of Belgrade, Technical Faculty at Bor, Serbia 4 Emcon Technologies, Concord, Ontario, Canada The paper presents the methodology for multicriteria decision analysis based on negativepositive-neutral (NPN) logic, which is an extension of both crisp and fuzzy logic. As the basic modeling framework we use fuzzy cognitive maps (FCM) which are a set of meaningful concepts, connected to form a network, with fuzzy weighted links measuring the strength and direction of effect of cause concept over target concept. Introducing NPN logic to FCM modeling framework provides the possibility to measure, the so-called, side effect of each decision-making path. This information additionally describes under what mutual conditions between concepts FCM settles down in equilibrium. An illustrative example from the real industrial environment related to metal cutting process planning parameters analysis demonstrates the potential of the methodology. ©2010 Journal of Mechanical Engineering. All rights reserved. Keywords: NPN logic and NPN relations, fuzzy cognitive maps, decision analysis, process planning 0 INTRODUCTION Decision-making about complex systems aimed to direct the appropriate actions to ensure their optimal operation is very demanding. So far numerous approaches have been proposed and presented for that purpose, enabling decision makers to create more or less reliable solutions. However, decision analysis and reasoning about potential effects of initially generated solutions (e.g. process plans, control actions, etc) remains a challenging and insufficiently explored research field. One of the most important steps toward a complex systems decision analysis is proper description of relationships between various elements (concepts) of a system in order to provide knowledge representation and inference. Such description of a problem should utilize experts' beliefs and cognition about a problem, yielding thorough analysis, reliable forecasting and decision-making [2], [9], [15]. This kind of problem statement directs us to knowledge engineering methodology and development of expert systems. When modeling a complex system using expert system technology a complete, consistent, and unambiguous knowledge base is supposed to be developed among other components. Troubles arise during the knowledge elicitation process with a domain expert who provides us with facts, information, and data according to personal experience, cognition, beliefs, and tastes. The same holds for knowledge acquisition of a problem through analysis of literature sources, since some information, data and recommendations are subjective due to the complexity of a given system. Therefore, knowledge bases usually show inconsistency, leading to expert system failure. Another shortcoming that troubles conventional approaches to complex systems modeling is related to the type of relationships between system variables. These appear quite often to be rather causal than explicit IF-THEN rules. Depending on what kind of a system is being modeled, its dynamics can additionally bring difficulties in knowledge base development [7], [9], [17]. Advances in psychological studies, together with human abilities and habits to draw a crucial concepts and connections between them when analyzing complex problems, creating representational model, brought new powerful methodology called cognitive maps (CM), which are a graphical representation of causal relations of a problem [1], [14]. Cognitive maps (in decision making) were introduced in 1976 by Axelrod [1]. In 1986 Kosko suggested more general framework, fuzzy cognitive maps (FCM) [4], introducing fuzzy sets theory in a theory of cognitive maps, giving it additional power. *Corr. Author's Address: University of Kragujevac, Faculty of Mechanical Engineering,Sestre Janjič 6, 34000 Kragujevac, Serbia, devedzic@kg.ac.rs FCM is a network of nodes which are influential and meaningful concepts, objects, attributes or events of a system [1], [4-7], [11]. In general, nodes of FCM can be viewed as distributed (fuzzy) expert systems or DSS [16,17]. All these systems are designed to provide an optimal solution. However, "optimal" quite often means "idealistic" or "impossible". Fortunately, "near to optimal" solution (parameter value) is satisfactory in most cases, after tuning values of all the system's concepts to ensure stable or equilibrium state of a system under "near to optimal" concepts' values. This policy saves time, increases the system's resources efficiency and decreases costs. Providing a description of complex system behavior, based on experts' experience and learned knowledge, FCMs enable thorough analysis and provide an answer to the what-if question. An if input vector of data is composed from outputs of DSS lower levels. An FCM output gives the answer what happens when an input vector affects a system, suggesting possible actions that bring an equilibrium or a stable state to a system. In other words, FCM is a qualitative tool, which cannot give an exact mathematical answer but rather points out the gross behavior of a system and shows global patterns of behavior of expert beliefs [1,2], [4-7], [9-12], [16,17]. Traditional decision support systems DSS structure lacks at least three important features: (1) uncertainties handling and corresponding approximate reasoning abilities, (2) learning capabilities, and (3) decision analysis. Last decade brought significant progress and improvements related to the first two "missing" features [8], [13], [3]. However, no significant results have so far been reported on the third feature. Real-world (e.g. industrial) practice shows that initially generated solutions usually require adaptation, adjustment and tuning, which refer to decision analysis and adaptation reasoning. Therefore, such a special module should upgrade DSS structure to support (postprocessing) adaptation decision-making. We present a part of both research work and preliminary results of testing in a real industrial environment. The paper is organized as follows. The next section briefly reviews the theoretical background of FCMs, particularly emphasizing negative-positive-neutral logic and relations based approach, employed in the presented methodology. The third section describes process planning decision analysis by FCMs. Illustrative example reports preliminary research results of FCMs applications in the field of machining parameters analysis and adaptation reasoning with respect to surface quality. The research has been conducted in both laboratory and the industrial environment. 1 THEORETICAL BACKGROUND OF FUZZY COGNITIVE MAPS, NPN LOGIC AND NPN RELATIONS Modeling of large systems requires a high level of expertise in order to properly identify and present complex interrelationships between various elements. In addition to creating a map of system's elements and their relationships, a very important contribution to understanding its behavior can be acquired from human experts. Naturally, humans express their experience and beliefs descriptively, emphasizing causal relationships between elements, and also descriptively (linguistically) evaluating their parameters' values instead of precisely doing it. Based on this a graphical approach to model a system can be used and related knowledge can be captured. Such approach picture cause and effect relations creating system's cognitive map as cognitive maps are a representation of relationships that are perceived to exist among the attributes and / or concepts of a given environment [16]. A fuzzy cognitive map is an extension of a cognitive map and also a graph-based structure. Graph nodes represent concepts or events or data points or objects. These are partially interconnected according to mutual influence and dependability. Links between nodes are directed to demonstrate causation course and if a mutual relationship exists, then the effect node influences the cause node too, providing the network with feedback. In other words, feedbacks show whether the effect node excites the cause node as well. That is, effect nodes may affect cause node, which turn them to be cause nodes as well, and cause nodes to be effect nodes. Furthermore, feedbacks introduce dynamics to FCMs enabling to model the dynamic world. Links have their weights showing the strength of cause node influence to target node. Unconnected nodes or unrelated nodes have zero-strength links, which are usually not shown. Weights are signed since an increase of cause node value can demonstrate either an increase or decrease of target node value. Positive links indicate movement in the same direction: if the cause node value increases, the target node value increases, and if cause node value decreases, the target node value also decreases. Negative links indicate movement in the opposite directions: if the cause node value increases, the target node value decreases, and if cause node value decreases, the target node value increases. Formally, FCMs are signed, fuzzy weighted and directed graphs with feedback. The concept nodes Ci are fuzzy sets or even fuzzy systems. The links, or the so-called edges, define the rules or causal flows between the concept nodes. The directed link (edge) wij, from causal concept Ci to target (effect) concept Cj, measures how much Ci causes Cj. Connection n-by-n matrix W contains weights of all the edges representing weighted causation rules of system behavior. The edges' weights wy take values in the fuzzy causal interval [-1, 1]. The edge weights wy are constant and only the node values change in time. In such a setting, FCM works by repeatedly passing state vectors Cy through the FCM connection matrix W, thresholding or nonlinearly transforming the result after each pass [4-7]. The output of FCM is an equilibrium state, which gives the answer to a causal what-if question: what is the equilibrium state for the system if excited by the stimuli. Thus, a set of if-then rules is captured by the network structure, which causally describes a system or a situation. More precisely, such networked structure encodes (fuzzy) rules, which are fired upon a given set of initial conditions and on the underlying dynamics of the network, i.e., fuzzy cognitive map. The FCM modeling framework involves negative edge weights as well, i.e. edge weights in trivalent {-1, 0, 1} or multivalent [-1, 1] interval, so an adequate logical and relational system to support reasoning with such values is needed. The extensions of classic crisp logic, fuzzy logic, crisp relations and fuzzy relations had been proposed by the end of 80's through, the so called, NPN logic and NPN relations [16, 17]; NPN stands for "Negative-Positive-Neutral". NPN logic variable (both crisp and fuzzy) may take value in a [-1,+1]. In addition to three individual values from [-1,0), {0}, (0,+1], NPN logic variable may also have three compound values: (N, 0), (0, P), (N, P). While the crisp value pair (x,y) = {-1, +1} carries little or no information, an NPN fuzzy logic value pair (x, y) may carry substantial information. This structure plays an important role in approximate reasoning. This approach provides possibility to count, the so-called, side effect of each decision-making path. Side effect measures under what mutual conditions between concepts FCM settles down in equilibrium. The third case of a value pair (a, b) is the most informational and fully describes the side effect since if lower bound value a = N is dominant over upper bound value b = P, i.e., |N| > |P|, when FCM comes to equilibrium, that will cause negative effect from i-th object to j-th object but will on the other hand also produce a positive effect to some extent. That means that equilibrium in the system can be reached only if object i negatively causes object y to some degree, and takes a positive effect from object y to some lower degree. Object i cannot cause object j with no harm from object j, i.e., without (positive) side effect. Similarly, if upper bound value b = P is dominant over the lower bound value a = N, i.e., |N < |P|, that will cause a positive effect from i-th object to j-th object but also will oppositely produce negative effect to some extent. In this case object j produces a negative side effect to object i. No dominancy (|N| = |P|) resembles Newton's action-reaction law. As much as we gain from one side, we lose from the other. Any NPN logic value can be represented as an ordered pair in [-1, 1] x [-1, 1]. The NEG, AND, and OR functions for both NPN crisp and fuzzy logics can be compactly described by the following three logic equations: NEG(x, y) = (NEG(y), NEG(x)) , (1) (x, y) * (u, v) = (min(x * u, x * v, y * u, y * v), max(x * u, x * v, y * u, y * v)) , (2) (x, y) OR (u, v) = (min(x, u), max(y, v)) . (3) The star operator (*) in Eq. (2) stands for a general conjunction operator that may be any T-norm extended from the interval [0, 1] to [-1, 1]. The extension is made as follows: x * y = sign(x) sign(y)(|x| * |y|) , (4) where x and y are singleton NPN values (fuzzy or crisp). In this paper we use • (dot or product) operator, but it should be noted that T-norm operator selection is domain depended matter. For the sake of briefness we will skip formal definitions of crisp and fuzzy NPN relations (one can look for it in [16,17]) and introduce the following two definitions of transitivity and (heuristic) transitive closure, which play an important role in reasoning with NPN relations. Definition: An NPN relation R (crisp or fuzzy) in X x X, where X = {x1 , x2 , ..., xn} is finite set, is NPN (max-*) transitive if, for all i, j, and k, 0 < i, j, k < n, ^r(x! , Xk) > max (^r(x , xj) * |Ur(x , xk). xj (5) The (max-*) composition of two NPN relations R c X x Y and Q c Y x Z, denoted by R o Q, is defined by Mr o q = max (Mr (x y) * Mq y z)), y (6) x e X, y e Y, z e Z . Definition: The transitive closure R of an NPN relation R (crisp or fuzzy) in X, is the smallest (max-*) transitive NPN relation containing R. Since the NPN logics used for transitive closure computation can be considered as a set of rules (heuristics), such closure is called a heuristic transitive closure (HTC) of R. Using an heuristic path-searching algorithm [16] the possible and the most effective paths from one concept to another can be found. This means, that the paths between elements (concept nodes) of FCM with the strongest negative and positive side effects that constrain decision making according to the above two definitions can be found. increase of costs. Therefore, the previously generated solution, i.e. its influential parameters, needs to be adjusted. However, adjusting any of influential parameters usually affects others. Such an effect, i.e. a side effect, can be acceptable, unacceptable and more or less indifferent, depending on the ratio of negative and positive values of a compound NPN relationship. The human ability to distinguish slight or big differences in information and data patterns, classify them in approximate categories, and use them with the previously gained knowledge to provide intelligent and reliable solution, is depicted by an FCM. Using this scenario we have analyzed process plans and cutting parameters selection and tuning procedure, and finally asked experts to draw a scheme that reflects system behavior (Fig. 1). 2 PROCESS PLANNING NPN FCM In the majority of real-practice cases we are not able to strictly follow recommendations, which turn out to be unrealistic (to some degree), difficult to realize and therefore time-consuming. These constraints are caused by the nature (of a part) of information and data, their human interpretation and the inability to realize an optimal solution without loss of overall effectiveness and unacceptable or necessary Fig. 1. NPN logic-based FCM of the machining parameters Usually the main objective in machining is to meet surface quality and accuracy requirements at low costs, respecting production and environmental constraints. This means that tooling and cutting parameters should be appropriately selected in order to achieve this goal. These parameters include, among others, cutting speed (v), cutting feed (s), depth of cut (8, average surface roughness (Ra), rake angle (y), entering angle (k), tool nose radius (r), cutting insert material quality (Q). Most of these parameters are easy to change and/or adjust and therefore the first to analyze. Although the selection of these parameters strongly depends on many other machining environment parameters e.g. workpiece material hardness or machine tool's conditions, later they are considered as constants, which cannot be changed and adjusted and which were processed by computer aided process planning expert system (CAPP ES) or expert during generation of prior solution. Let us suppose that prior solution generated by CAPP ES is not optimal in a sense that the selected cutting tool and cutting parameters produce low surface quality (concept node 8), i.e. cause defective products. This means that changes in process parameters would have to be made in order to achieve the required surface quality. For the FCM shown in Fig. 1 we have the following corresponding connection matrix: w i 0 -.3 -.5 .6 -.3 -.2 -.6 -.71 -.2 0 -.6 -.5 .1 .3 0 .8 -.5 -.6 0 0 0 .1 .3 0 .6 -.5 0 0 0 0 0 0 -.3 .3 0 0 0 0 0 0 -.2 .3 .1 0 0 0 0 -.5 -.6 0 .3 0 0 0 0 0 .8 0 0 0 -.5 0 0 , (7) Heuristic path searching algorithm identifies the most effective paths between any two concept nodes of NPN FCM. For critical node in this case (average surface roughness - Ra, concept node 8) we chose max-dot (max - •) transitivity composition defined by Eqs. (2) and (6). Identified heuristic paths are shown in Table 1. The obtained results provide an answer to the question what should we do if the prior solution for cutting parameters disables quality machining. By introducing a restriction or constraint factor RF in the form of RF = f(N,P) (8) where f is the function defined over compound values N and P, and compound value distance d(CV) = d(P, N) (Hamming distance) d(CV) = d(P, N) = N + |P| = P - N (9) and restriction strength RS = RF •d(CV) , (10) the obtained results can be refined in order to identify the most influential relationships whose negative or positive relationship values are the most restrictive and thus, direct us to the most effective problem recovery procedure. For the purpose of this research work and the illustration of the approach we have defined an empirical restriction factor RF using industrial recommendations as i max (| N |, | P | ) min(|N|,|P|) * 0 rf = j min(|N|,|P|) (n) |max(|N|,|P|)• 10, min(|N|,|P|) = 0 These factors are summarized in Table 2. Table 1. Heuristic paths and compound values of heuristic transitive (max - ■) closure Concept nodes C8 ^ Ci C8 ^ C2 C8 ^ C3 C8 ^ C4 C8 ^ C5 C8 ^ C6 C8 ^ C7 C8 ^ C8 Heuristic paths (8 1) (8 6 1) (8 6 2) (8 2) (8 2 3) (813) (8 1 4) (8 6 1 4) (8 1 4 2 5) (8 1 5) (8 6) (8 2 6) (8 6 3 7) (8 1 7) (8 1 7 3 2 8) (8 2 8) Compound values of heuristic transitive (max - •) closure (-.7, .1) (-.15, .8) (-.48, .35) (-.42, .06) (-.105, .21) (-.5, .24) (-.015, .42) (-.06, .64) Table 2. Restriction factors, compound values' distances, and restriction strengths Concept nodes C8 ^ Ci C8 ^ C2 C8 ^ C3 C8 ^ C4 C8 ^ C5 C8 ^ C6 C8 ^ C7 C8 ^ C8 Restriction factor (RF) 7.00 5.33 1.37 7.00 2.00 2.08 28.00 10.67 Compound value distance d(CV) .8 .95 .83 .48 .315 .74 .435 .7 Restriction strength (RS) 5.6 5.06 1.14 3.36 0.63 1.54 12.18 7.47 NPN logic based prior solution analysis provides a very informative result, i.e. the answer to a given question. Cutting speed (Ci) shows a very strong influence on surface quality (RS(v) = 5.60), which also reflects the known physical dependency of cutting process. In addition, cutting feed (C2) is also very influential (RS(s) = 5.06), in contrary to cutting depth (C3), entering angle (C5), and nose radius (C6), which have very low restriction strength factors (RS(S) = 1.14, RS() = 0.63, RS(r) = 1.54). High restriction strength factors of cutting insert quality (C7: RS(Q) = 12.18) and rake angle (C4: RS(y) = 3.36) point out the importance of their proper selection during initial process planning procedure. However, these parameters depend on a number of other factors thus changing them could increase machining costs and should therefore be changed only if cutting parameters' adjustment and tuning cannot bring the required surface quality. In that case the whole process planning procedure should be repeated in order to select appropriate cutting parameters for a new cutting tool. Finally, surface quality node (C8) itself clearly shows (upper bound value set to P=0.64, obtained through path C8-C2-C8) that as the cutting feed increases, the value of average roughness also increases, i.e., surface quality goes down. This conclusion is also supported by a small lower bound value (^=0.06), obtained through path C8-C1-C7-C3-C2-C8, which asserts that interaction of cutting speed, insert quality and cutting depth with cutting feed will not significantly decrease surface quality, if the last is appropriately selected. Therefore, in case of low surface quality the accuracy of cutting speed should first be checked, and then cutting speed should be adjusted. 3 CONCLUSIONS In our approach decision-making on essential parameters selection has been simulated and their (optimal) values upon relatively large number of interconnected influential process parameters have been determined. These influential parameters are usually context depended and the selection procedure is performed according to numerous imprecise and unreliable data and information, which are, to a great extent, empirical. In addition, process planners quite often make decisions upon their intuition, subjective experience and belief. Experts in the industry face these problems in their daily practice. However, accepting this situation as reality and taking into account the long-standing experience and learned (industrial) knowledge we propose to use it as power, instead of limitation, for generation of appropriate solutions. By using NPN logic and NPN relations theoretical background and introducing empirical refinement procedure some preliminary results of the research work related to the application of FCMs in metal cutting process planning decision analysis have been presented through testing the machining problem of low surface quality. The output provides in-depth information on the behavior of the system as a whole when the stimuli are introduced. Such information is strongly supported by the measure of a side-effect, which directs subsequent actions by a decision maker. Since decision-making and control processes are parallel, i.e., when make decisions we control the system, and if we control the system we have to make decisions, the approach can be applied to control problems as well, although these kind of problems are not the main concern of this paper. FCMs provide a modeling framework that successfully captures the gained knowledge and experience, enabling experts (process planners) to express their beliefs about (machining) system behavior. Additionally, an important and inevitable fact that makes FCMs so powerful is that when dealing with complex problems humans are apt to use more natural concepts, rather than only technical ones. Clearly, the results of the conducted research spur the need for special amelioration methodology for decision analysis and adaptation reasoning, which can successfully employ fuzzy cognitive maps. Further research also includes investigation of different types of FCM augmentation, learning of edge weights and their dynamical behavior. 4 ACKNOWLEDGEMENT Research work presented in the paper is funded by the Serbian Ministry of Science within the projects TR-12002 and TR-12010. 5 REFERENCES [1] Axelrod, R. (1976). Structure of Decision: The Cognitive Maps of Political Elites, Princeton University Press, Princeton NJ. [2] Bueno, S., Salmeron, J.L. (2008). Fuzzy modeling enterprise resource planning tool selection. Computer Standards & Interfaces, vol. 30, p.137-147. [3] Devedzic, G., Pap, E. (1999). Multicriteria -multistages linguistic evaluation and ranking of machine tools. Fuzzy Sets and Systems, vol. 102, p.451-461. [4] Kosko, B. (1986). Fuzzy cognitive maps. Int. J. of Man-Machine Studies, vol. 24, p. 65-75. [5] Kosko, B. (1997). Fuzzy engineering, Prentice Hall International, Inc., Upper Saddle River, New Jersey. [6] Kosko, B. (1992). Neural networks and fuzzy systems - a dynamical systems approach to machine intelligence, Prentice Hall, Englewood Cliffs, New Jersey,. [7] Kosko, B. (1988). Hidden Patterns in combined and adaptive knowledge networks. Int. J. of Approximate Reasoning, vol. 2, no. 4, p.377-393. [8] Marri, H.B., Gunasekaran, A., Grieve, R.J. (1998). Computer-aided process planning: A state of art. Int. J. of Advanced Manufacturing Technology, vol. 14, p. 261-268. [9] Miao, C.Y., Goh, A., Miao, Y., Yang, Z.H. (2002). Agent that models, reasons and makes decisions, Knowledge-Based Systems, vol. 15, p. 203-211. [10] Mohr, S.T. (1997). The use and interpretation of fuzzy cognitive maps, 66.698 Master's Project, Rensselaer Polytechnic Institute. [11] Nakamura, K., Iwai, S., Sawaragi, T. (1982). Decision support using causation knowledge Base, IEEE Transactions on Systems, Man, and Cybernetics, vol. 12, no.6, p. 765-777. [12] Schneider, M., Schneider, E., Kandel, A., Chew, G. (1998). Automatic construction of FCMs. Fuzzy Sets and Systems, vol. 93, p. 161-172. [13] Teti, R., Kumara, S.R.T. (1997). Intelligent computing methods for manufacturing systems. Annals of the CIRP, vol. 46, no. 2. [14] Yeap, W.K. (1988). Towards a computational theory of cognitive maps, Artificial Intelligence, vol. 34, p. 297-360. [15] Yu, R., Tzeng, G.H. (2006). A soft computing method for multi-criteria decision making with dependence and feedback. Applied Mathematics and Computation, vol. 180, p. 63-75. [16] Zhang, W.R., Chen, S.S., Bezdek, J.C. (1989). Pool2: A generic system for cognitive map development and decision analysis. IEEE Transactions on Systems, Man, and Cybernetics, vol. 19, no. 1, p. 31-39. [17] Zhang, W.R., Chen, S.S., Wang, W., King, R.S. (1992). A cognitive map based approach to the coordination of distributed cooperative agents. IEEE Transactions of System, Man, and Cybernetics, vol. 22, no. 1, p. 103-114.