0% found this document useful (0 votes)
17 views

Expert Systems (Unit 4)

Expert system Artificial intelligence

Uploaded by

Bhagavat Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Expert Systems (Unit 4)

Expert system Artificial intelligence

Uploaded by

Bhagavat Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Unit-4

Expert system

Expert systems are a crucial subset of artificial intelligence (AI) that simulate the decision-
making ability of a human expert. These systems use a knowledge base filled with domain-
specific information and rules to interpret and solve complex problems. Expert systems are
widely used in fields such as medical diagnosis, accounting, coding, and even in games.

The components of an expert system in artificial intelligence are:

 Knowledge base: Contains facts, regulations, and norms for problem-solving.


 Inference engine: Analyzes the knowledge base to identify a solution to a user's
problem.
 User interface: Allows a non-expert user to communicate with the expert system.
 Explanation module: Provides a justification for the conclusion.
 Knowledge acquisition and learning module: Gathers information from various
sources and stores it in the knowledge base.

Expert systems are computer programs that use knowledge-based architecture to solve real-world
problems. They are also known as knowledge-based systems, intelligent agent systems, or
knowledge systems.
Expert systems use two main inference techniques: forward chaining and backward chaining. In
forward chaining, the system starts with known facts and applies rules to draw conclusions. In
backward chaining, the system starts with a conclusion and checks rules to determine if the
conditions are satisfied.
Expert systems have many applications in industry, business, medicine, and science. However,
they are designed to solve problems for specific domains and may not work outside of their
scope
Types of Expert Systems in AI

In AI, expert systems are designed to emulate the decision-making abilities of human experts.
They are categorized based on their underlying technology and application areas. Here are the
primary types of expert systems in AI:

1. Rule-Based Expert Systems

 Description: Use a set of “if-then” rules to process data and make decisions. These rules
are typically written by human experts and capture domain-specific knowledge.

 Example: MYCIN, an early system for diagnosing bacterial infections.

2. Frame-Based Expert Systems

 Description: Represent knowledge using frames, which are data structures similar to
objects in programming. Each frame contains attributes and values related to a particular
concept.

 Example: Systems used for knowledge representation in areas like natural language
processing.

3. Fuzzy Logic Systems

 Description: Handle uncertain or imprecise information using fuzzy logic, which allows
for partial truths rather than binary true/false values.

 Example: Fuzzy control systems for managing household appliances like washing
machines and air conditioners.

4. Neural Network-Based Expert Systems


 Description: Use artificial neural networks to learn from data and make predictions or
decisions based on learned patterns. They are often used for tasks involving pattern
recognition and classification.

 Example: Deep learning models for image and speech recognition.

5. Neuro-Fuzzy Expert Systems

 Description: Integrate neural networks and fuzzy logic to combine the learning
capabilities of neural networks with the handling of uncertainty and imprecision offered
by fuzzy logic. This hybrid approach helps in dealing with complex problems where both
pattern recognition and uncertain reasoning are required.

 Example: Automated control systems that adjust based on uncertain environmental


conditions or financial forecasting models that handle both quantitative data and fuzzy
inputs.

Examples of Expert Systems in AI

There are many examples of an expert system. Some of them are given below:

1. MYCIN

 Overview: MYCIN is one of the earliest and most influential expert systems developed
in the 1970s. It was specifically designed for medical diagnosis.

 Functionality: MYCIN uses backward chaining to diagnose bacterial infections, such


as meningitis and bacteremia. It identifies the bacteria causing the infection by asking the
doctor a series of questions about the patient’s symptoms and test results.

 Significance: Although not used clinically, MYCIN greatly influenced the development
of medical expert systems.

2. DENDRAL
 Overview: DENDRAL is another pioneering expert system, developed in the 1960s, and
is regarded as one of the first successful AI systems in the field of chemistry.

 Functionality: DENDRAL was designed to analyze chemical compounds. It uses


spectrographic data (data obtained from spectroscopy) to predict the molecular structure
of a substance.

 Significance: DENDRAL revolutionized chemical research by automating the analysis of


mass spectrometry data.

