FUZZY  LOGIC

 

 

 

 

     Mukesh. C. Motwani

     Department of Electronics

          Vishwakarma Institute of Technology, Pune 411037

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INTRODUCTION

 

           Fuzzy Logic acquired its name from Fuzzy Set Theory, a branch of mathematics developed by Lotfi A. Zadeh at the University of California in 1965. It has come to prominence recently because of its inclusion in many new consumer products. In Japan Fuzzy-research is widely supported with a huge budget. In Europe and the USA efforts are being made to catch up with the tremendous Japanese success. For instance, the NASA space agency is engaged in applying Fuzzy Logic for complex docking-maneuvers.

           Zadeh's Fuzzy Set Theory was developed to provide a way of addressing vague concepts. Everyday human concepts like  "quite warm" and "pretty tall" are highly ambiguous. For example, at what age does one become "middle aged"  then make the transition to "old aged"? The normal distribution describes most natural systems very well; it is unnatural to make a direct transition from middle aged by walking up on your 55th birthday and suddenly being old aged. In classical set theory an item is either a complete member or not a member at all. Conversely, fuzzy set theory allows partial membership i.e. gradual transition from being a full member and full non-membership. Hence it is a generalization of the classical set theory. As we drift into middle age, our degree of membership in the fuzzy set for old aged will increase. The boundary between the sets "middle aged" and "old aged" would be "fuzzy" and could not be quantitatively fixed.

           The employment of Fuzzy Control is commendable for very complex processes, when there is no simple mathematical model , or for highly nonlinear processes or if the processing of (linguistically formulated) expert knowledge is to be performed.

          Fuzzy Logic has emerged as a profitable tool for the controlling of subway systems and complex industrial processes, as well as for household and entertainment electronics, diagnosis systems and other expert systems.

          As fuzzy logic is a mathematical concept it can be applied both in hardware and software; an analogy is the mathematical process of integration - we can use a software program to integrate or alternatively, a hardware solution to perform the same task using op-amp with a capacitor on the feedback loop. The initial interest in fuzzy has been to employ the software approach, embedding the resulting code into a standard microcontroller such as Motorola 68HC05 or 68HC11.

 

 

 

FUZZY LOGIC - The Engineering Solution

         

            There are two particularly good reasons for using a fuzzy logic solution (which leads to several more advantages). The first is that it is a very simple intuitive way of describing a complex engineering problem in everyday terminology. Thus an engineer with expertise in a particular area can produce a complete solution to a problem without having to be expert in software to code the solution for embedding too. The second reason is that it is a very powerful, highly non-linear and efficient way of mapping outputs to inputs using a minimal amount of code and in a very robust manner.

          Conventional methodologies dictate that we commonly use mathematical equations or look-up tables to map outputs to input values, although it is difficult/ time consuming/ sometimes impossible to formulate equations for surfaces of any complexity. Solving nth order differential equations in real-time is expensive too, typically requiring floating point processors. Look-up tables occupy too large amounts of memory space. By contrast, a fuzzy solution cam map even a highly non-linear control surface accurately with fewer rules and less memory.

 

Fuzzy Controllers: Fuzzy controllers are the most important applications of fuzzy theory. They work rather different than conventional controllers; expert knowledge is used instead of differential equations to describe a system. This knowledge can be expressed in a very natural way using linguistic

variables, which are described by fuzzy sets. 

            The Inverted Pendulum Controller is a classic control problem. Fuzzy logic can be used to "exploit the tolerance for imprecision" in the solution and provide a more economic solution. The need is to keep the pivoted pendulum upright by moving the trolley on which it is mounted. When the pendulum falls over in a particular direction, an unknown voltage is applied to the trolley motor to drive it in the same direction - this compensates and causes the pendulum to tend towards upright. The input variables to the system are the pendulum angle and the rate of change of the angle. the output is the motor voltage. Theoretically, the control problem consists of solving four second order differential equations. To perform this in real-time would typically require a 32-bit floating point processor. Using fuzzy logic embedded software, it has been demonstrated successfully using a  standard 2MHz 68HC11.

 

 

  THE FUZZY PROCESS

        

           Three basic steps of fuzzy inference are fuzzification , rule

evaluation and defuzzification. Though many inference methods exist, this paper will detail only one, the min-max inference methodology.

 

Fuzzification:

             A  fuzzy controller will receive crisp inputs (typically two or three) on its input or communications port and initially fuzzify them. Each system input is divided into overlapping sets of membership functions, typically 3 to 9 sets per input. The predefined membership functions cover the entire range of values (or universe of discourse) for an input and will define a degree of truth for every point in the universe of discourse. Fig shows 5 trapezoidal membership functions for an input to a fuzzy controller; note that each membership function is typically labeled to quantify the input(i.e. very slow, fast, etc.) and that each function assigns a degree of truth (between 0 and 255) to an input. Note that membership functions may be more complicated in shape with a tradeoff of more complex arithmetic and memory requirements in the fuzzification step.

          The fuzzification process uses two basic steps which are repeated for each system input. First, a crisp input must be read and scaled to a value between 0 and 255( for an 8 bit fuzzy engine). second, the input must be translated to a degree of membership(between 0 and 255)

for each input membership function. Thus, the fuzzification function produces a set of fuzzy inputs by reading a real-time crisp input, scaling it to 8 bits, and assigning a degree or grade for each input membership function defined by the user.

 

