











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












Stationary Fast Near Very angry, not surprised, no fear Not angry, not surprised, very fearful Far Very angry, not surprised, no fear Not angry, very surprised, no fear
However, near and far are quite relative terms, as is fast. We’ll consider a more accurate set of emotions:
Stationary Slow Fast Very Near VA, NS, NF A, NS, F NA, NS, VF Near A, NS, NF NA, NS, F NA, S, F Far VA, NS, NF A, S, NF NA, VS, NF
where V means very, N means not, A means angry, S means surprised and F means fearful. We can make the terms of speed and distance more specific still, and this will give us different combinations of emotions.
1.4 Solution
The solution to the above problem of computers is soft computing:
Soft computing differs from conventional (hard) computing in that, unlike hard computing, it is tolerant of imprecision, uncertainty, partial truth, and approximation. In effect, the role model for soft computing is the human mind. The guiding principle of soft computing is: Exploit the tolerance for imprecision, uncertainty, partial truth, and approximation to achieve tractability, robustness and low solution cost.
Soft computing is used as an umbrella term for sub-disciplines of computing, including fuzzy logic and fuzzy control, neural networks based computing and machine learning, and genetic algorithms, together with chaos theory in mathematics.
Fuzzy logic is being developed as a discipline to meet two objectives:
2.1 Fuzzy Sets
A Fuzzy set is a set whose elements have degrees of membership. Fuzzy sets are an extension of the classical notion of set (known as a Crisp Set). More mathematically, a fuzzy set is a pair (A, μA) where A is a set and μA : A → [0, 1]. For all x ∈ A, μA(x) is called the grade of membership of x.
If μA(x) = 1, we say that x is Fully Included in (A, μA), and if μA(x) = 0, we say that x is Not Included in (A, μA). If there exists some x ∈ A such that μA(x) = 1, we say that (A, μA) is Normal. Otherwise, we say that (A, μA) is Subnormal.
2.2 Fuzzy Logic
Fuzzy Logic is a form of multi-valued logic derived from fuzzy set theory to deal with reasoning that is approximate rather than precise. Fuzzy logic is not a vague logic system, but a system of logic for dealing with vague concepts.
As in fuzzy set theory the set membership values can range (inclusively) between 0 and 1, in fuzzy logic the degree of truth of a statement can range between 0 and 1 and is not constrained to the two truth values true/false as in classic predicate logic.
3.1 Introduction
A Fuzzy System can be contrasted with a conventional (crisp) system in three main ways:
For the sake of convenience, usually a fuzzy set is denoted as:
A = μA(x 1 )/x 1 + · · · + μA(xn)/xn
that belongs to a finite universe of discourse:
A ⊆ {x 1 , x 2 ,... , xn} = X
where μA(xi)/xi (a singleton) is a pair “grade of membership element”.
Consider X = { 1 , 2 ,... , 10 }. Suppose a child is asked which of the numbers in X are “large” relative to the others. The child might come up with the following:
Number Comment Degree 10 Definitely 1 9 Definitely 1 8 Quite possible 0. 7 Maybe 0. 6 Not usually 0. 5, 4, 3, 2, 1 Definitely Not 0
From this, we can define some new terms using different membership functions:
Small μB = 1 − μA Very Large μC = (μA)^2 Large-ish μD =
μA
3.2 Definitions on Fuzzy Sets
We have the following definitions for two fuzzy sets (A, μA) and (B, μB ), where A, B ⊆ X:
∑^ n
i=
μA(xi)
3.3 Operations on Fuzzy Sets
Let (A, μA), (B, μB ) be a fuzzy sets.
{μA, μB }
Rule Temperature Speed 1
IF
Cold
THEN
Minimal 2 Cool Slow 3 Pleasant Medium 4 Warm Fast 5 Hot Blast
Hence, we can regard our rules as the cross product of temperature and speed.
3.6 Rules and Patches
A Fuzzy Patch is defined by a fuzzy rule: a patch is a mapping of two membership functions, it is a product of two geometrical objects, line segments, triangles, squares etc.
In a fuzzy controller, a rule in the rule set of the controller can be visualized as a “device” for generating the product of the input/output fuzzy sets.
Geometrically a patch is an area that represents the causal association between the cause (the inputs) and the effect (the outputs). The size of the patch indicates the vagueness implicit in the rule as expressed through the membership functions of the inputs and outputs.
The total area occupied by a patch is an indication of the vagueness of a given rule that can be used to generate the patch.
Consider a one-input-one output rule: if the input is crisp and the output is fuzzy then the patch becomes a line. And, if both are crisp sets then the patch is vanishingly small - a point.
Once we have found that the knowledge of a specialism can be expressed through linguistic variables and rules of thumb, that involve imprecise antecedents and consequents, then we have a basis of a knowledge-base. In this knowledge-base “facts” are represented through linguistic variables and the rules follow fuzzy logic. In traditional expert systems facts are stated crisply and rules follow classical propositional logic.
The problem is that in the “real” world some of our knowledge of facts is derived from the use of sensors: quantity of heat measured in degrees Centigrade, length measured in meters, weight (the quantity of matter) measured in grams, etc. This quantitative, and rather precise factual informa- tion has to be mapped onto the term-set of a linguistic variable - the process of Fuzzification.
Once mapped, the rules within a knowledge base are invoked systematically to see which of the rules is fired and to what degree - the process of Inference. In traditional expert systems, only those rules fire whose antecedents are true. In fuzzy expert systems rules may fire to a certain degree: all rules may fire to a degree between zero and unity. Min and Product are two inference methods.
But, of course, we have to see what influence each rule has given the fuzzy input values. An “averaging” procedure is adopted to compute the effective contribution of each of the rules. This is the process of Composition. Max and Sum are two composition rules:
The fuzzy rules are also called Linguistic Rules comprising an Antecedent/Premise (the IF part) and a Consequent/Conclusion (the THEN part). The antecedent/premise describes an object or event or state in the form of a fuzzy specification of a measured value. The conse- quent/conclusion specifies an appropriate fuzzy value.
4.2 Linguistic Variable
Informally, a Linguistic Variable is a variable whose values are words or sentences in a natural or artificial language. For example, if age is interpreted as a linguistic variable, then its term-set T (·), (that is, the set of its linguistic values) might be
T (age) = young + old + very young + not young + very old + very very young +...
where each of the terms in T (age) is a label of a fuzzy subset of a universe of discourse, say U = [0, 100]. A linguistic variable is associated with two rules:
Example 4.2.1 (Age). The primary terms in the equation above are young and old, whose meaning might be defined by their respective compatibility functions μY and μO. From these, then, the meaning - or, equivalently, the compatibility functions - of the non-primary terms in T age) above may be computed by the application of a semantic rule.
μvery young = (μY )^2 μmore or less old = √μO μnot very young = 1 − (μY )^2
Example 4.2.2 (Air Conditioner). Consider again the problem of controlling an air-conditioner. The rules that are used to control the air conditioner can be expressed as a cross product:
Control = Temperature × Speed
Where the set of linguistic values of the term sets is given as
Temperature = Cold + Cool + Pleasant + Warm + Hot
Speed = Minimal + Slow + Medium + Fast + Blast
Recalling the rules, we could define our membership functions for Speed as:
Term Membership Function
Minimal μMinimal(V ) = min
Slow μSlow(V ) = max
min
Medium μMedium(V ) = max
min
V − 40 10 ,^
Fast μFast(V ) = max
min
Blast μBlast(V ) = min
Similarly, we could define our membership functions for Temperature as:
Term Membership Function
Cold μCold(T ) = min
Cool μCool(T ) = max
min
Pleasant μPleasant(T ) = max
min
Warm μWarm(T ) = max
min
Hot μHot(T ) = min
Now, for our fuzzification, we consider that the temperature is 16◦C and we want our knowledge base to compute the speed. The fuzzification of the the crisp temperature gives the following mem- bership for the Temperature fuzzy set:
μCold μCool μPleasant μWarm μHot T = 16 0 0. 3 0. 4 0 0 Rule 1 2 3 4 5 Does it fire? No No Yes Yes No
Inference: Consider that the temperature is 16◦^ and we want our knowledge base to compute the speed. Rules 2 and 3 are firing and are essentially the fuzzy patches made out of the cross products of Cool × Slow Pleasant × Medium
Composition: The Cool and Pleasant sets have an output of 0.3 and 0.4 respectively. The fuzzy sets for Slow and Medium have to be given an α-level cut for these output values respectively.
Table 4.2: Rules
The centre of gravity approach attempts to take the rules into consideration according to their degree of applicability. If a rule dominates during a certain interval then its dominance is discounted in other intervals.
Here again the weighted sum and weighted membership are worked out, except that the membership function is given another alpha level cut corresponding to the maximum value of the output fuzzy set. The crisp value for MOM method is given as:
η = ∗ ∗ ∗
Both of these methods give different results:
Table 4.3: CoG method versus MoM method
Value determines reaction to the Proportional (KP ) current error Integral (KI ) sum of recent errors Derivative (KD) rate at which the error has been changing
The weighted sum of these three actions is used to adjust the process via a control element such as the position of a control valve or the power supply of a heating element. Conventional control theory uses a mathematical model of a process to be controlled and specifications of the desired closed-loop behaviour to design a controller. This approach may fall short if the model of the process:
5.2 Fuzzy Controller
Logical rules with vague predicates can be used to derive inference from vague formulated data. The idea of linguistic control algorithms was a brilliant generalisation of the human experience to use linguistic rules with vague predicates in order to formulate control actions. A Fuzzy Controller is a device that is intended to modelize some vaguely known or vaguely described process.
A knowledge-based system for closed-loop control is a control system which enhances the perfor- mance, reliability, and robustness of control by incorporating knowledge which cannot be accom- modated in the analytic model upon which the design of a control algorithm is based, and that is usually taken care of manual modes of operation, or by other safety and ancillary logic mechanisms.
There are two types of fuzzy controllers:
Controller Type Typical Operation Mamdani (linguistic) Controller Direct closed-loop controller Takagi-Sugeno-Kang Controller Supervisory controller
The controller can be used with the process in two modes: Feedback mode when the fuzzy controller will act as a control device, and Feed Forward mode where the controller can be used as a prediction device. All inputs to, and outputs from, the controller are in the form of linguistic variables. In many ways, a fuzzy controller maps the input variables into a set of output linguistic variables. Usually, a plant, process, vehicle, or any other object to be controlled is called a system S. The feedback controller is expected to ‘guarantee a desired response’, or output y.
Regulation is a process described in the control theory literature as a process for ‘keeping the output y close to the setpoint (reference input) w, despite the presence of disturbances, fluctu- ations of the system parameters, and noise measurements’. (Error e = w − y). A controller is implemented using the control algorithm.