3. R1/XCON

 Overview: R1, also known as XCON, was developed in the late 1970s by Digital
Equipment Corporation (DEC) and is one of the most commercially successful expert
systems.

 Functionality: R1/XCON was used to configure orders for new computer systems. It
would select the appropriate hardware and software components based on the customer’s
requirements.

 Significance: R1/XCON streamlined system configuration, saving DEC millions by


reducing errors and improving efficiency.

4. PXDES

 Overview: PXDES is an expert system designed for the medical field, particularly in the
diagnosis of lung cancer.

 Functionality: PXDES could analyze patient data, including imaging results, to


determine both the type and the stage of lung cancer. It helps in deciding the best course
of treatment based on the patient’s specific condition.

 Significance: PXDES aids in accurate, timely diagnoses, improving treatment decisions


in oncology.
5. CaDet

 Overview: CaDet is a clinical support system developed to assist in the early detection of
cancer.

 Functionality: CaDet can identify potential signs of cancer in its early stages by
analyzing patient data and symptoms. It works by comparing patient data with known
patterns and indicators of cancer.

 Significance: Early detection by CaDet enhances survival rates by enabling prompt


treatment.

6. DXplain

 Overview: DXplain is a medical expert system developed at Massachusetts General


Hospital, used as a clinical decision support tool.

 Functionality: DXplain suggests possible diseases based on the symptoms and findings
provided by a doctor. It acts as a reference tool, offering a differential diagnosis list that
doctors can use to check their own diagnoses.

 Significance: DXplain broadens diagnostic possibilities, helping medical professionals


consider rare conditions.

Components and Architecture of an Expert System

1. Knowledge Base: The knowledge base represents facts and rules. It consists of
knowledge in a particular domain as well as rules to solve a problem, procedures and
intrinsic data relevant to the domain.

2. Inference Engine: The function of the inference engine is to fetch the relevant
knowledge from the knowledge base, interpret it and to find a solution relevant to the
user’s problem. The inference engine acquires the rules from its knowledge base and
applies them to the known facts to infer new facts. Inference engines can also include an
explanation and debugging abilities.

3. Knowledge Acquisition and Learning Module: The function of this component is to


allow the expert system to acquire more and more knowledge from various sources and
store it in the knowledge base.

4. User Interface: This module makes it possible for a non-expert user to interact with the
expert system and find a solution to the problem.

5. Explanation Module: This module helps the expert system to give the user an
explanation about how the expert system reached a particular conclusion.

How Expert Systems Work?

Expert systems operate by following a structured approach:

1. Input Data: Users provide data or queries related to a specific problem or scenario.

2. Processing: The inference engine processes the input data using the rules in the
knowledge base to generate conclusions or recommendations.

3. Output: The system presents the results or solutions to the user through the user
interface.

4. Explanation: If applicable, the system explains how the conclusions were reached,
providing insights into the reasoning process.
Reasoning Strategies used by Inference Engine

Forward Chaining and Backward Chaining, which are two fundamental methods for
processing information and solving problems in an expert system:

1. Forward Chaining

This is a data-driven reasoning approach where the system starts with the available facts and
applies rules to infer new facts or conclusions. It’s typically used to predict outcomes or
determine what will happen next. An example given is predicting stock market movements.

2. Backward Chaining

This is a goal-driven reasoning approach where the system starts with a hypothesis or a goal
(something to prove) and works backward to determine which facts or conditions would support
that conclusion. It’s often used to diagnose issues by determining the cause of an observed effect.
The examples provided include diagnosing medical conditions like stomach pain, blood cancer,
or dengue.
Applications of Expert Systems

1. Medical Diagnosis: Expert systems assist doctors by analyzing symptoms and medical
history to suggest possible diagnoses or treatment options. For example, MYCIN, an
early expert system, helped identify bacterial infections and recommend antibiotics.

2. Financial Services: In finance, expert systems are used for credit scoring, fraud
detection, and investment advice. They analyze financial data and patterns to make
informed decisions.

3. Technical Support: Expert systems can troubleshoot and provide solutions for technical
issues. They guide users through problem-solving steps based on pre-defined rules and
knowledge.

