In this tutorial, we are going to discuss **Fuzzy Logic Control System**. Fuzzy logic is a many-valued logic in which the true values of variables may be any real number between 0 and 1. This logic’s purpose is to obtain the partial truth between true and false values. If we compare it with Boolean logic, then in Boolean logic there are only two integer values, 0 and 1. Whereas fuzzy logic uses linguistic variables for non-numeric values such as age, temperature, etc. with their relative degrees, and the member ship function manages these degrees. We can see this in the figure below.

This figure has five membership functions: very low (VL), low (L), medium (M), high (H), and very high (VH). These membership functions have different value ranges, such as (0.1, 0.4), (0.35, 0.65), and (0.6, 0.9). We can see these on the horizontal axis of the figure below. Similarly, these membership functions have two degrees, such as 0.5 and 1, as we can see on the vertical axis of the figure below. So, the main difference between fuzzy logic and Boolean logic is that Boolean logic has only two values, 0 and 1, whereas fuzzy logic has many values between 0 and 1, such as 0.1, 0.2, 0.3, etc.

## How the Fuzzy Logic System was Invented?

In 1960, Lotfi A. Zadeh, a professor at the University of California at Berkeley who had a well-known name in the field of development system theories at the time, felt that the traditional system analysis techniques were too precise for solving complex real-world problems. He proposed an idea with the grade membership function, which then became the backbone of fuzzy set theory in 1964. This idea was published in 1965 as a fuzzy set theory, as was the fuzzy logic technology that was invented. Similarly, in 1974, the first fuzzy logic controller was developed in the United Kingdom by S. Assilian and E.H. Mamdani for controlling steam generators.

After that, so many important industrial applications were developed by Japan in 1980 that were successfully launched around the world. Then, after eight years of constant research and development efforts, Yasunobu and his colleagues put a fuzzy logic control system on an automatic train in the Sendai City subway system in 1987. So, this was a brief history of the fuzzy logic invention.

### How Fuzzy Logic System Works?

The fuzzy logic system works on the basis of fuzzy rules, which are settled by the fuzzy logic controller designer. The fuzzy logic controller has two inputs, such as error (E) and change in error (DE), as we can see in the figure below.

These fuzzy rules are put into the fuzzy logic controller in this way; we have a change in error on the rows and the error on the columns.

Negative | Zero | Positive | |
---|---|---|---|

Negative | small | medium | small |

Zero | medium | huge | medium |

Positive | small | medium | small |

These are the main fuzzy rules that the fuzzy logic controller designer develops. Besides these rules, the designer could also set further fuzzy rules for obtaining more precise output. The designer only sets these rules. On the basis of these rules, the controller automatically sets the output of the fuzzy logic controller.

### Fuzzy Logic Control System

A simple fuzzy logic control system is shown is figure 3

The fuzzy logic control system consists of two inputs: error and change in error. We obtain this error by comparing the reference input signal with the output signal. Then we check the error with respect to time, which is the change in error. These are the two main inputs of a fuzzy logic controller. The fuzzy logic controller consists of three components: fuzzification, inference mechanism, and DE fuzzification. We will explain them in the paragraph below. When these inputs are given to the fuzzy logic controller, it decides what the output of this controller will be using fuzzy rules that are set by the fuzzy controller designer. Similarly, the fuzzy logic controller gives output to the motor or machine after the processing mechanism.

### Components of Fuzzy Logic Control System

The fuzzy logic control system consists of three main components:

#### Fuzzification

The fuzzification component consists of two further components: the membership function and labels. Fuzzy logic controllers convert input data or variable data into fuzzy membership functions according to user-defined charts, such as temperature being too cold or motor speed being too low, and assign the grade of this data value from 0 to 1. Refer to the figure below. The membership function can have different shapes, such as S, A, Ï€, and Z. We can see the shape of the membership function with labels such as low, medium, and very low in the first figure.

#### Inference Mechanism

The inference mechanism component of a fuzzy logic control system consists of fuzzy rules that the controller designer sets. We can see these in the second figure. On the basis of these fuzzy rules, the controller decides the output of the fuzzy logic controller. This is the main intelligent control of this system.

#### DE Fuzzification

The DE fuzzification component of fuzzy logic converts the fuzzy data values into real-life data values after examining the fuzzy rules. But these real-life data values depend on the DE fuzzification method. DE fuzzification uses different methods for the process, such as the center of gravity (SOG), weighted average method, mean of maxima (MOM), and smallest of maxima (SOM). Each method has different advantages and disadvantages. The controller designer sets these methods.

### Example of Fuzzy Logic Controller with Explanation

Using a fuzzy logic controller, we can easily control the water level or oil level of any tank. Here we will explain the fuzzy logic controller for controlling the water level of any tank. For a water level control system, refer to the figure below.

For controlling the water level of any tank, the designer first sets the fuzzy rules according to the second figure. Such as at which point of the water the valve will open, and at this point the valve will close. For this purpose, we need to install the sensors at the water tank to check the water level. These sensors sense the water level constantly and give the input signal to the fuzzy logic controller.

The fuzzy logic controller also has a reference signal, which means the water level should be at this point. This reference signal is compared with the sensor signal, and an error is generated. This error is checked with respect to time, which shows whether it is increasing or decreasing. These are basically the two inputs of a fuzzy logic controller. Then the fuzzy logic controller turns the motor on or off in relation to the water valve. When the water level is below the set value, it opens the water valve through a motor, and when the water level is below the set value, it closes the water valve.

## Conclusion

In conclusion, this tutorial provides an in-depth overview of fuzzy logic control systems. This logic can have any value between 0 and 1. This tutorial covers the workings, components, and example of a fuzzy logic control system to help us better understand the concept. Hopefully, this was helpful in expanding your knowledge.

You may also like to read:

- 74LS83 4-Bit Full Adder
- Projects Ideas for Final Year ECE and EEE Students
- Electronics Projects for Engineering Students
- Control Stepper Motor with A4988 Driver Module and ESP32
- Coin Based Water Dispenser System using pic microcontroller
- XBee Based Device Control System Using Pic Microcontroller

This concludes today’s article. If you face any issues or difficulties, let us know in the comment section below.