Modeling and Simulating of Uncertain Quality Abnormity Diagnosis

There is much fuzzy uncertain information during the diagnosis of quality abnormity. The effective utilization model of that can provide important decision-making support. In this study, we consider three main types of fuzzy production rules, which can be used in fuzzy quality abnormity diagnosis problem and their presentation models are constructed by use of Fuzzy Reasoning Petri Nets (FRPNs). Considering of the graphic representation and logic structure of FRPNs, we propose the method for simulating model using Matlab toolbox state flow. By establishing a corresponding relationship between FRPNs rules and state flow block diagram, three simulating models for the three corresponding FRPNs' basic structure are developed. Finally, we give an application case of the proposed model. Taking place truth degree data of FRPNs as input, the diagnosis process and results can be shown dynamically in the state flow simulating model under Matlab environment. The result illustrated that the method proposed can give reliable information for process maintenance and abnormal causes' location.


INTRODUCTION
Constantly steady product quality is always the goal that manufacture pursues.In order to improve the product quality and ensure the process satisfy the given performance index, the quality abnormity or fault during manufacturing process must be detected, diagnosed and eliminated.From the view of quality control, modern manufacture is a complex system composed by man, machine, material, method, measure and environment, the produce and spread of quality abnormity is a typical dynamic process.On the one hand, a abnormal state may incur a series of successive states.This is the concurrence of quality abnormity.On the other hand, an abnormal state may be incurred by many causes, i.e. many original abnormal causes spread along different ways may incur the same system abnormity.There is great uncertainty and fuzziness during the process of abnormity detect and diagnosis.
In order to deal with vague or fuzzy information, Fuzzy Petri Nets (FPN) have been introduced and focused on by many researchers.As a model of knowledge-based systems, FPN are used for fuzzy knowledge representation and reasoning.Looney (1988) reviewed reasoning by means of transformations of the truth states by rule matrices and adopted Fuzzy Petri Nets through the application of Boolean Matrices to simulate actual situations.Fuzzy logic networks are used to modify Petri Nets, allowing rule-based decision systems to be represented and executed.The fuzzy simulation theory adopted "MIN" operator to handle "AND" problems and "Max" operator to handle "OR" problems.Chen et al. (1990) adopted a Fuzzy Petri Net Model to represent the fuzzy production rules of a rulebased system.This model could represent expert knowledge and support fuzzy reasoning.Mirko and Makajic-Nikolic (2004) and Daniel et al. (2003) proposed that Fuzzy Petri net based on the fuzzy production rules can express and deal with ambiguity knowledge well and reason according to the confidence of transition and find the causes of the failure.Also, it has been used in modeling and analyzing fault diagnosis systems for gas turbines, CNC machine tools, transformers, communication safety and manufacturing systems (Xiao-Guang et al., 2000;Jing et al., 2004;Jian-Yuan et al., 2003;Li-Xin et al., 2003;Riascos et al., 2004;Rangel et al., 2005;Han and Daoquan, 2002).
Fuzzy Petri net is a good tool for discrete event dynamic systems modeling and analyzing.It can describe fuzzy knowledge and carry out concurrent logic reasoning.The spread of abnormity is that a great disturbance or abnormal cause induces the other abnormal state.In the abnormal state spread model, transition represents the necessity that the result must be true if the precondition is true.The abnormity diagnosis is the process to locate the assignable causes based on the detected abnormal phenomena.It is a backward reasoning process along the opposite direction as the abnormity spread.So causal analysis based on the Petri net model of abnormal state spread can provide important information for abnormity diagnosis.
Firstly, this study proposed a fuzzy reasoning Petri nets model that can denote the produce and spread process of quality abnormity.Then simulating method of the model by use of the state flow under Matlab environment was developed.

FUZZY PRODUCTION RULE AND ITS PRESENTATION WITH FRPNS
Type of fuzzy production rule: Fuzzy production rule is a method to describe the uncertain and inaccuracy knowledge.It contains four types as follows: and … and ( ) where θ j denotes the truth degree of precondition place or result place in fuzzy rule R i and c i denotes the confidence level of fuzzy rule R i .
The fourth type rule is avoided in the rule base since it is hard to obtain certain implication.The discussion following is mainly for the first three types.
Presentations of rules: Fuzzy Reasoning Petri Nets represent the syntactic structure of knowledge system based on rules.It uses place to denote proposition and each place contain a token taking value in (0, 1) to signify the truth degree of proposition.Transition firing is used to represent the rule reasoning process.The confidence level of proposition is determined by the corresponding transition.The arc between place and transition denotes the cause-effect relation between.

Proposition and rules:
The first three types rules' presentation by FRPNs is shown as Fig. 1to 3.