4. Manufacturing: In manufacturing, expert systems help optimize production processes,


perform quality control, and manage inventory by analyzing data and making
recommendations.

Benefits of Expert Systems

1. Consistency: Expert systems provide consistent and reliable recommendations, reducing


the variability that can occur with human decision-making.
2. Availability: They are available 24/7 and can handle multiple queries simultaneously,
providing timely assistance and support.

3. Cost-Effectiveness: By automating expert-level decision-making, organizations can save


on the costs associated with hiring and training human experts.

4. Knowledge Preservation: Expert systems preserve valuable knowledge and expertise,


making it accessible even if the original experts are no longer available.

Limitations of Expert Systems

1. Knowledge Limitation: The effectiveness of an expert system depends on the


completeness and accuracy of the knowledge base. If the knowledge is outdated or
incomplete, the system’s performance may be compromised.

2. Lack of Flexibility: Expert systems are limited to the rules and knowledge they are
programmed with. They may struggle with novel or ambiguous situations that fall outside
their predefined rules.

3. Maintenance: Regular updates and maintenance are required to keep the knowledge base
current and relevant, which can be resource-intensive.

Introduction

The rule-based system in AI bases choices or inferences on established rules. These laws are
frequently expressed in human-friendly language, such as "if X is true, then Y is true," to make
them easier for readers to comprehend. Expert and decision support systems are only two
examples of the many applications in which rule-based systems have been employed.

What is a Rule-based System?


A system that relies on a collection of predetermined rules to decide what to do next is known as
a rule-based system in AI. These laws are predicated on several circumstances and deeds. For
instance, if a patient has a fever, the doctor may recommend antibiotics because the patient may
have an infection. Expert systems, decision support systems, and chatbots are examples of apps
that use rule-based systems.

Characteristics of Rule-based Systems in AI

The following are some of the primary traits of the rule-based system in AI:

 The rules are written simply for humans to comprehend, making rule-based systems
simple to troubleshoot and maintain.
 Given a set of inputs, rule-based systems will always create the same output, making
them predictable and dependable. This property is known as determinism.
 A rule-based system in AI is transparent because the standards are clear and open to
human inspection, which makes it simpler to comprehend how the system operates.
 A rule-based system in AI is scalable. When scaled up, large quantities of data can be
handled by rule-based systems.
 Rule-based systems can be modified or updated more easily because the rules can be
divided into smaller components.

How does a Rule-based System Work?

A rule-based system in AI generates an output by using a collection of inputs and a set of rules.
The system first determines which principles apply to the inputs. If a rule is applicable, the
system executes the corresponding steps to generate the output. If no guideline is applicable, the
system might generate a default output or ask the user for more details.

Main Components of a Rule-based System

Typically, a rule-based system in AI consists of seven fundamental elements:

1. The knowledge base:


It contains the specialized expertise required for problem-solving. The information is
represented as a set of rules in a rules-based system. Every rule has an IF (condition)
THEN (action) structure and defines a relationship, suggestion, directive, strategy, or
heuristic. The rule is activated, and the action portion is carried out as soon as the
conditional portion of the rule is met.
2. The database:
The database contains a collection of facts compared to the knowledge base's rules IF
(condition) clause.
3. The inference engine:
The expert system uses the inference engine to derive the logic and arrive at a conclusion.
The inference engine's task is to connect the facts kept in the database with the rules
specified in the knowledge base. The semantic reasoner is another name for the reasoning
engine. It deduces information or executes necessary actions based on data and the rule
base present in the knowledge base. For example, the match-resolve-act loop used by the
semantic reasoner goes like this:
o Match:
A portion of the production rule system is compared to the information in the
working memory to create a conflict in which numerous examples of satisfied
productions are present.
o Conflict Resolution:
Following the matching of the production systems, one of the production cases
involved in the conflict will be executed to gauge the procedure's status.
o Act:
The production instance chosen in the step before is carried out, changing the
information in the working memory.
4. Explanations facilities:
The user can use the explanation facilities to question the expert system on how it came
to a particular conclusion or why a particular fact is necessary. The expert system must be
able to defend its logic, recommendations, analyses, and conclusions.
5. User Interface:
The user interface is the channel through which the user interacts with the expert system
to find a solution to an issue. The user interface should be as simple and intuitive as
possible, and the dialogue should be as helpful and friendly as possible.
Each of these five components is essential to any rule-based system in AI. These form the
basis of the rule-based structure. However, the mechanism might also include a few extra
parts. The working brain and the external interface are two examples of these parts.

