# Introduction to fuzzy logic

### Fuzzy logic is among those basic techniques that any automation engineer should know how to apply when dealing with suitable challenges. But what is fuzzy logic?

Formulated in the mid 60’s by Lofti Zadeh, fuzzy logic is above all a generalization of Boolean logic. It introduces a graduation into a concept that was previously either true or false.

In the following article, we will explain the fuzzy logic principle through a trivial example: an electric heating device with a variable heating power.

The core of a fuzzy logic system is based on fuzzy rules, for instance:

• IF low temperature, THEN high heating
• IF high temperature, THEN no heating

These rules can be:

• elaborated thanks to the expertise of the operator who is used to piloting the system
• extracted automatically from a database, the operator will check the rules afterwards.

The conditions of these rules are logical expressions made up from an input quantity (temperature) assimilated to a fuzzy set (for instance, all the low temperatures).

With Boolean logic, the expression “low temperature” would be equal to either “TRUE” (0) or “FALSE” (1). With fuzzy logic, we permit all values between 0 and 1. So, if the temperature is warm/hot, the value of the expressions “low temperature” would be 0.4 and “high temperature” would be 0.6. Numerical value depends on the definition of a set (it refers to membership function).

If we look at previous rules and apply them to this warm temperature, first condition is then “40% true” and the second one is “60% true” (it is the “membership degree”).

The action performed (in our case, heating power imposed on device) is deducted from the analysis of rules, weighting conclusions according to the membership degree.

As we can see in this example, fuzzy logic is well adapted to reproducing the mental process of an operator piloting the system. We can also find fuzzy logic in other applications where decision-making is crucial like management or finance.

Some innovative realizations that use fuzzy logic:

• concrete’s plasticity modelling in an industrial mixer (Advantic 2002)
• optimal control of the ventilation system at a pig farm (Innov’Space)
• level control of a silo (steel production process: 1,000T/h), awarded by Association Technique de la Sidérurgie Française

Fuzzy logic does not necessarily replace a conventional control system, it is complementary. Its advantages come from the abilities to:

• standardize and simulate an operator or designer’s expertise to adjust a process
• obtain a simple response to processes for which modelling can be tricky
• obtain a response to transitional cases without discontinuities, and gradually embed it into the expertise
• take in account several variables and perform a “weighted merge” of influence quantities

Mixing several techniques, like machine learning to define rules, suggests interesting ways. We can picture building simultaneously, thanks to learning, fuzzy rules and membership functions.

Fuzzy logic approach and rule standardization in a quasi-natural language make it an easy tool to implement and improve later. Every automation engineer should have fuzzy logic in his range of skills.

Patrice Houizot, july 2014