Fuzzy Logic and Fuzzy logic Controllers: A beginner's guide

Hi everyone,

This is the First of several posts on Fuzzy logic. Il slowly post the entire tutorial:
Please leave your suggestions, feedback and question which we will discuss in this thread.

The contents will be as follows:

[FONT="]SECTION I: Fuzzy Logic and Fuzzy Set Theory[/FONT]


[FONT="]1.1[/FONT][FONT="]Evolution of Fuzzy logic[/FONT]


[FONT="]1.2[/FONT][FONT="]Fuzzy sets versus Crisp sets[/FONT]


[FONT="]1.3[/FONT][FONT="]Basics of Fuzzy set theory[/FONT]

[FONT="]1.3.1[/FONT][FONT="]Operations on Fuzzy sets.[/FONT]

[FONT="]1.3.1.1[/FONT][FONT="]Fuzzy Complementation[/FONT]
[FONT="]1.3.1.2[/FONT][FONT="]Fuzzy Union[/FONT]
[FONT="]1.3.1.3[/FONT][FONT="]Fuzzy Intersection[/FONT]
[FONT="]1.3.2[/FONT][FONT="]Fuzzy Membership Functions[/FONT]

[FONT="]1.3.2.1[/FONT][FONT="]Triangular Membership Function[/FONT]
[FONT="]1.3.2.2[/FONT][FONT="]Trapezoidal Membership Function[/FONT]
[FONT="]1.3.2.3[/FONT][FONT="]Generalized Bell Membership Function[/FONT]
[FONT="]1.3.2.4[/FONT][FONT="]Sigmoidal Membership Function[/FONT]
[FONT="]1.4[/FONT][FONT="]Why use Fuzzy Logic?[/FONT]


[FONT="]SECTION II: Looking Inside the Fuzzy Logic Controller[/FONT]
[FONT="]2.1 Overview of a Fuzzy Logic Controller[/FONT]
[FONT="]2.1.1 Fuzzification Module[/FONT]
[FONT="]2.1.2 Knowledge Base[/FONT]
[FONT="]2.1.2.1 [/FONT][FONT="]Data Base[/FONT]
[FONT="]2.1.2.2 [/FONT][FONT="]Rule Base[/FONT]

[FONT="]2.1.3 Fuzzy Inference Engine[/FONT]
[FONT="]2.1.4 Defuzzification Module[/FONT]

[FONT="]2.2 [/FONT][FONT="]Fuzzy Logic Controllers Vs Conventional Controllers[/FONT]

[FONT="]SECTION III: Implementation, Applications & Drawbacks of FLC[/FONT]
[FONT="]3.1 Design of Industrial Fuzzy Logic Controllers[/FONT]

[FONT="]3.2 [/FONT][FONT="]Fuzzy Logic Controller Applications[/FONT]
[FONT="]3.2.1 Fuzzy Washing Machine[/FONT]
[FONT="]3.2.2 Future Applications[/FONT]
[FONT="]3.2.3 When not to use Fuzzy Controllers[/FONT]

[FONT="]3.3 [/FONT][FONT="]Drawbacks of Fuzzy Controllers[/FONT]

Replies

  • silenthorde
    silenthorde
    1.1: Evolution of fuzzy logic

    The traditional belief was that science should strive for precision, specificity, sharpness, consistency etc.. This changed in the late 19th century when molecular level processes were being studied. It was found that uncertainty is naturally built into any system. At this level, statistical tools were found to be better than traditional mathematical tools such as calculus.

    Calculus is applicable to problems involving small number of variables that are related to each other in a predictable way. However, statistical methods are suited to applications involving large number of variables and very high degree of randomness. These two methods are highly complementary and cater to the two extremes, excluding a vast majority of everyday phenomena which fail to fall under any of the two.

    Hans Joachim Bremermann, calculated that the maximum computational speed of a self-contained system in the material universe, as derived from Albert Einstein's mass-energy equivalency and the Heisenberg Uncertainty Principle, to be approximately 2.56 × 1047 Bits Per Second per Gram of its mass. Several applications however demand far larger computational speeds than set by
    Bremermann limit. This called for a mathematical modelling tool that allowed complex systems to be visualized in a manner in which most intangible everyday processes work, thus making them predictable and reducing computational complexity.



    To tackle this problem of inherent uncertainity in everyday linguistics and processes, Lofti. A .Zadeh proposed a system of multi-valued logic, which he named fuzzy logic. Fuzzy logic is a very powerful method of reasoning when mathematical models are not available and input data is imprecise. It incorporates vagueness and imprecision making it possible for processes to be modelled the way we think. Thus fuzzy based products are highly competitive due to better performance, high reliability, low power consumption. With fuzzy logic being widely accepted. It is predicted to replace the conventional logic within the next decade.

    this should explain it...LOL
    [​IMG]
    Image from: From MATLAB fuzzy logic toolbox documentation.

    The man on the left is a Crisp man (Knows Bayesian or conventional logic)and the man on the right is a FUZZY man
  • silenthorde
    silenthorde
    1.2: Fuzzy sets Vs Crisp Sets

    Crisp sets are based on binary logic or the classical predicate logic. Binary logic is a bi-valued logic system which restricts the truth value of any statement to the two values of 1(True) or 0(False). The following laws form the pillars of binary logic.


    Law of Non-Contradictions: It states that no element can be a member of the both the sets A and Ā., mathematically expressed as,

    A [FONT="]⋂ [/FONT]Ā = Ø

    Law of Excluded Middle: It states that every element in the universe must belong to either the set A or Ā, mathematically expressed as,

    A [FONT="]⋃[/FONT] Ā = U

  • silenthorde
    silenthorde
    1.2: Fuzzy sets Vs Crisp Sets


    Fuzzy sets violate both the above mentioned laws and reduce the concept of crisp sets only to a limiting case.
    Let us consider an example, where the linguistic variable TALL corresponds to a curve that defines the degree to which any person is tall. If the set of tall people is given the well-defined (crisp) boundary of a classical set, the definition may be “all people taller than 6 feet are officially considered tall”. However, such a distinction is clearly absurd, since it would mean that a 5’ 11” person would be not TALL while a 6’ 1” would be considered TALL.
    The fuzzy definition shows a smoothly varying curve that passes from not-tall to tall. The output-axis is a number known as the membership value between 0 and 1. The curve is known as a membership function and is associated with the term membership grade [FONT="]µ[/FONT], which may vary from 0 to 1. (i.e: 0% to 100%).This curve defines the transition from not tall to tall or vice-versa. Both people are tall to some degree, but one is significantly less tall than the other.

    [​IMG]
    Image from: Matlab Fuzzy logic Toolbox documentation
  • silenthorde
    silenthorde
    1.3 :Basics of Fuzzy set theory

    [FONT="]Basics of Fuzzy set theory

    [/FONT]
    A fuzzy set A in the universe of discourse U is a set of ordered pairs of a generic element x and its membership degree μA(x) as
    A = { ( x , µA(x) ) | x Є U}

    Sometimes also defined in the form:
    A = { ( x / µA(x) ) | x Є U}


  • silenthorde
    silenthorde
    1.3.1 :Operations on fuzzy sets

    let us now discuss the various operations possible on a fuzzy set. It is to be noted that in fuzzy logical operations, we work with the membership grade of the element, as opposed to manipulating the element itself.

    [FONT="]1.3.1.1 Fuzzy Complementation[/FONT]


    The complement of a fuzzy set A has a membership function which is point-wise defined for all x Є U (Universe of Discourse) by

    μA ( x ) = 1 – μA( x ).
    Where, A= { ( x , µA(x) ) | x Є U }
    [FONT="]This corresponds to the logical NOT operation. This is illustrated in figure, the fuzzy set not cool is the complement of the fuzzy set cool and vice-versa.[/FONT]


    Image from: fortune city dot com
    [FONT="]
    [/FONT]
  • silverscorpion
    silverscorpion
    Hi silenthorde,

    very nice intro about fuzzy logic. Very good indeed.

    But this seems familiar to me. Atleast, the pictures definitely do.

    I think these are taken from the Matlab tutorials that come with the matlab package, right??

    Always mention the source or references of anything you post here.
    Cheers!! 😀
  • silenthorde
    silenthorde
    Ya you're absolutely right Silver scorpion. the first 2 pictures are from Matlab documentation, the third from a not-so-famous website.

    ONly the images have been taken from various sources on the internet. But the theoritical part is entirely my own, taken from a seminar report prepared by myself some 4 months back.

    Should I mention the so
    urce of images?😕


    SOURCES ACKNOWLEDGED.....Thanx a lot....silver scorpion

    Regards.

    good day





  • debu
    debu
    @silenthorde: Yes, This is a very nice introduction to fuzzy logic for absolute beginners.

    Regards,

    Debu 😀
  • silenthorde
    silenthorde
    1.3.1.2 Fuzzy Union

    [FONT="]1.3.1.2 Fuzzy Union[/FONT]
    The membership function µ (A [FONT="]⋃[/FONT] B) corresponding to the fuzzy union operation on the fuzzy sets A and B is defined as,

    µ(A [FONT="]⋃ [/FONT]B) (x) = max { µA (x), µB (x)}​
    Where, A= { ( x , µA(x) ) | x Є U }
    B= { ( x , µB(x) ) | x Є U }

    refer to picture below.




    debu
    @silenthorde: Yes, This is a very nice introduction to fuzzy logic for absolute beginners.

    Regards,

    Debu
    Thanx Debu....
  • silenthorde
    silenthorde
    1.3.1.3 Fuzzy Intersection

    [FONT="]1.3.1.3 Fuzzy Intersection [/FONT]

    The membership function µ (A [FONT="]⋂[/FONT] B)(x) corresponding to the fuzzy union operation on the fuzzy sets A and B is defined as,

    µ(A [FONT="]⋂ [/FONT]B) (x) = min{ µA (x), µB (x)}​
    Where, A= { ( x , µA(x) ) | x Є U }
    B= { ( x , µB(x) ) | x Є U }

    [​IMG]

    Image source: MAtlab Fuzzy logic toolbox documentation
  • just2rock
    just2rock
    good info...keep it up!
  • shalini_goel14
    shalini_goel14
    Hey silenthorde,

    Good info. Is it possible to make it bit practical way of learning rather than focusing on theory ? Like how these AND, OR are used in any real world things?
  • silenthorde
    silenthorde
    shalini_goel14
    Hey silenthorde,

    Good info. Is it possible to make it bit practical way of learning rather than focusing on theory ? Like how these AND, OR are used in any real world things?
    Surely Shalini, Il put in some practical examples as well. Thought about it.

    Actually it is very difficult to fathom the pratical importance of these operations without understanding a bit about Fuzzy logic controllers.

    But nevertheless Ill try. Please contribute if you have something interesting amd useful. everyone is welcome.


    Regards

    Biswa
  • Harshad Italiya
    Harshad Italiya
    Really nice initiative. I'll follow this thread when i got some time to do something new.
    You keep it up friend. 😀
  • silenthorde
    silenthorde
    1.3.2 Fuzzy Membership Functions

    [FONT="]FuzzyMembershipFunctions

    [/FONT]
    Membership function of a Fuzzy set is defined as the characteristic function or curve of a fuzzy set, which assigns to each element in a Universe of Discourse a value between 0 and 1 defining its degree of presence in the fuzzy set and is known as the membership value designated by .





    [FONT="]1.3.2.1 Triangular Membership Function[/FONT]


    This membership function is the most popular among scientists and engineers in this field. It is because its inherent simplicity allows for mathematical and computational ease. It can be defined by the variable x and three points a, b and c known as the left, center and right points.


    [​IMG]
    Image From: www[dot]emeraldinsight[dot]com


    So the equation for this membership function would stand as:


    [FONT="]µ[/FONT][FONT="](x)= 0 when x<=a[/FONT]
    [FONT="] (x-a)/(b-a) when a< x <=b[/FONT]
    [FONT="] (c-x)/(c-b) when b< x <=c[/FONT]
    [FONT="] 0 when x>c[/FONT]

    There are certain problems associated with the triangular membership function. The sharp top means that the membership value is 1 for only a certain value of x. This sharp transition can cause oscillations at the output.

    [FONT="]
    [/FONT]​
  • silenthorde
    silenthorde
    1.3.2.2 Trapezoidal Membership Function

    [FONT="]1.3.2.2 Trapezoidal Membership Function[/FONT]


    The trapezoidal membership function as shown in FIG 1.4 b has a flat top with membership value of 1 for a small range about the central point of the function. It eliminates the problems associated with the triangular membership function. The trapezoidal membership function can also be defined in terms of the variable x and the parameters a, b, c and d.


    [​IMG]
    [​IMG]
    Image from: www[dot]dma[dot]fi[dot]upm[dot]es
  • silenthorde
    silenthorde
    1.3.2.3 Generalized Bell membership function

    [FONT="]1.3.2.3 Generalized Bell membership function[/FONT]


    The generalized Bell membership function (FIG 1.5) can be defined by three parameters namely the parameter ‘a’ which defines the spread of the function, ‘b’ decides the slope of the left and right curves and parameter ‘c’ defines the centre point of the curve.


    [​IMG]


    Image From: Matlab Fuzzy logic Toolbox documentaion (modified)


    The formal definition is:


    [​IMG]
  • silenthorde
    silenthorde
    1.3.2.4 Sigmoidal membership function

    1.3.2.4 Sigmoidal membership function


    The Sigmoidal membership function is defined by two parameters: ‘a’ defines the slope of the curve and also the sign of the parameter ‘a’ decides whether the curve will be right-open or left-open. Also parameter ‘b’ defines the point µ (b) = 0.5. It can be defined as,





    [​IMG]




    [​IMG]


    Image source: matlab Documentaion (modified by silenthorde for the tutorial)






    Many other membership functions other than the ones discussed exist. The choice of the membership function is driven by the need of the application. However by varying the various parameters of the same membership function the sensitivity, overshoot, rise time, peak time and settling time of a system can be affected.
  • silenthorde
    silenthorde
    1.4: Why use Fuzzy logic?

    [FONT="]1.4 Why use Fuzzy logic?

    [/FONT]
    §[FONT="]Fuzzy logic is conceptually easy to understand. The mathematical concepts behind fuzzy reasoning are very simple. Fuzzy logic is a more intuitive approach without the far-reaching complexity.[/FONT]

    §[FONT="]Fuzzy logic is tolerant of imprecise data. Everything is imprecise if closely monitored, but more than that, most things are imprecise even on careful inspection. Fuzzy reasoning builds this understanding into the process rather than tacking it onto the end.[/FONT]

    §[FONT="]Fuzzy logic can model nonlinear functions of arbitrary complexity. Fuzzy systems can be made to match any set of input-output data. This process made particularly easy by adaptive techniques like Adaptive Neuro-Fuzzy Inference Systems (ANFIS). [/FONT]

    §[FONT="]Fuzzy logic can be built on top of the experience of experts. In direct contrast to neural networks, which take training data and generate opaque, impenetrable models, fuzzy logic lets you rely on the experience of people who already understand your system.[/FONT]

    §[FONT="]Fuzzy logic can be blended with conventional control techniques. Fuzzy systems don't necessarily replace conventional control methods. In many cases fuzzy systems augment them and simplify their implementation.[/FONT]

    §[FONT="]Fuzzy logic is based on natural language. The basis for fuzzy logic is the basis for human communication. This observation underpins many of the other statements about fuzzy logic. Because fuzzy logic is built on the structures of qualitative description used in everyday language, fuzzy logic is easy to use.[/FONT]

    The concluding statement is perhaps the most important of all factors that drive engineers into using Fuzzy logic based control system. Its capability of handling imprecise linguistic variables makes it the perfect choice for any kind of system.


    Before moving into the theory of a fuzzy logc controller, we'l take a look at a very simple application of fuzzy controllers. That way it will be easier to visualize the concept, and we can have a quick revision of the concepts introduced earlier.

  • silenthorde
    silenthorde
    A Fuzzy Container crane controller.

    Lets take a look at it first...

    [​IMG]
    Please note, that theta and D are interrelated and can be computed from one another, at least in this crane. But in an actual container crane they are independent variables. This a simply a schematic version.


    The picture is self explanatory. The inputs to the controller are:

    1. Theta (shaft angle)
    2. D (distance from the ship.)

    Objective: To place the container in it's proper place on the ship.

    Controlled variable: Power supplied to the crane.
  • silenthorde
    silenthorde
    Lets Build it then

    So we have decided our inputs and decided our controlled variable, fixed our objective.

    Remember the controller in not a ordinary PID controller, we will use a Fuzzy logic contrller. In very simple terms, Fuzzy logic controllers understand what you think, but only if the data is Fuzzy. The data from the sensors are analog crisp data. We have to have Fuzzy data, so what do we do. We apply a process called Fuzzification, and by it we Fuzzify our inputs.

    It's easier said than done. For fuzzzification we need to define the Membership functions for each input and output variable. Remember we will divide the Universe of discourse and define fuzzy sets which will span it. The concept will be more clear from the picture below:[​IMG]

    Here let us first define the fuzzy sets corresponding to the input variable Distance (D) (First line in blue box)

    We have fined 5 fuzzy sets, each describing a linguistic variable

    For instance: "Close" is a linguistic variable deined by a TRIANGULAR membership function.

    Now that we have defined the fuzzy sets and the linguistic variables, we can Fuzzify the measured sensor data Distance(D)

    Lets say, it is measured at 12yds

    Important:
    1. In the figure we have located 12 yds on the x-axis.

    2. We have drawn a vertical line that intersects some of the fuzzy sets.

    3. from these point o intersection we ge the membersip grade
    [FONT="]µ[/FONT], in every fuzzy set.

    4. So membership grades are:

    0.1 in FAR
    0.9 in MeDIUM
    0 in rest of the sets.





  • silenthorde
    silenthorde
    Ok then, oneof our inputs has been fuzzified. Lets move on to the next input variable. Theta( angle of the shaft).

    [​IMG]

    So what's the first step. we have to define the fuzzy set that span the Universe of Discourse and describe our linguistic variables.

    So we have defined 5 sets, 2nd line in blue box. Notice their characteristics in the image. Note that the sensitivity is higher for lower angles. This is because for a small i/p the o/p would otherwise have been too low.


    Now suppose the angle measured is 4 deg. From the figure:

    the mebership grades are:

    0.2 in zero and 0.8 in Pos Small and 0 in the rest

    Ok, both of our inputs have been fuzzified, so lets define the fuzzy sets that will describe our o/p variable

    Third line of blue box:

    Again five fuzzy sets span the universe of Discourse.
  • silenthorde
    silenthorde
    The fuzzy crane controller

    It's time to define some rules. These rules will govern how the fuzzy controller will take descisions.

    [​IMG]

    The rules are defined in the top RED box.

    If we take a close look at the rules we will notice, it consists of two parts... THE IF PART and THE THEN PART

    Let's evaluate the IF PART first

    in Rule 1: IF Distance =MEDIUM and Angle= Pos_Small

    DISTANCE=Medium, what this means is " What is the membership grade of the i/p distance in the fuzzy set MEDIUM?"

    Now look at RED box 1 for distance we have membership grade 0.9. (Remeber we fuzzified this i/p in our earlier lesson)

    And now, silmilarly Angle=Pos_small will lead us to membership grade of 0.8.

    If you have noticed there is an "AND" between the two i/ps. What does this mean? This means we need to select fuzzy Intersection operation.

    So we select the minimum of 0.9 and 0.8 , giving us a value of 0.8.

    What do we do with this?
    This will tell us with what strenght this particular rule will be effective, we will use it to evaluate the THEN part.

    This is done for every RULE. You can try it as an exercise.


  • silenthorde
    silenthorde
    So now we evaluate the THEN part of the rule...

    [​IMG]

    Remember we had defined 5 sets for the o/p...refer to earlier posts....

    These sets have been shown in the picture above...

    On the Red box above we have rewritten the Fuzzy rules. And the corresponding values we had computed in hte previous post.

    Now we will ignore the IF part and Just look at the THEN part and the numerical values written beside each. (RED BOX)

    Carefully look at wjat we do with them...

    FOR RULE 1: the then part states POWER=POS_MEDIUM
    and corresponding to it we have 0.8

    Now look at the picture below it...We have literally sliced the triangular set POS MEDIUM at membership grade of 0.8.

    THis is repeated for every rule. And we obtain the Area as shown in RED. So what do we do with this funny looking area? We come to a compromise regarding the value... There are a number of ways to do this..For now it is enough to know, that here we have computed the Centre of Gravity of the area. It comes out to be 10kW of power.
  • silenthorde
    silenthorde
    2.1: Overview of a Fuzzy Logic Controller

    [FONT="] [/FONT] A fuzzy logic controller is based on the concept of existing controllers like PID, PI, and PD etc. Let us consider a PID controller. Its linear behaviour may be expressed in the form,


    [​IMG]

    Where, u(t) is the control action signal and e(t) is the error signal. To obtain proper control action it is necessary to consider issues such as operator interfaces, smooth switching between manual and automatic mode, transients due to parameter variation, effect of non-linearity of actuators etc. Once the system behaviour has been studied thoroughly, performance objectives may be impressed on it. Then the heuristic rules that describe that describe the equation can be laid down by the help of intelligent trial and error basis as well as self learning through experience. This forms the cornerstone of every Fuzzy logic controller. Fig 2.1 shows the block diagram of a fuzzy controller operating in a process loop.


    [​IMG]


    The principal design parameters for a fuzzy logic controller are:

    §[FONT="] [/FONT]Fuzzification rules and interpretation of a fuzzifier.
    §[FONT="] [/FONT]Data base:
    1.[FONT="] [/FONT]Dicretization/ normalization of the universe of discourse.
    2.[FONT="] [/FONT]Fuzzy partition of input and output spaces.
    3.[FONT="] [/FONT]Completeness.
    4.[FONT="] [/FONT]Choice of membership function of a primary fuzzy set.
    §[FONT="] [/FONT]Rule base:
    1.[FONT="] [/FONT]Choice of process state (input) variables and control (output) variables of the fuzzy rules.
    2.[FONT="] [/FONT]Source and derivation of fuzzy control rules.
    3.[FONT="] [/FONT]Types of fuzzy control rules.
    4.[FONT="] [/FONT]Consistency, interactivity and completeness of fuzzy rules.
    §[FONT="] [/FONT]Fuzzy inference mechanism.
    §[FONT="] [/FONT]Defuzzification strategies and interpretation of the defuzzifier.


    Based on procedure adopted by the Rule base and the fuzzy inference engine Fuzzy Logic controllers can be classified under three standard models, namely:

    §[FONT="] [/FONT]Mamdani Model
    §[FONT="] [/FONT]Takagi-Sugeno-(Kang) Model
    §[FONT="] [/FONT]Tsukomoto Model
    We shall not discuss Tsukomoto model, since it is beyond the scope of this thread. Now, we move on to explaining each block of the fuzzy logic controller in details.

    [FONT="] [/FONT]
  • silenthorde
    silenthorde
    2.1.1: The Fuzzification Module

    [FONT="]Fuzzification module

    [/FONT]
    The first stage of any fuzzy logic controller is a Fuzzification module. Fuzzification comprises of the process of transforming crisp values into fuzzy values, thereby, assigning grades of membership for linguistic terms in fuzzy sets. The membership function is used to associate a grade to each linguistic term. For example, let us consider a car whose speed is to be controlled. The car speed is measured with a tachometer and fed to the Fuzzification module of the FLC. Suppose that x0 = 70 km/hr at a certain time instant. The two fuzzy sets A and B represent the two linguistic variables ‘Low Speed’ and ‘Medium Speed’. Then referring to FIG 2.2, the car speed should have a membership grade µA (x0) = 0.75 µB (x0) = 0.25 of fuzzy sets ‘Low Speed’ and ‘Medium Speed’ respectively. These are the fuzzified inputs corresponding to the crisp car speed inputs.
    [​IMG]


    Image and Example from: www.atp.ruhr-uni-bochum.de

    It is clear that the input membership function of the Fuzzification module used to map the crisp data inputs to the fuzzy domain must be selected carefully. The following parameters of a membership function may be tuned for better performance of the controller:

    §[FONT="] [/FONT]Overlap: It is the point of crossover between two membership functions. As the overlap is varied, the fuzzification of the input space changes. Zero overlap is undesirable since there will be regions where even strong rules will fail to make a decision. In fact in such a situation no rules are fired at the point of crossover. The performance improves as the crossover point is increased to 0.5 because at this value certain strong rules can fire a valid decision. However, further increase in the crossover point leads to degradation of the performance. This is because adjacent membership functions almost merge together and decision making becomes difficult.

    §[FONT="] [/FONT]Sensitivity: The sensitivity of the controller to small input variations can be increased simply by varying the width of membership functions. This can be incorporated by making the width of the membership function narrow at lower values of controller input range and broader as the value of input increases. So when the system operates at large values of error, coarse action is taken, but as soon as the value enters within a specified band, fine control is initiated.

    The Fuzzification module is common to all the three models: Mamdani, Takagi-Sugeno-(Kang) and Tsukomoto. It is implemented in the same manner in all the three models.
  • silenthorde
    silenthorde
    2.1.2: Knowledge Base

    The knowledge base of a fuzzy logic controller is made up of two parts: The Data base and The Rule base.



    2.1.2.1 : [FONT="]Data base[/FONT]


    The basic function of the Data base is to provide necessary information for the fuzzification module, the Rule base and the Defuzzication module to operate. The information provided includes:

    §The fuzzy sets or membership functions which represent the meaning of the linguistic process variables and the control output variables. These are defined subjectively based on experience of the process or objectively defined through fuzzy statistics, neural networks or genetic algorithms that have adaptive and learning capabilities.
    §Physical domains and universe of discourses and their normalized counterparts together with normalization and denormalization (scaling) factors. If a Discretization step is included, the rule base also contains information about the quantization steps and discretization rules.



    [FONT="]2.1.2.2 Rule Base[/FONT]


    The basic function of the rule base is to represent or mimic the control rules or protocols of an experienced process operator in the form of some if-then rules.

    If then

    Where, the Process States and Control Output are stated in terms of linguistic variables defined by fuzzy sets on the respective Universe of discourses. The ‘ if ’part of the rule is known as the antecedent or premise and gives a description of the process state that is required to fire the rule concerned. The ‘then’ part of the rule is known as the consequent which describes the control action that must be taken if the antecedent part is fulfilled. The control rules are formulated by:

    §Expert experience and knowledge of control engineering: One of the most common heuristic approach towards fuzzy rule formulation is introspective verbalization of human expertise.

    §Control operator’s control actions: a human operator consciously or subconsciously employs a set of if-then rules to control any process. These rules can be codified to form the rule base.

    §Using a Fuzzy model of the system: The dynamic behaviour of the system is modelled through a linguistic approach, which provide the necessary control rules.

    §Based on self learning: It refers to self-organizing controllers (SOC) like adaptive control systems or neural networks which have the ability to learn and create fuzzy rules based on past experience with the process.
    The rule formulation is different for Mamdani and Takagi-Sugeno models. They have been illustrated below:
    Table 1: Mamdani and Takagi-Sugeno-(Kang) Rules​

    [​IMG]


    [FONT="]An example illustrating both the rules is given below:[/FONT]


    [​IMG]


    As illustrated in FIG in the Mamdani rule the antecedent is a conjunction of a number of fuzzy memberships, in this case for rule 1 (R1) membership of fuzzy set ‘young’ describing the linguistic variable ‘age’ and membership of fuzzy set ‘high’ defining the linguistic variable ‘car-power’. The consequent part is also a fuzzy set ‘high’ describing the linguistic variable ‘risk’, and similarly for rule 2 (R2).





    [​IMG]
    The Takagi-Sugeno-(Kang) rules are illustrated in FIG 2.4. The antecedent part for both Mamdani and Takagi-Sugeno rule is same, however the consequent part differs. The consequent for Takagi-Sugeno rule is a real valued function, in this case a function of order 1. The consequent is a function of the firing strength of the linguistic variable ‘age’ and ‘car-power’. Thus the output is a crisp value. The output being a crisp value, it is quite obvious that the Takagi-Sugeno model does not need a Defuzzification module. It is due to this reason that Takagi-Sugeno model is preferred in most modern applications.
  • silenthorde
    silenthorde
    2.1.3: Fuzzy Inference Engine

    [FONT="]Fuzzy Inference Engine

    [/FONT]
    Fuzzy inference engine forms the heart of any fuzzy logic controller. It takes decisions based on the firing strength of rules and provides the control output in fuzzy terms (Mamdani model) and in crisp values (Sugeno model). There are two approaches to fuzzy inference engine design, they are:

    1.[FONT="] [/FONT]Approximate Reasoning
    2.[FONT="] [/FONT]Compositional Inference

    The fuzzy inference system is different for the two models. We first illustrate the Fuzzy inference system of Mamdani model.[FONT="] [/FONT][FONT="]Mamdani-type inference[/FONT], expects the output membership functions to be fuzzy sets. On the other hand, for the Takagi-Sugeno type inference system the first two parts of the fuzzy inference process, i.e. fuzzification of inputs and applying the fuzzy operator, are exactly the same. The main difference between Mamdani and Sugeno type system is that the Sugeno output membership functions are either linear or constant.





    To be contd...
  • edd567
    edd567
    short and sweet!!! 👍 keep up the good work

You are reading an archived discussion.

Related Posts

[FONT="]My husband and I were trying to purchase a home but we need to raise our credit score and I heard about this credit enhancement program that will raise your...
I want to do something big.I'm ready to work hard learn new stuff and for the record I have already done before.SO I need a idea with MS in mind.I...
can u tell me something about Conference in final yr?? Is it Paper presentation????????
Awesome! It's been 40 years since Appolo was launched. It all started from in 1960 when NASA visualised sendign humans on moon. The mission started of with a monkey and...
Hello Guys, Im new to Tomcat and am trying setup Jmeter working..guess Im missing something here. I have downloaded the binaries and have a default install I trying to run...