6. External connection:
An expert system can interact with external data files and programs written in traditional
computer languages like C, Pascal, FORTRAN, and Basic, thanks to the external
interface.
7. Active recall:
The working memory keeps track of transient data and knowledge.

Examples of Rule-based Systems

Healthcare, finance, and engineering are just a few examples of the sectors and applications
that use rule-based systems. Following are some instances of a rule-based system in AI:

 Medical Diagnosis:
Based on a patient's symptoms, medical history, and test findings, a rule-based system in
AI can make a diagnosis. The system can make a diagnosis by adhering to a series of
guidelines developed by medical professionals.
 Fraud Detection:
Based on particular criteria, such as the transaction's value, location, and time of day, a
rule-based system in AI can be used to spot fraudulent transactions. The system, for the
additional examination, can then flag the transaction.
 Quality Control:
A rule-based system in AI can ensure that products satisfy particular quality standards.
Based on a set of guidelines developed by quality experts, the system can check for
flaws.
 Decision support systems:
They are created to aid decision-making, such as choosing which assets to buy or what to
buy.
How to Create a Rule-based System?

The following actions are required to develop a rule-based system:

 Determine the issue:


Decide what issue needs to be resolved by a rule-based system.
 Establish the rules:
Establish a collection of guidelines that can be used to address the issue. The laws ought
to be founded on professional expertise or data analysis.
 Implement the rules:
In a rule-based structure, implement the rules. Software tools that enable the development
and administration of rule-based systems can be used for this.
 Test and evaluate:
Verify that the rule-based system in AI operates as intended. Take stock of how it's
performing and make any required modifications.

Rule-based System vs. Learning-based System

Rule-Based Systems Learning-Based Systems


Uses a set of predetermined rules to make
Learns from data to make decisions
decisions
Knowledge is acquired through machine learning
Rules are created by human experts
algorithms
Limited ability to adapt to new situations Can adapt to new situations by learning from data
Transparent decision-making process Decision-making process may not be transparent
Scalable by adding or modifying rules Scalable by retraining the model
Consistent in decision-making Decision-making may not always be consistent
Fast decision-making May require significant time for training the model

Rule-based System vs. Machine Learning System


Rule-Based Systems Machine Learning
Uses a set of predetermined rules to make
Uses statistical models to make decisions
decisions
Rules are created by human experts Models are trained using data
Can adapt to new situations by retraining the
Limited ability to adapt to new situations
model
Transparent decision-making process Decision-making process may not be transparent
Scalable by adding more data or retraining the
Scalable by adding or modifying rules
model
Consistent in decision-making Decision-making may not always be consistent
May require significant time for training the
Fast decision-making
model
Examples: Image recognition, speech
Examples: Medical diagnosis, fraud detection
recognition

Advantages of Rule-based Systems in AI

 Transparency and Explainability:


Because the rules are openly established, rule-based systems are transparent and simple
to comprehend. This makes it simpler for programmers to comprehend and adjust the
system and for users to comprehend the rationale behind particular actions.
 Efficiency:
Rule-based systems work quickly and effectively since they don't need a lot of data or
intricate algorithms to function. Instead, they merely conclude by applying rules to a
specific scenario.
 Accuracy:
Because they rely on a set of clear rules and logical inferences, rule-based systems have
the potential to be very accurate. The system will produce the right outcomes if the rules
are written correctly.
 Flexibility:
Rule-based systems are updated and modified by adding or modifying the rules. Because
of this, they can easily adjust to new situations or knowledge.

Disadvantages of Rule-based Systems in AI

 Restricted Capabilities for Learning:


Rule-based systems are created to function according to predetermined rules and logical
inferences. They are incapable of growing from mistakes or adjusting to novel
circumstances. As a result, they may need to improve at addressing complicated or
dynamic situations.
 Difficulty Handling Uncertainty:
Rule-based systems may need more clarity or complete information. Any ambiguity in
the data can result in errors or bad outcomes because they need precise inputs and rules to
make a decision.
 High Maintenance Costs:
To keep the rules accurate and up to date, rule-based systems need continual
maintenance. The cost and effort needed to maintain the system rise along with its
complexity.
 Difficulty Handling Complex Interactions:
Complicated interactions can be difficult for rule-based systems, especially when several
separate rules or inputs are involved. Sometimes, the consequences of this can be
conflicting or inconsistent.

Conclusion

 A rule-based system in AI uses a set of rules to generate judgments or suggestions.


 Because they can swiftly evaluate data and deliver precise answers, these systems are
common in the banking, healthcare, and customer service sectors.
 Rule-based systems benefit from being transparent because the rules are clearly stated,
simplifying comprehension of how the system came to a particular decision.
 The rule-based system in AI should be as effective as possible. Thus it's critical to
carefully design, test, and iteratively improve the rules based on user feedback and new
data.

Bayesian Reasoning

 It is based on formal probability theory. This reasoning


calculates more complex probabilities based on prior
evidence

Definitions

 Prior (Unconditioned) Probability - The probability


assigned to an event in the absence of any supporting
evidence.
P(event)

 Posterior (Conditioned) Probability - The probability of


an event given some evidence.

P(event | evidence)

Eg; the posterior probability of a person with symptom S having disease D is:

P(d/s) = P(d) x P(s/d) / P(s)


"The number of people having both (intersection) the disease D and symptom S divided
by the total number of people having symptom S."

Bayesian Probability Theory

Bayes Theorem calculates the probability of multiple


hypotheses given certain evidence.

P(Hi/E) = P(E|Hi) x P(Hi) / S P(E/H ) X P(H )


k k

Where

P(Hi/E) is the probability that Hi is true given evidence E.

P(Hi) is the probability that Hi is true overall.


P(E/Hi) is the probability that of observing evidence E when Hi is true.

Major requirements for the use of Bayes Theorem are

 All probabilities on the relationships of the evidence


with the various hypotheses must be known.
 All relationships between evidence and hypotheses,
P(E|Hk) must be independent.

Pure Bayesian reasoning is intractable for most


problems.

Bayesian Networks

Bayesian Networks relaxes several constraints of full Bayesian


approach. It represents an argument path as a directed acyclic graph
(DAG). Links between nodes in the graph represent conditioned
probabilities

The Dempster-Shafer Theory of Evidence

It is a more general approach to representing uncertainty than the Bayesian approach.


Particularly useful when decision to be made is based on the amount of evidence that has
been collected. It is appropriate for combining expert opinions, since experts do differ in
their opinions with a certain degree of ignorance. This Approach distinguishes between
uncertainty and ignorance by creating belief functions. This also assumes that the sources
of information to be combined are statistically independent. The basic idea in representing
uncertainty in this model is:

Set up a confidence interval -- an interval of probabilities within which the true probability
lies with a certain confidence -- based on the Belief B and plausibility PL provided by some
evidence E for a proposition P.

MB and MD can be tied together

CF(H|E) = MB(H|E) - MD(H|E)

As CF approaches 1 the confidence for H is stronger

As CF approaches -1 the confidence against H is stronger

As CF approaches 0 there is little support for belief or disbelief in H

A basic probability m(S), a belief BELIEF(S) and a plausible belief PLAUSIBILITY(S) all have
value in the interval [0,1].

Combining beliefs

To combine multiple sources of evidence to a single (or multiple) hypothesis do the


following: Suppose M1 and M2 are two belief functions. Let X be the set of subsets of W to
which M1 assigns a nonzero value and let Y be a similar set for M2. Then to get a new belief
function M3 from the combination of M1 and M2 beliefs in and we do:

M3 = å XÇ Y=Z M1(X) M2(y) /1- å XÇ Y= f M1(X) M2(y)

The Stanford Certainty Factor Algebra

