*Proceeding Paper* **Design of Type 2 Fuzzy Logic Controller for FESTO Process Workstation †**

**Bendib Riad \*, Mechhoud El-Arkam, Kassah Maroua, Kattouche Wiam and Zennir Youcef**

† Presented at the 2nd International Conference on Computational Engineering and Intelligent Systems, Online, 18–20 November 2022.

**Abstract:** Fuzzy logic is the most effective mathematical solution that has been presented in the last few years to deal with the problems in which imprecise and uncertain data exist. It can be defined as a generalization of classical binary logic, which admits only two logical states, true or false, by adding degrees of truth between the extreme values. Its basics were initiated by Lotfi Zadeh in the mid-1960s. However, in the last few years, a question was raised by different authors: yes, by using a fuzzy set or membership functions we can solve the problem of some kinds of uncertainties, but what is the situation in cases where the uncertainties exist in the membership function itself? To handle this situation, researchers introduce type 2 fuzzy logic. In our paper, we will introduce the design of a type 2 fuzzy logic controller to control the level in a FESTO process workstation. The mathematical model is first deduced, and after that the controller is designed. The simulation results show that the obtained controller gives very good transient characteristics for the system response work.

**Keywords:** fuzzy logic; level control; type 2 fuzzy logic; FESTO workstation

#### **1. Introduction**

One of the biggest problems generally facing chemical process industries (CPI) [1] is that they are very complex and accurate models are difficult, if not impossible, to obtain [2,3]. One reason for this is the nonlinear nature of most CPI problems. Another reason is the multivariable nature of control problems, since in almost all cases we need to control at least two parameters: the quantity and quality [4]. To overcome these problems, it will be helpful to apply techniques that use human judgment and experience rather than precise mathematical models, which in the major cases are deduced from the linearization of the system and simplification hypothesis. The fuzzy logic systems are capable of handling complex, nonlinear systems using simple solutions. Although they seem adequate for controlling chemical processes, since they provide solutions to incompletely defined and nonlinear processes, they are not widely used by researchers since obtaining an optimal set of fuzzy membership functions is not an easy task [5]. Another difficulty that faces the engineer when we use the fuzzy logic approach is this question: we believe that these techniques are suitable to handle uncertainties using the principle of membership degrees, but what is the situation in cases of the existence of uncertainties in the membership function itself? [6]. Different approaches are provided to deal with this situation, among them the use of what we call type 2 fuzzy logic [7]. In our work, we use a type 2 fuzzy logic controller to control the level in the FESTO MPS PA Compact Workstation [8,9]. A general description for this workstation is given in the following sections. To achieve the goal of our work, we first introduce a general description of fuzzy logic, followed by an introduction to type 2 fuzzy logic, process description and, finally, simulation and results.

**Citation:** Riad, B.; El-Arkam, M.; Maroua, K.; Wiam, K.; Youcef, Z. Design of Type 2 Fuzzy Logic Controller for FESTO Process Workstation. *Eng. Proc.* **2023**, *29*, 6. https://doi.org/10.3390/ engproc2023029006

Published: 11 January 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Laboratory of Automatic, Department of Petrochemical, University 20 August 1955-Skikda, Skikda 21000, Algeria

**<sup>\*</sup>** Correspondence: r.bendib@univ-skikda.dz

#### **2. Fuzzy Logic**

#### *2.1. Definition*

The fuzzy logic tool was introduced in 1965 by Lotfi Zadeh [10,11], and is based on the concept of fuzzy sets. Fuzzy sets theory provides a mathematical tool for dealing with uncertainty. In general, fuzzy logic provides an inference structure that enables appropriate human reasoning capabilities. It is classified as an artificial intelligent tool. This is because fuzzy systems modeling, analysis, and control incorporate a certain amount of human knowledge into their components (fuzzy sets, fuzzy logic, and fuzzy rule base) [12,13]. In recent years, the number and variety of fuzzy logic applications have increased significantly. The applications range from consumer products such as cameras, camcorders, washing machines, and microwave ovens to industrial process control, medical instrumentation, decision-support systems, and portfolio selection.

#### *2.2. Fuzzy Logic Control*

Control applications are the kinds of problems for which fuzzy logic has the greatest success [14–16]. The basic structure of a fuzzy logic controller is shown in Figure 1.

**Figure 1.** Fuzzy logic controller.

The measurements are processed using actual sensors (exact values), and after going through the fuzzification stage they transferred to linguistic variables, and in their fuzzier form, fuzzy inferences are computed, and the result is defuzzified; that is, it is transformed back into a specific number.

#### **3. Type 2 Fuzzy Logic**

The concept of a type 2 fuzzy set was introduced by Zadeh as an extension of the concept of an ordinary fuzzy set (henceforth called a type 1 fuzzy set) [17,18], in which the antecedent or consequent membership functions are type 2 fuzzy sets. Such sets are fuzzy sets whose membership grades themselves are type 1 fuzzy sets; they are very useful in circumstances where it is difficult to determine an exact membership function for a fuzzy set. They can be used to convey the uncertainties in membership functions of type 1 sets, due to the dependence of the membership functions on available linguistic and numerical information. Linguistic information (e.g., rules from experts), in general, does not give any information about the shapes of the membership functions. When membership functions are determined or tuned based on numerical data, the uncertainty in the numerical data, e.g., noise, translates into uncertainty in the membership functions. In all such cases, information about the linguistic/numerical uncertainty can be incorporated into the type 2 framework [15]. The structure of a T2FLS (type 2 fuzzy logic system), as presented in Figure 2, is quite similar to a type 1. The only difference is that the antecedent and/or