Process of negative propositions:
The supplementary arc is introduced considering the negative propositions contained possibly in the rules.It is denoted by adding small circle in the end of traditional arc.For example: R (0.8): IF p 1 (0.8) and p 2 (0.9) and (not 3 (0.7) p ) THEN (not p 4 (θ 4 )

DEFINITION OF FRPNS MODEL
Fuzzy reasoning Petri nets is defined as a 8-tuple: (P, R, I, O, H, θ, γ, C).where P = {p 1 , p 2 ,…, p n } is a finite set of places, R {r 1 , r 2 ,…, r n } is a finite set of transition rules; I: P×R → {, 1} is input function representing the mapping from precondition places to transition rules; O: R× P→ {0,1] is output function representing the mapping from transition rules to result places; H: R× P→ {0, 1} is a matrix of supplementary arc reflecting the link situation of supplementary arc between proposition places and transition rules; θ i ∈ [0, 1], i = 1, 2,…, n denotes the truth degree of place i p and its original state is denoted by θ 0 ; γ = (γ 1 , γ 2 ,…, γ n ); is vector of marking, where γ i ∈ {0, 1}, 1, 2,…, n denotes the presence or absence of token in place i p and its original state is denoted by γ 0 .C = diag (c 1 , c 2 ,…, c m ) is a diagonal matrix of confidence level and c i ∈ {0, 1}, I = 1, 2,…, m denotes the confidence degree of rule.

RUNNING RULE FOR FRPNS
Two operators as following are adopted as FRPNs carrying out the reasoning rules: The running process of FRPNs includes rule enabling and firing:  A necessary and sufficient condition for rule enabling is that all the precondition places are marked;  Under the marking state  , a new marking state '  is produced after the rule j r was fired, satisfying In the FRPNs model, all rules can be fired simultaneously.Firing vector is used to denote the firing state of rules, µ j takes value 1 or 0 determined by whether or not rule r j is fired.
 When a group of fuzzy rules are fired, marking vector and truth-degree vector change with the following equations:

SIMULATION MODEL CONSTRUCTION WITH STATEFLOW
In order to validate the running process and reasoning result of the FRPNs model constructed as above, appropriate simulating tools must be adopted.
For its particular graphic representation and logic structure, traditional Petri net software, such as PNK (Wu, 1997), CPN, VPNT (Dennis and Wassim, 1989) and Visual Object ++, is hard to simulate and analyze its performance.
Stateflow overview: Simulink/State flow is a tool package of software Matlab, which is a graphic simulating tool for the finite state machine and can be used to design, analyze event-driven system.For complex monitoring problem, user can utilize graphic tools to realize the states transition.The monitoring logic produced by state flow can be embedded in simulink model and the two can be connected seamlessly.
State flow is a tool to design and simulate complex response system and event driven system.It combines theory of infinite state machine, flow chart and state transition in special manners.It adopts object-oriented programming idea, i.e. property, event and method, to describe the physical model in graphic manner.The characteristic of state flow as follows: Event specifies an event that causes the transition to be taken, provided the condition, if specified, is true.Specifying an event is optional.The absence of an event indicates that the transition is taken upon the occurrence of any event.Condition specifies a boolean expression that, when true, validates a transition to be taken for the specified event trigger.Enclose the condition in square brackets ([]).Condition action follows the condition for a transition and is enclosed in curly braces ({}).It is executed as soon as the condition is evaluated as true and before the transition destination has been determined to be valid.If no condition is specified, an implied condition evaluates to true and the condition action is executed.Transition action executes after the transition destination has been determined to be valid provided the condition, if specified, is true.If the transition consists of multiple segments, the transition action is only executed when the entire transition path to the final destination is determined to be valid.Precede the transition action with a backslash.
 Object hierarchy, concurrent states and historic transition record are supported under state flow.So complex system can be stratified, simulated simultaneously and transition target state can be selected depending on historic record. Temporal logic can be simulated by use of time operator as follows: before, after, at and every. Monitoring logic can be constructed by state flow block diagram.Combined with the function of conditional execution system of Simulink, the subsystem can be activated or inhibited selectively and the dynamic simulation domain of Simulink is expanded.
Based on above-mentioned characteristic, State flow is suitable for simulating fuzzy reasoning Petri nets model based on event-driven.FRPNs model of fuzzy quality abnormity diagnosis is discrete event system and its simulating programmer can be developed by use of State flow (Michaela et al., 2005;Davidrajuh, 2008;Ji-Ping et al., 2006;Jinsong et al., 2007).Under state flow environment, the correctness of state flow block diagram can be checked by setting breakpoint use debugger tool and its execution process can be displayed dynamically.Corresponding with the basic structure of FRPNs aforementioned, its construction rules of state flow model are as follows: Rule I: As for type I FRPNs structure, there is only one transition after output arc of many places and only one place after output arc of transition.The input places of transition are denoted by a group of concurrent super states, P 1 ~ Pk-1 and each super state contain two mutually exclusive states: Normal and Abnormal.The transition between these two states is determined by the truth degree a j of place.State entry action En can be executed when transition happens between the two states and the state attribute is assigned a value with the truth degree a j of place, i.e., en: pk-CL = ak, event E is also triggered at the same time.The output places of transition are denoted by concurrent super states, P k and it contains two mutually exclusive states: None and on, which represent whether or not there is assignable cause respectively.The event E is the trigger of the transition of the two states.The result of logic expression of all The transition between these two states is determined by the truth degree a 1 of place.State entry action En can be executed when transition happens between the two states and the state attribute is assigned a value with the truth degree a 1 of place, i.e., en：p1-CL = a1, event E is also triggered at the same time.The output places of transition is denoted by a group of concurrent super states, P 2 ~Pk and each contain two mutually exclusive states: None and On.The event E is the trigger of the transition of the two states.The result of logic expression of input state is the condition of the transition.The value of rule confidence is assigned in "Transition action".As shown in Fig. 6.

Rule III:
As for type III FRPNs structure, there is only one place after output arcs of many transitions and only one place before input arc of each transition.The input places of transition are denoted by a group of concurrent super states, P1~ Pk-1 and each super state contains two mutually exclusive states: Normal and Abnormal.The transition between these two states is determined by the truth degree a j of place.State entry action En can be executed when transition happens  between the two states and the state attribute is assigned a value with the truth degree aj of place, i.e., en: pk-CL = ak, event E is also triggered at the same time.The output places of transition are denoted by a concurrent superstate, Pk and it contains two mutually exclusive states: None and On.The event E is the trigger of the transition of the two states.The result of logic expression of all input states is the condition of the transition.The value of rule confidence is assigned and the truth degree of all input places is maximized in "Transition action".As shown in Fig. 7.The diagram of this case is shown as Fig. 9.
According to the method mentioned in section V, the case can be simulated by state flow model as Fig. 10 under Matlab environment.The diagnosis process can be shown dynamically and give the result at AC state finally.After simulating, the result is: f-pc3 = 0.54, f-pc2 = 0.59 and f-pc3 = 0.15.It shows that because pc3 has the highest contribution degree to current abnormity and should be checked prior to others.

CONCLUSION
In this study, fuzzy quality abnormity diagnosis model is constructed by use of FRPNs and its simulating model is established using state flow.The application result shows that the method proposed can dynamically show the diagnosis process following the given FRPNs and give the contribution degree of every assignable cause to the current process quality abnormity.The further study can be focused on the evaluation of the abnormity fuzzy membership degree based on control chart, so a complete diagnosis model can be constructed which takes control chart data as input, calculates its fuzzy abnormity degree and then output to the model developed in this study.

Fig. 4 :
Fig. 4: FRPNs presentation of the negative propositions Its presentation with FRPNs is shown as Fig. 4. The negative propositions of propositions ( ) p  is denoted Stateflow overview: Based on finite-state machine theory, state flow model can transform from one state into the other and execute a series of actions if the firing condition is true.The state flow block diagram is graphical representation of finite-state machine.In state flow block diagram, state, transition, state action and marking label of transition are used to represent the place, directed arc and transition rule of Petri net respectively.According to the transition relation and monitoring logic, state flow simulating model of FRPNs can be constructed by use of above elements.

Fig. 5 :
Fig. 5: State flow simulating model of type fuzzy reasoning rule input states is the condition of the transition.The value of rule confidence is assigned and the truth degree of all input places is minimized in "Transition action".As shown in Fig. 5. Rule II: As for type II FRPNs structure, there are many places after output arc of transition and only one place before input arc of transition.The input place of transition is denoted by a concurrent super state, P 1 and it contains two mutually exclusive states: None and On.The transition between these two states is determined by the truth degree a 1 of place.State entry action En can be executed when transition happens between the two states and the state attribute is assigned a value with the truth degree a 1 of place, i.e., en：p1-CL = a1, event E is also triggered at the same time.The output places of transition is denoted by a group of concurrent super states, P 2 ~Pk and each contain two mutually exclusive states: None and On.The event E is the trigger of the transition of the two states.The result of logic expression of input state is the condition of the transition.The value of rule confidence is assigned in "Transition action".As shown in Fig.6.

Fig. 6 :
Fig. 6: State flow simulating model of type fuzzy reasoning rule

Fig. 7 :
Fig. 7: State flow simulating model of type fuzzy reasoning rule

transition compose the basic framework of state chart
: Under the environment of state flow toolbox, state is represented with block diagram and each state includes four actions as follows, entry, during, exit and on event name.They denote the action when entering the state, during the state, exiting the state and event happening with specific name, respectively.Transition is denoted by array line, showing the ways of transition.Its label format is: event [condition] {condition action} /transition action.