Rule Evaluation

            Fuzzified inputs are processed through a predefined set of rules(typically 15 to 25 rules per system) using a min-max evaluation to form fuzzified outputs. In detail, rules are arranged in an If-then format-- -if two or more inputs (called antecedents) are all true then an output function(called a consequent) is executed to the degree of the minimum value antecedent. Often times all the rules of a system are displayed in matrix fashion where he consequents(outputs) are listed for all possible combination pairs of antecedents(inputs).

           Fuzzified outputs are classified into membership sets similar to input membership functions. Though many types of output functions are valid, this paper will only cover singletons in which the scaled outputs of a system( ranging from 0 to 255) are defined as 3 to 9 discrete values which are assigned weights(between 0 and 255) in the rule evaluation step described above as shown in fig.

 

Defuzzification

           The final task of a fuzzy engine is to defuzzzify its fuzzy outputs into a single raw or crisp output for an external device (i.e. stepper motor,

D/A converter, etc.). Many other types of fuzzy inference exist and may be required for complex or highly accurate solutions, but min-max inference is applicable to a majority of control applications. There are several heuristic methods (defuzzification methods), one of them is e.g. to take the center of gravity of the fuzzy set.

 

 

FUZZY LOGIC DEVELOPMENT SYSTEM

          

            Fuzzy logic is a methodology for expressing operational laws of a system in linguistic terms, this circumvents the use of rigorous mathematical equations to describe a system. In the past, the computational resources needed required special hardware such as dedicated fuzzy logic co-processors or slow controllers, which limited the bandwidth of the system. The fig shows the use of DSP with a specialised fuzzy logic software kernel provides the required computing performance while maintaining low cost. However, the concept of fuzzy logic has repeatedly proven that for some applications a low cost , 8 bit microcontroller can equal or exceed the performance of a more expensive number crunching DSP. Motorola has recognized the power of fuzzy logic and has created fuzzy kernels and support tools for a number of their microcontrollers including the MC143150/20 (Neuron Chip).

            The source code is written in "fuzzy inference language" which consists simply of "If- And- Then" statements which we use to define the rules. The source code also consists of specifying the input and output variables and the desired membership functions associated with each of these variables. Once membership have been created and rules have been defined, the next step for the designer is to debug/optimize his code, simulate and test the system.

            

 

 

APPLICATIONS

            

              Fuzzy logic has already proved to be innovative and successfully design methodology in certain key areas of embedded control where its attributes of simplicity, sensitivity, robustness and easy optimization are tremendously advantageous.

               Fuzzy logic has been applied widely across the consumer market where superior product performance has been achieved whilst reducing development time. Typical "fuzzy goods" that have been particularly successful have been washing machines, air conditioners, cameras and camcorders incorporating auto focusing mechanism, video cassette recorders, refrigerators and audio systems.

            It has been no secret that automotive manufactures have been using fuzzy technology for a number of years. There are literally dozens of applications in a standard vehicle which can deliver improved quality

 and performance through fuzzy logic. Air conditioning, Anti-lock Braking Systems, Cruise Control, Engine management, Transmission Systems and an array of new sensor based detection systems for vehicle displacement have all been optimized through fuzzy.

Here are just few examples of how Fuzzy Logic has been applied in reality:

Recognition of handwritten symbols with pocket computers (Sony)

Flight aid for helicopters (Sugeno)

Controlling of subway systems in order to improve driving comfort, precision of halting and power economy (Hitachi)

Improved fuel-consumption for automobiles (NOK, Nippon Denki Tools)

Single button control for washing-machines (Matsushita, Hitachi)

Automatic motor-control for vacuum cleaners with recognition of surface condition and degree of soiling (Matsushita)

Prediction system for early recognition of earthquakes (Inst. of Seismology Bureau of Metrology, Japan)

          It should be understood that no more than fifty rules have to be applied to describe the complete operation.

          

 

 

 

 

 

 

CONCLUSION

 

          The term Fuzzy thinking is pejorative when applied to humans, but fuzzy logic is an asset to applications from expert systems to process control. However there drawbacks in Fuzzy control systems. They include precise definitions of fuzzy rules, also it is difficult for user’s to come up with an optimal solution to any problem. As a result nowadays genetic algorithm is being combined with Fuzzy logic. While Fuzzy logic mimics Human imprecise reasoning, the genetic algorithm mimics the evolution of the nature. By changing, adding, deleting rules and fuzzy membership sets of the fuzzy system, the genetic algorithm automatically adapts and optimises the fuzzy control system. Genetic algorithm in fuzzy control eliminates problems associated with fuzzy control. This helps in reaching at a local optimum solution. The employment of Fuzzy Control is no good idea if conventional control theory yields a satisfying result or an easily solvable and adequate mathematical model already exists or the problem is not solvable at all.

       While many Fuzzy applications are still at an early stage of development, it seems probable that in near future Fuzzy logic will become routinely applied as it has already started, in many areas of artificial intelligence where communication with people or imitation of their thought processes is involved. This may be able to bridge the gap between analogic and flexible of humans and the rigid framework of today’s classical theory. Currently Fuzzy is being extensively used in pattern recognition, computer vision and robotics. The problems associated these applications are often tied up with overprecision. Hence fuzzy is the ideal answer to these problems.

        Fuzzy logic and neural networking is now been tried out on a massive scale to generate an electronic gadget which could perform as well as human brain. And though this statement seems overoptimistic and from fantasy world, it may seem to come true in the next century. We may well have an ‘intelligent’ machine equivalent to Einstein! I’ll leave you with that.