consequent sets in a T2FLS are type 2. There are five principal parts in a T2FLS: fuzzifier, rule base, inference engine, type-reducer and defuzzifier.

**Figure 2.** Type 2 fuzzy logic system.

#### **4. Process Description (FESTO MPS PA Compact Workstation)**

The FESTO MPS PA Compact Workstation shown in Figure 3 is a laboratory stand that has been used to design different kinds of PID controllers. As we can see in the photo, the stand is composed of a pump, pipes, two tanks, different types of sensors, actuators and a PLC controller S7-300 (Siemens Aktiengesellschaft, Nuremberg, Germany) to allow the testing of different types control systems. Using an OPC server algorithm, the PLC can communicate with the MATLAB software, in which the different control algorithms are designed. The system is equipped with a graphical tool implemented using WINCC software, to supervise the process and indicate the different measurements [19,20].

**Figure 3.** Type 2 Fuzzy logic system.

The FESTO Didactic station allows the realization of such a control system as: level, pressure, temperature and flow rate; in our case, the level control loop is used. The considered loop is shown in Figure 4. The process of the level control system is realized by the pump P101, that pumps liquid from tank B101 to tank B102 and the ultrasonic sensor

located on the top of the tank B102. The measurement signal transmits the value of liquid in tank B102, and the correction is realized through an actuator signal which is the voltage applied to the pump. As is shown in Figure 4, the process admits a disturbance represented by manually opening/closing the valve V102 or the valve V110.

**Figure 4.** FESTO level control loop.

The best model that describes the relationship between the pump voltage and output flow rate was that identified, such that it provides better values of best fit for the training and validation tests. The transfer function given by is by Equation (1):

$$\frac{\Upsilon(\mathbf{z})}{\mathbf{U}(\mathbf{z})} = \frac{0.013402 \text{ z}^{-1} - 0.013391 \text{ z}^{-2}}{1 - 1.970562 \text{ z}^{-1} + 0.970593 \text{ z}^{-2}} \tag{1}$$

#### **5. Simulation and Results**

In this section, the designs of type 1 and type 2 fuzzy logic controllers are presented.

#### *5.1. Simple Type 1 Fuzzy Logic Controller*

The Simulink Block diagram for the simple fuzzy logic controller applied for the FESTO workstation is shown in Figure 5, such that the inputs are the error and the variation of the error, and the output is the control action for the valve.

**Figure 5.** Simple fuzzy type 1 logic diagram applied for FESTO workstation.

The membership functions for the inputs and are shown in Figure 6.

**Figure 6.** The membership functions for the inputs. (**a**) Error; (**b**) Delta error.

Figure 7 shows the output membership functions for the control signal of the valve.

**Figure 7.** The membership function for the control action output.

The transient response for the system is shown in Figure 8:

**Figure 8.** The transient response for a step input case simple FLC.

#### *5.2. Type 2 Fuzzy PID Controller*

The Simulink Block diagram for the type 2 fuzzy logic PID controller applied for the FESTO workstation is shown in Figure 9, such that the inputs are the error and the variation of the error and the outputs are Kp, Ki and Kd; the PID controller's parameters.

**Figure 9.** Simulink Block for Type 2 fuzzy logic PID controller.

The membership functions for the inputs are shown in Figure 10.

**Figure 10.** The Type 2 membership functions for the inputs. (**a**) Error; (**b**) Delta error.

Figures 11–13 show the output membership functions of the PID parameters.

**Figure 11.** The membership function for KP.

**Figure 12.** Ki membership function.

**Figure 13.** Kd membership function.

The transient response for the system is shown in Figure 14.

**Figure 14.** The transient response for a step input case Type 2 FLC.

The above figures (Figure 14) show that the system has a very fast response to the set point, with more precision and stability compared with the use of a simple fuzzy logic controller shown in Figure 8, the same remark for the use of simple PID control. The experimental and simulation results show that a better control in terms of robustness, speed and precision can be achieved by type 2 fuzzy logic controllers.

#### **6. Conclusions**

In this paper, we have presented the results of simulation with the two types of fuzzy control that we have studied in this work, using a simple fuzzy controller and also a fuzzy PID controller for the FESTO Process Workstation. We have seen that the type 2 fuzzy controller shows very good performance when compared with the type 1, and from the results obtained we can say that the type 2 fuzzy controller is not just an extension, but an improvement of the type 1 fuzzy controller in the simulation framework.

**Author Contributions:** Conceptualization, B.R. and M.E.-A.; methodology, B.R.; software, K.M. and K.W.; validation, B.R.; formal analysis, B.R.; investigation, B.R.; resources, K.M. and K.W.; data curation, B.R.; writing—original draft preparation, B.R. and M.E.-A.; writing—review and editing, B.R.; supervision; Z.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