This approach was used in MYCIN for first time. It is based on Several Observations. Here
Facts and the outcome of rules are given confidence factor between -1 and +1
+1 means fact is known to be true.

-1 means fact is known to be false.

Here the knowledge content of the rules is more important than the algebra of confidences
holding the system together. In this approach confidence measures correspond to informal
assessments by humans such as "it is probably true" or "it is often the case. It also
separates "confidence for" from "confidence against"

MB(H|E) - The measure of belief in hypothesis H given evidence E.

MD(H|E) - The measure of disbelief of H given E.

Where the belief brings together all the evidence that would lead us to believe in P with
some certainty and the plausibility brings together the evidence that is compatible with P
and is not inconsistent with it.

Rules of the algebra:

CF(P1 & P2) = Min(CF(P1),CF(P2))

CF(P1 OR P2) = Max(CF(P1),CF(P2))

Given: IF P THEN Q with CF(R)

CF(Q)=CF(P) * CF(R)

If two rules R1 and R2 support Q with CF(QR1) and CF(QR2) then to find the actual CF(Q):

If both +ve: CF(Q)=CF(QR1) + CF(QR2) - CF(QR1) * CF(QR2)

If both -ve: CF(Q)=CF(QR1) + CF(QR2) + CF(QR1) * CF(QR2)

If of opposite signs: CF(Q)= ( CF(QR1) + CF(QR2) ) / ( 1 - Min( |CF(QR1)| , |CF(QR2)| ) )


Fuzzy logic is a method of reasoning that is used in expert systems to model complex systems
that involve human reasoning, preferences, and intuition:

 Fuzzy logic

A reasoning method that resembles human reasoning and involves all intermediate
possibilities between YES and NO. Fuzzy logic allows for degrees of truth, rather than
absolute true or false values.

  Expert systems
Computer programs that emulate the knowledge and skills of human experts in a specific
domain.
  Fuzzy expert systems
Use fuzzy logic to handle uncertainties generated by imprecise, incomplete, and/or vague
information.

Fuzzy logic can be implemented in systems with different sizes and capabilities, such as micro-
controllers, large networked, or workstation-based systems. It can also be implemented in
hardware, software, or a combination of both.

What is Fuzzy Logic?


Fuzzy Logic (FL) is a method of reasoning that resembles human reasoning. The approach of FL
imitates the way of decision making in humans that involves all intermediate possibilities
between digital values YES and NO.

The conventional logic block that a computer can understand takes precise input and produces a
definite output as TRUE or FALSE, which is equivalent to human’s YES or NO.

The inventor of fuzzy logic, Lotfi Zadeh, observed that unlike computers, the human decision
making includes a range of possibilities between YES and NO, such as −

CERTAINLY YES
POSSIBLY YES
CANNOT SAY
POSSIBLY NO
CERTAINLY NO

The fuzzy logic works on the levels of possibilities of input to achieve the definite output.

Implementation
 It can be implemented in systems with various sizes and capabilities ranging from small
micro-controllers to large, networked, workstation-based control systems.
 It can be implemented in hardware, software, or a combination of both.

Why Fuzzy Logic?


Fuzzy logic is useful for commercial and practical purposes.

 It can control machines and consumer products.


 It may not give accurate reasoning, but acceptable reasoning.
 Fuzzy logic helps to deal with the uncertainty in engineering.

Learn Artificial Intelligence in-depth with real-world projects through our Artificial
Intelligence certification course. Enroll and become a certified expert to boost your career.

Fuzzy Logic Systems Architecture


It has four main parts as shown −

 Fuzzification Module − It transforms the system inputs, which are crisp numbers, into
fuzzy sets. It splits the input signal into five steps such as −

LP x is Large Positive
MP x is Medium Positive
S x is Small
MN x is Medium Negative
LN x is Large Negative

 Knowledge Base − It stores IF-THEN rules provided by experts.


 Inference Engine − It simulates the human reasoning process by making fuzzy inference
on the inputs and IF-THEN rules.
 Defuzzification Module − It transforms the fuzzy set obtained by the inference engine
