Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fuzzy logic
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Fuzzy systems== === Mamdani === The most well-known system is the [[Ebrahim Mamdani|Mamdani]] rule-based one.<ref>{{cite journal |last1=Mamdani |first1=E. H. |title=Application of fuzzy algorithms for control of simple dynamic plant |journal=Proceedings of the Institution of Electrical Engineers |date=1974 |volume=121 |issue=12 |pages=1585–1588 |doi=10.1049/PIEE.1974.0328 }}</ref> It uses the following rules: # Fuzzify all input values into fuzzy membership functions. # Execute all applicable rules in the rulebase to compute the fuzzy output functions. # De-fuzzify the fuzzy output functions to get "crisp" output values. ====Fuzzification==== Fuzzification is the process of assigning the numerical input of a system to fuzzy sets with some degree of membership. This degree of membership may be anywhere within the interval [0,1]. If it is 0 then the value does not belong to the given fuzzy set, and if it is 1 then the value completely belongs within the fuzzy set. Any value between 0 and 1 represents the degree of uncertainty that the value belongs in the set. These fuzzy sets are typically described by words, and so by assigning the system input to fuzzy sets, we can reason with it in a linguistically natural manner. For example, in the image below, the meanings of the expressions ''cold'', ''warm'', and ''hot'' are represented by functions mapping a temperature scale. A point on that scale has three "truth values"—one for each of the three functions. The vertical line in the image represents a particular temperature that the three arrows (truth values) gauge. Since the red arrow points to zero, this temperature may be interpreted as "not hot"; i.e. this temperature has zero membership in the fuzzy set "hot". The orange arrow (pointing at 0.2) may describe it as "slightly warm" and the blue arrow (pointing at 0.8) "fairly cold". Therefore, this temperature has 0.2 membership in the fuzzy set "warm" and 0.8 membership in the fuzzy set "cold". The degree of membership assigned for each fuzzy set is the result of fuzzification. [[Image:Fuzzy logic temperature en.svg|thumb|center|upright=1.5|Fuzzy logic temperature]] [[Fuzzy set]]s are often defined as triangle or trapezoid-shaped curves, as each value will have a slope where the value is increasing, a peak where the value is equal to 1 (which can have a length of 0 or greater) and a slope where the value is decreasing.<ref>{{Cite journal |last1=Xiao |first1=Zhi |last2=Xia |first2=Sisi |last3=Gong |first3=Ke |last4=Li |first4=Dan |date=2012-12-01 |title=The trapezoidal fuzzy soft set and its application in MCDM |journal=Applied Mathematical Modelling |language=en |volume=36 |issue=12 |pages=5846–5847 |doi=10.1016/j.apm.2012.01.036 |issn=0307-904X|doi-access=free }}</ref> They can also be defined using a [[sigmoid function]].<ref>{{cite web|last1=Wierman|first1=Mark J.|title=An Introduction to the Mathematics of Uncertainty: including Set Theory, Logic, Probability, Fuzzy Sets, Rough Sets, and Evidence Theory|url=https://www.creighton.edu/fileadmin/user/CCAS/programs/fuzzy_math/docs/MOU.pdf|publisher=Creighton University|access-date=16 July 2016|url-status=live|archive-url=https://web.archive.org/web/20120730155249/https://www.creighton.edu/fileadmin/user/CCAS/programs/fuzzy_math/docs/MOU.pdf|archive-date=30 July 2012}}</ref> One common case is the [[Logistic function|standard logistic function]] defined as : <math> S(x) = \frac{1}{1 + e^{-x}} </math>, which has the following symmetry property : <math display="block"> S(x) + S(-x) = 1.</math> From this it follows that <math display="block"> (S(x) + S(-x)) \cdot (S(y) + S(-y)) \cdot (S(z) + S(-z)) = 1 </math> ====Fuzzy logic operators==== Fuzzy logic works with membership values in a way that mimics [[Boolean logic]]. To this end, replacements for basic [[operator (computer programming)|operator]]s ("gates") AND, OR, NOT must be available. There are several ways to this. A common replacement is called the ''{{vanchor|Zadeh operator}}s'': {| class="wikitable" |- ! Boolean ! Fuzzy |- | AND(x,y) | MIN(x,y) |- | OR(x,y) | MAX(x,y) |- | NOT(x) | 1 – x |- |} For TRUE/1 and FALSE/0, the fuzzy expressions produce the same result as the Boolean expressions. There are also other operators, more linguistic in nature, called ''hedges'' that can be applied. These are generally adverbs such as ''very'', or ''somewhat'', which modify the meaning of a set using a [[mathematical formula]].<ref>{{Cite journal |last=Zadeh |first=L. A. |date=January 1972 |title=A Fuzzy-Set-Theoretic Interpretation of Linguistic Hedges |url=http://dx.doi.org/10.1080/01969727208542910 |journal=Journal of Cybernetics |volume=2 |issue=3 |pages= 4–34|doi=10.1080/01969727208542910 |issn=0022-0280}}</ref> However, an arbitrary choice table does not always define a fuzzy logic function. In the paper (Zaitsev, et al),<ref>{{ Cite journal | last1 = Zaitsev | first1 = D. A. | author2 = Sarbei, V. G. | author3 = Sleptsov, A. I. | year = 1998 | title = Synthesis of continuous-valued logic functions defined in tabular form | journal = [[Cybernetics and Systems Analysis]] | volume = 34 | issue = 2 | pages = 190–195 | doi = 10.1007/BF02742068 | s2cid = 120220846 }}</ref> a criterion has been formulated to recognize whether a given choice table defines a fuzzy logic function and a simple algorithm of fuzzy logic function synthesis has been proposed based on introduced concepts of constituents of minimum and maximum. A fuzzy logic function represents a disjunction of constituents of minimum, where a constituent of minimum is a conjunction of variables of the current area greater than or equal to the function value in this area (to the right of the function value in the inequality, including the function value). Another set of AND/OR operators is based on multiplication, where <syntaxhighlight lang="text"> x AND y = x*y NOT x = 1 - x Hence, x OR y = NOT( AND( NOT(x), NOT(y) ) ) x OR y = NOT( AND(1-x, 1-y) ) x OR y = NOT( (1-x)*(1-y) ) x OR y = 1-(1-x)*(1-y) x OR y = x+y-xy </syntaxhighlight> Given any two of AND/OR/NOT, it is possible to derive the third. The generalization of AND is an instance of a [[t-norm]]. ==== IF-THEN rules ==== {{Main|Fuzzy rule}} IF-THEN rules map input or computed truth values to desired output truth values. Example: <syntaxhighlight lang="text"> IF temperature IS very cold THEN fan_speed is stopped IF temperature IS cold THEN fan_speed is slow IF temperature IS warm THEN fan_speed is moderate IF temperature IS hot THEN fan_speed is high </syntaxhighlight> Given a certain temperature, the fuzzy variable ''hot'' has a certain truth value, which is copied to the ''high'' variable. Should an output variable occur in several THEN parts, then the values from the respective IF parts are combined using the OR operator. ====Defuzzification==== {{Main|Defuzzification}} The goal is to get a continuous variable from fuzzy truth values.<ref>{{cite book|last1=Hájek|first1=Petr|authorlink = Petr Hájek|title=Metamathematics of fuzzy logic|year=1998|publisher=Springer Science & Business Media|edition=4}}</ref><ref name="FuzzyLogic2017">{{cite journal | title = Fuzzy Logic | author1 = Kaveh Hariri Asli | author2 = Soltan Ali Ogli Aliyev | author3 = Sabu Thomas | author4 = Deepu Gopakumar | author5 = Hossein Hariri Asli | date = November 2017 | url = https://www.researchgate.net/publication/363039600 | journal = ResearchGate | access-date = 15 December 2024 }}</ref> This would be easy if the output truth values were exactly those obtained from fuzzification of a given number. Since, however, all output truth values are computed independently, in most cases they do not represent such a set of numbers.<ref name="FuzzyLogic2017"></ref> One has then to decide for a number that matches best the "intention" encoded in the truth value. For example, for several truth values of fan_speed, an actual speed must be found that best fits the computed truth values of the variables 'slow', 'moderate' and so on.<ref name="FuzzyLogic2017"></ref> There is no single algorithm for this purpose. A common algorithm is # For each truth value, cut the membership function at this value # Combine the resulting curves using the OR operator # Find the center-of-weight of the area under the curve # The x position of this center is then the final output. === Takagi–Sugeno–Kang (TSK) === The TSK system<ref>{{cite journal |last1=Takagi |first1=Tomohiro |last2=Sugeno |first2=Michio |title=Fuzzy identification of systems and its applications to modeling and control |journal=IEEE Transactions on Systems, Man, and Cybernetics |date=January 1985 |volume=SMC-15 |issue=1 |pages=116–132 |doi=10.1109/TSMC.1985.6313399 |s2cid=3333100 }}</ref> is similar to Mamdani, but the defuzzification process is included in the execution of the fuzzy rules. These are also adapted, so that instead the consequent of the rule is represented through a polynomial function (usually constant or linear). An example of a rule with a constant output would be:<syntaxhighlight lang="text"> IF temperature IS very cold = 2 </syntaxhighlight>In this case, the output will be equal to the constant of the consequent (e.g. 2). In most scenarios we would have an entire rule base, with 2 or more rules. If this is the case, the output of the entire rule base will be the average of the consequent of each rule i (Y<sub>i</sub>), weighted according to the membership value of its antecedent (h<sub>i</sub>): <math>\frac{\sum_i (h_i \cdot Y_i)}{\sum_i h_i}</math> An example of a rule with a linear output would be instead:<syntaxhighlight lang="text"> IF temperature IS very cold AND humidity IS high = 2 * temperature + 1 * humidity </syntaxhighlight>In this case, the output of the rule will be the result of function in the consequent. The variables within the function represent the membership values after fuzzification, '''not''' the crisp values. Same as before, in case we have an entire rule base with 2 or more rules, the total output will be the weighted average between the output of each rule. The main advantage of using TSK over Mamdani is that it is computationally efficient and works well within other algorithms, such as PID control and with optimization algorithms. It can also guarantee the continuity of the output surface. However, Mamdani is more intuitive and easier to work with by people. Hence, TSK is usually used within other complex methods, such as in [[adaptive neuro fuzzy inference system]]s.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)