CHAPTER 3 Maintenance Strategy and Operations and Its
4.4 Structure of Knowledge-Based System
As a branch of Artificial Intelligence, Knowledge-Based Systems have a better capability to provide a flexible meaning than conventional methods to gain the solution of a variety of problems (Liao, 2005). A KB System emphasizes its purpose to assist a person’s thinking process on the problem solving (Awad, 1996). But, instead of merely doing numeric computation, a KB System provides some logical reasons under its recommendation by employing stored information within its databases through embedded rule-based systems. Therefore, the solution proposed by a KB system should be as valid as the solution from a domain expert (Ammar-Khodja et al., 2008). The structure of rule-based systems within a KB System is illustrated in Figure 4-8.
Figure 4-8 Structure of a Knowledge-Based System, adapted from Giarratano and Riley (2005)
Similar with the above structure proposed by Giarratano and Riley (2005), Hopgood (2001) also noted the similar key elements of KB System, which are knowledge acquisition, knowledge base, explanation facility, inference engine and interface modules. In summary, the architecture of a KB System consists of three main elements namely knowledge base, knowledge acquisition and representation, and inference engine. In practice, some other elements are
INFERENCE ENGINE AGENDA WORKING MEMORY (FACTS) KNOWLEDGE BASE (RULES) EXPLANATION FACILITY KNOWLEDGE ACQUISITION & REPRESENTATION
FACILITY
P a g e | 53
required to enable its operation. The explanations of the main elements of a KB System are presented below.
4.4.1 Knowledge Base
A knowledge base consists of facts and rules. Facts might include sequences, structured entities, attributes of entities, and the relationship between them which are assumed to be correct at the time when they are used (Hopgood, 2001). ‘Fact’ is also defined as the general statement which refers to either temporary or permanent knowledge (Mohamed, 2012). Meanwhile, ‘rule’ (also known as production rule) is a method to represent knowledge by using facts. A global database of facts is used in rules as the knowledge base (Giarratano and Riley, 2005). In the KBS/ES, facts as the problem-specific information are stored in the database, while production rules as the expressed knowledge are stored in knowledge-base (Negnevitsky, 2011). Both of them will be used for the Inference Engine.
Expressing facts in rules could be done in a simple way. Production rules consist of two parts; antecedent which uses IF statements and consequent which uses THEN statement (Negnevitsky, 2011), in the form of:
IF <premise/condition> THEN <conclusion/action>
antecedent consequent
with an example:
IF the red light is triggered THEN the machine is stopped
In a more complex condition, where there are more than one premises or conclusions, the production rules will be complemented with AND and OR statements, in the form of:
IF <premise/condition> AND <premise/condition> THEN <conclusion/action> OR
<alternative>
with an example:
IF the manufacturing team involved in deciding the manufacturing process flow AND the engineering team involved in deciding the manufacturing process flow AND the maintenance team involved in deciding the manufacturing process flow AND the quality team involved in deciding the manufacturing process flow
P a g e | 54
AND the product development team involved in deciding the manufacturing process flow
AND the marketing team involved in deciding the manufacturing process flow AND the manufacturing process flow considering the aspect of cost
AND the manufacturing process flow considering the aspect of safety AND the manufacturing process flow considering the aspect of maintenance THEN the manufacturing process chosen is good and considering multifunctional
requirements
OR the manufacturing process chosen is poor and fragmented without considering multifunctional requirements
Rules should be clear, expressive and straightforward (Hopgood, 2001). To apply rules, a system requires access to facts that could be derived from database, connected sensor, or interactive user.
4.4.2 Knowledge Acquisition and Representation
Knowledge acquisition consists of eliciting, analysing and interpreting the knowledge from the human expert (Awad, 1996). The expert for this needs are either knowledgeable people conceptually, or the experienced user practically. The techniques applied for acquiring knowledge could be through discussion, direct interviews or indirect questionnaire. The communication with experts will be used to develop a knowledge base while input from experienced user intended to ensure that the system is developed as intended.
Knowledge representation aims to ease computer in reasoning and understanding the relationship between elements of the knowledge base (Jones, 2008). Due to its contribution to solving the problem, the way to store knowledge is the important part of knowledge representation. It enables storing knowledge into the system automatically by the user without explicitly coding the knowledge (Giarratano and Riley, 2005). It does not only locate knowledge in a structural manner in knowledge directory but also be able to process acquired knowledge to generate reason as the basis for decision making. There are some mechanisms used for knowledge representation, such as semantic networks, frames, proportional logic and first-order (predicate) logic (Jones, 2008). The first two are used to merely store knowledge on a proper way to represent knowledge, while the latter two are intended to process knowledge as well.
P a g e | 55 4.4.3 Inference Engine
Inference engine works to make inferences through linking rules with suitable facts, prioritise the satisfied rules and execute rules based on priority (Giarratano and Riley, 2005). Simply, it is a tool to determine which rules to apply and when to apply them (Hopgood, 2001). The famous methods which are used frequently are forward chaining and back chaining. The explanations about those two methods are discussed in much more detail in the following section.
4.4.3.1 Forward Chaining
Forward chaining, also called data-driven, is usually used for the problem of interpretation to find out whether the system can inform about some particular data (Hopgood, 2001). It is used to generate the solution by adding a new fact to the system (Russell and Norvig, 1995). Then the selected rules are applied regarding the current fact-based of which it is comprised of all facts derived from rules or direct supplies and stored in the system (Hopgood, 2001).
According to Hopgood (2001), forward chaining as a data-driven approach is started by examining all rules from fact-based without corresponding to the predetermined goal. It means that data is considered as much as possible while the output is unpredictable. All satisfied rules are then triggered which lead to making up a conflict set among some rules. As only one rule could be fired, a conflict resolution approach is required to select a satisfied rule in such given cycle. The illustration of forward chaining is presented in Figure 4-9.
Figure 4-9 Forward and Backward Chaining approach (Mohamed, 2012)
Rule 1 Rule 2 Rule 3 Rule 4 Forward Chaining Backward Chaining A B C D E F G H I
P a g e | 56
By symbolising the initial facts as A, B, C, D, and E, so the production rules are as the following:
IF A AND B THEN F IF C AND D THEN G IF F AND G THEN H IF E AND H THEN I
The initial known facts A and B direct us to conclude F through Rule 1, so F is now a known fact. We also have initially known facts C and D which direct us to conclude G through Rule 2, so G is now another known facts. Through the known facts F and G, we can conclude H through Rule 3. Since we now know H and already know E at the beginning, we can conclude I through Rule 4. Since I is the solution, the forward chaining will stop here.
4.4.3.2 Backward Chaining
Backward chaining or goal-driven works backward by considering the solution of given problem and establishing the premises of the implications to reach such solution (Russell and Norvig, 2010). It chooses to specify the goal as the initial step to solve the problem. As it is intended to find the focused solution, only those rules which contribute to the achievement of goal will be selected and examined (Hopgood, 2001).
When some particular rules are selected to reach the goal, the conditions to support those rules are required. Thus those rules become the new sub-goals which also need some supporting rules to fulfil their condition. This backward chaining process continues until it works back to the fact of the problem (Luger, 2009). The illustration of backward chaining is also presented in Figure 4-9. By using the similar symbol as in the forward chaining illustration, I is defined as the conclusion. To achieve this conclusion, we need to know facts H and E through Rule 4. E is already known as initial facts. To know H, we need to know facts F and G through Rule 3. To know F, we need to know facts A and B through Rule 1, while to know G, we need to know facts C and D through Rule 2. Next, we find that A, B, C, and D are the initial facts. Since all initial facts already found, we can verify that I can be concluded by finding facts and rules through backward chaining.
P a g e | 57