into a crisp value.
The membership functions work on fuzzy sets of variables.

Membership Function

Membership functions allow you to quantify linguistic term and represent a fuzzy set
graphically. A membership function for a fuzzy set A on the universe of discourse X is defined
as μA:X → [0,1].

Here, each element of X is mapped to a value between 0 and 1. It is called membership value or
degree of membership. It quantifies the degree of membership of the element in X to the fuzzy
set A.

 x axis represents the universe of discourse.


 y axis represents the degrees of membership in the [0, 1] interval.

There can be multiple membership functions applicable to fuzzify a numerical value. Simple
membership functions are used as use of complex functions does not add more precision in the
output.

All membership functions for LP, MP, S, MN, and LN are shown as below −
The triangular membership function shapes are most common among various other membership
function shapes such as trapezoidal, singleton, and Gaussian.

Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the corresponding
output also changes.

Example of a Fuzzy Logic System


Let us consider an air conditioning system with 5-level fuzzy logic system. This system adjusts
the temperature of air conditioner by comparing the room temperature and the target temperature
value.
Algorithm

 Define linguistic Variables and terms (start)


 Construct membership functions for them. (start)
 Construct knowledge base of rules (start)
 Convert crisp data into fuzzy data sets using membership functions. (fuzzification)
 Evaluate rules in the rule base. (Inference Engine)
 Combine results from each rule. (Inference Engine)
 Convert output data into non-fuzzy values. (defuzzification)

Development

Step 1 − Define linguistic variables and terms


Linguistic variables are input and output variables in the form of simple words or sentences. For
room temperature, cold, warm, hot, etc., are linguistic terms.

Temperature (t) = {very-cold, cold, warm, very-warm, hot}

Every member of this set is a linguistic term and it can cover some portion of overall temperature
values.

Step 2 − Construct membership functions for them

The membership functions of temperature variable are as shown −

Step3 − Construct knowledge base rules

Create a matrix of room temperature values versus target temperature values that an air
conditioning system is expected to provide.

RoomTemp.
Very_Cold Cold Warm Hot Very_Hot
/Target
Very_Cold No_Change Heat Heat Heat Heat
Cold Cool No_Change Heat Heat Heat
Warm Cool Cool No_Change Heat Heat
Hot Cool Cool Cool No_Change Heat
Very_Hot Cool Cool Cool Cool No_Change

Build a set of rules into the knowledge base in the form of IF-THEN-ELSE structures.

Sr. No. Condition Action


1 IF temperature=(Cold OR Very_Cold) AND target=Warm THEN Heat
2 IF temperature=(Hot OR Very_Hot) AND target=Warm THEN Cool
3 IF (temperature=Warm) AND (target=Warm) THEN No_Change

Step 4 − Obtain fuzzy value

Fuzzy set operations perform evaluation of rules. The operations used for OR and AND are Max
and Min respectively. Combine all results of evaluation to form a final result. This result is a
fuzzy value.

Step 5 − Perform defuzzification

Defuzzification is then performed according to membership function for output variable.

Application Areas of Fuzzy Logic


The key application areas of fuzzy logic are as given −

Automotive Systems

 Automatic Gearboxes
 Four-Wheel Steering
 Vehicle environment control

Consumer Electronic Goods

 Hi-Fi Systems
 Photocopiers
 Still and Video Cameras
 Television
Domestic Goods

 Microwave Ovens
 Refrigerators
 Toasters
 Vacuum Cleaners
 Washing Machines

Environment Control

 Air Conditioners/Dryers/Heaters
 Humidifiers

Advantages of FLSs
 Mathematical concepts within fuzzy reasoning are very simple.
 You can modify a FLS by just adding or deleting rules due to flexibility of fuzzy logic.
 Fuzzy logic Systems can take imprecise, distorted, noisy input information.
 FLSs are easy to construct and understand.
 Fuzzy logic is a solution to complex problems in all fields of life, including medicine, as
it resembles human reasoning and decision making.

Disadvantages of FLSs
 There is no systematic approach to fuzzy system designing.
 They are understandable only when simple.
 They are suitable for the problems which do not need high accuracy.

You might also like