TY - JOUR AU - Chanie, Kassahun Ashagrie AB - 1. Introduction This paper is concerned with modeling, analysis, and control of coupled tank systems. The goal is to develop advanced control strategies capable of handling the complex dynamics of the coupled tank system for beverage factories. Applying the decoupling technique while seeking to control the liquid level and to regulate the flow rate at the desired value with minimum time. 1.1 Background Water purification, chemical, and biochemical processing, automatic liquid dispensing, food and beverage processing, and pharmaceutical industries all use liquid level control as a common example of process control. Control quality has a direct impact on product quality and equipment safety. The coupled tank liquid level control system, on the other hand, has a long lag, is nonlinear, and is complex, and the control accuracy is directly influenced by system status, system parameters, and the control algorithm. In the process industry, level control is one of the most important control system variables [1]. Coupled tank level control is difficult for a variety of reasons. Because of the valves, it is a highly nonlinear problem. Second, the interactions between process variables can exacerbate the control problem. Furthermore, according to Conventional feedback controllers may not be able to control the system properly because the interconnected tanks have a delay in response [2]. The majority of industrial process control applications have multiple input and output variables, which is referred to as a MIMO system. Heat exchangers, chemical reactors, and distillation columns are all examples of MIMO systems. Performing operations on a MIMO system is more difficult than on a SISO system. The interaction between the input and output variables is the reason for this [3]. A coupled tank system for liquid level control is a type of plant that is commonly found in commercial ventures, particularly in the chemical process industry. Nonlinearity exists in the coupled tank system. The reason for the non-linearity is that the transfer function changes as the height of the liquid in a tank changes, and the controller should be able to adapt to these changes. System dynamics and interacting nature are the issues with level control in coupled tank processes. As long as the inflow rate, i.e., the inlet and outlet flow rates, remain constant, the level will remain constant [4]. Loading is a common term used to describe interaction. If each input affects more than one output or if a change in one output affects the other outputs, the process is said to be interacting; otherwise, it is said to be non-interacting [5]. We must apply a new element called a Decoupler into the control system while designing two strongly interacting loops. Decouplers are used to cancel the interaction effects between two loops, resulting in two non-interacting control loops. To put it another way, the main goal of a decoupling control system is to eliminate complex loop interactions so that a change in one process variable does not result in corresponding changes in the other process variables [6]. The inlet flow rate, which is the variable used to bring the process variable to its set point, is the manipulated variable. Food processing, water purification systems, filtration, pharmaceutical industries, decoration, boilers, dairy, beverage, nuclear power generation plants, industrial chemical processing, spray coating, and other industrial applications all require liquid-level control. Typical actuators, such as electrical pumps and motorized valves, are widely used for feedback control, and many types of level sensors, such as displacement floats, pressure sensors, and so on, provide liquid level measurement [7]. This paper has made main contributions: ➢ To model coupled tank system dynamics using state space modeling technique and validate the model. ➢ To design a decoupling controller that can successfully decouple a TITO-coupled tank system. ➢ To design a fuzzy-PID controller/ to tune the parameters of the PID controller with FLC and implement it in the TITO system. ➢ To design a GA-PID controller. ➢ To control the desired level of tanks and regulate the flow rate with minimum time optimal operation and to compare the performance of the controllers. 1.1 Background Water purification, chemical, and biochemical processing, automatic liquid dispensing, food and beverage processing, and pharmaceutical industries all use liquid level control as a common example of process control. Control quality has a direct impact on product quality and equipment safety. The coupled tank liquid level control system, on the other hand, has a long lag, is nonlinear, and is complex, and the control accuracy is directly influenced by system status, system parameters, and the control algorithm. In the process industry, level control is one of the most important control system variables [1]. Coupled tank level control is difficult for a variety of reasons. Because of the valves, it is a highly nonlinear problem. Second, the interactions between process variables can exacerbate the control problem. Furthermore, according to Conventional feedback controllers may not be able to control the system properly because the interconnected tanks have a delay in response [2]. The majority of industrial process control applications have multiple input and output variables, which is referred to as a MIMO system. Heat exchangers, chemical reactors, and distillation columns are all examples of MIMO systems. Performing operations on a MIMO system is more difficult than on a SISO system. The interaction between the input and output variables is the reason for this [3]. A coupled tank system for liquid level control is a type of plant that is commonly found in commercial ventures, particularly in the chemical process industry. Nonlinearity exists in the coupled tank system. The reason for the non-linearity is that the transfer function changes as the height of the liquid in a tank changes, and the controller should be able to adapt to these changes. System dynamics and interacting nature are the issues with level control in coupled tank processes. As long as the inflow rate, i.e., the inlet and outlet flow rates, remain constant, the level will remain constant [4]. Loading is a common term used to describe interaction. If each input affects more than one output or if a change in one output affects the other outputs, the process is said to be interacting; otherwise, it is said to be non-interacting [5]. We must apply a new element called a Decoupler into the control system while designing two strongly interacting loops. Decouplers are used to cancel the interaction effects between two loops, resulting in two non-interacting control loops. To put it another way, the main goal of a decoupling control system is to eliminate complex loop interactions so that a change in one process variable does not result in corresponding changes in the other process variables [6]. The inlet flow rate, which is the variable used to bring the process variable to its set point, is the manipulated variable. Food processing, water purification systems, filtration, pharmaceutical industries, decoration, boilers, dairy, beverage, nuclear power generation plants, industrial chemical processing, spray coating, and other industrial applications all require liquid-level control. Typical actuators, such as electrical pumps and motorized valves, are widely used for feedback control, and many types of level sensors, such as displacement floats, pressure sensors, and so on, provide liquid level measurement [7]. This paper has made main contributions: ➢ To model coupled tank system dynamics using state space modeling technique and validate the model. ➢ To design a decoupling controller that can successfully decouple a TITO-coupled tank system. ➢ To design a fuzzy-PID controller/ to tune the parameters of the PID controller with FLC and implement it in the TITO system. ➢ To design a GA-PID controller. ➢ To control the desired level of tanks and regulate the flow rate with minimum time optimal operation and to compare the performance of the controllers. 2. Mathematical modeling of coupled tank system 2.1 Introduction The methodology involves two port block diagrams with two blocks: the plant and the controller. The diagram in Fig 1 includes reference inputs (R1 and R2), manipulated variables, controllers, tank systems, decoupler, and actual outputs. Simulink is used to analyze system performance and identify the controller. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 1. Block diagram of the overall system. https://doi.org/10.1371/journal.pone.0317600.g001 It is critical to understand the mathematics of how the coupled tank system behaves before beginning the controller design process. Nonlinearity in the dynamic model has been observed in this system. As shown in Fig 2 the control goal is to manipulate Qi1 and Qi2 liquid flows to regulate the liquid levels of H1 and H2 in the two tanks. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 2. Schematic diagram of coupled tank system. https://doi.org/10.1371/journal.pone.0317600.g002 The rate of change of fluid volume in each tank equals the net flow of fluid into the tank, according to a simple mass balance. As a result, the dynamic equation for Tank 1 and Tank 2 is as follows: ➢ Rate of change of volume in tanks = flow in–flow out (1) Since volume is (area x height): (2) Where; H1, and H2 are the heights of the fluid in tanks 1 and 2, respectively, A1 = cross-sectional area of tank 1 and A2 = cross-sectional area of tank 2, Qo3 = fluid flow rate between tanks Pump flow rates into tanks 1 and 2 are represented by Qi1 and Qi2, respectively, Qo1 and Qo2 are the fluid flow rates out of tank 1 and tank 2, respectively. A simple orifice can be used to model each outlet drain. The outlet flows in each tank are proportional to the square root of the head of liquid in the tank, according to Bernoulli’s equation for steady, non-viscous, incompressible fluids. The flow between the two tanks is proportional to the square root of the head differential in the same way. (3) Where β1,β2, and β3 are proportional constants that depend on the coefficients of discharge, the cross-sectional area of each orifice, and the gravitational constant. Substituting Eq (3) into Eq (2), a set of nonlinear state equations that describe the system dynamics of the coupled tank are derived. (4)(5) For a set of inflows Qi1 and Qi2 the fluid level in the tanks is at some steady state level H1 and H2. Consider a small variation in each inflow, q1 in Qi1 and q2 in Qi2. Let the resulting perturbation in level be h1 and h2 respectively. From Eqs (4) and (5), the equation becomes: For Tank 1: (6) For Tank 2: (7) Subtracting Eqs (4) and (5) from Eqs (6) and (7), the equations obtained are as follows: (8) (9) For small perturbations: (10) Therefore; (11) In Eqs (10) and (11), note that the coefficients of the perturbations in level are functions of the steady state operating points H1 and H2. Note that the two equations can also be written in the form: (12) (13) Where; qo1 and qo2 represent perturbations in the outflow at the drain pipes. This is appropriate in the case where the outflow is controlled by attaching an external clamp for instance. Each value of β1, β2, β3, A1, A2, H1, and H2 can be obtained from mathematical modeling equations as shown in Table 1. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 1. Parameter values [8]. https://doi.org/10.1371/journal.pone.0317600.t001 By using the Parameters value and Eqs (13) and (14), we can get the following equations in the form of manipulating variables q1, q2 and process variables h1, h2: (14) (15) Rearranging into state space representation as follows: (16) (17) Above Eqs (16) and (17) are the transfer function of coupled tank system in the form of state space matrices, where: = Derivative of state variable for tank 1 = Derivative of state variable for tank 2 h1 = State variable for tank 1 h2 = State variable for tank 2 q1 = Input variable for tank 1 q2 = Input variable for tank 2 y1 = Output variable for tank 1 y2 = Output variable for tank 2 From the above analysis, I have found state space matrix A, B, and C &Results in the following matrix transfer function: 2.2 Controllers theory and general facts 2.2.1 PID (Proportional-Integral-Derivative) controller. PID controllers are a popular choice in the process industry for their simplicity, rapid response, and ability to eliminate steady-state errors [9]. Their low cost and effectiveness in handling complex, nonlinear systems make them a versatile tool for industrial applications. PID controllers work by calculating and applying a corrective output to adjust the process, ensuring that the actual output matches the desired setpoint. The overall controller structure of PID is shown in Fig 3. This feedback mechanism helps maintain accurate and stable process control. (18)(19)(20) Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. PID (Proportional Integral Derivative) controller structure. https://doi.org/10.1371/journal.pone.0317600.g003 The proportional term P provides a control action based on the error signal, the integral term I produces steady-state errors, and the term "D-improving transient response. PID-Controller-PI-controller cannot predict future error behavior, so it reacts normally. The D-controller anticipates error behavior, increasing system response and stability. Combining these controllers improves response speed and compensates for phase lag caused by the I-controller. The individual effects of these three terms on the closed-loop performance are summarized in Table 2 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 2. Effects of P, I, and D individual controllers. https://doi.org/10.1371/journal.pone.0317600.t002 2.2.2 Fuzzy Logic Controller (FLC). Fuzzy logic controllers (FLCs) use fuzzy set theory to represent human operator experience in linguistic variables called fuzzy rules. Although this article was first published in 1965, the use of fuzzy logic (FL) increased after the second half of the 1970s when two more articles, in which the application of fuzzy set theory to uncertain systems and decision-making were described. FL applications have been gaining a high speed ever since the Japanese started using them in commercially available appliances. Nowadays, it is possible to find fuzzy-based applications in almost every area [10]. Fuzzy logic controllers (FLCs) based on fuzzy set theory are used to represent the experience and knowledge of a human operator in terms of linguistic variables called fuzzy rules. Since an experienced human operator adjusts the system inputs to get a desired output by just looking at the system output without any knowledge of the system’s dynamics and interior parameter variations, the implementation of linguistic fuzzy rules based on the procedures done by human operators does not also require a mathematical model of the system. 2.2.3 Fuzzy logic controller structures. Fig 4 below shows the general structure of the fuzzy interface system. Fuzzy logic control can play an important role because knowledge-based design rules can easily be implemented in systems with unknown structures. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 4. Fuzzy logic controller general structure. https://doi.org/10.1371/journal.pone.0317600.g004 2.3. Genetic algorithms Genetic Algorithm (GA) is an evolutionary computing technique that uses Darwin’s Theory of Evolution’s concept of ’Survival of the Fittest’ to find the global optimum solution for optimization problems. GA assumes unique solutions are described by parameters, with the fitness function reflecting the candidate’s goodness. The fittest chromosome produces high-quality offspring, resulting in a more solution [11]. Initialization of the GA parameters and flow chart is as shown in Fig 5: Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. Block diagram of GA/ flow chart of genetic algorithm. https://doi.org/10.1371/journal.pone.0317600.g005 2.1 Introduction The methodology involves two port block diagrams with two blocks: the plant and the controller. The diagram in Fig 1 includes reference inputs (R1 and R2), manipulated variables, controllers, tank systems, decoupler, and actual outputs. Simulink is used to analyze system performance and identify the controller. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 1. Block diagram of the overall system. https://doi.org/10.1371/journal.pone.0317600.g001 It is critical to understand the mathematics of how the coupled tank system behaves before beginning the controller design process. Nonlinearity in the dynamic model has been observed in this system. As shown in Fig 2 the control goal is to manipulate Qi1 and Qi2 liquid flows to regulate the liquid levels of H1 and H2 in the two tanks. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 2. Schematic diagram of coupled tank system. https://doi.org/10.1371/journal.pone.0317600.g002 The rate of change of fluid volume in each tank equals the net flow of fluid into the tank, according to a simple mass balance. As a result, the dynamic equation for Tank 1 and Tank 2 is as follows: ➢ Rate of change of volume in tanks = flow in–flow out (1) Since volume is (area x height): (2) Where; H1, and H2 are the heights of the fluid in tanks 1 and 2, respectively, A1 = cross-sectional area of tank 1 and A2 = cross-sectional area of tank 2, Qo3 = fluid flow rate between tanks Pump flow rates into tanks 1 and 2 are represented by Qi1 and Qi2, respectively, Qo1 and Qo2 are the fluid flow rates out of tank 1 and tank 2, respectively. A simple orifice can be used to model each outlet drain. The outlet flows in each tank are proportional to the square root of the head of liquid in the tank, according to Bernoulli’s equation for steady, non-viscous, incompressible fluids. The flow between the two tanks is proportional to the square root of the head differential in the same way. (3) Where β1,β2, and β3 are proportional constants that depend on the coefficients of discharge, the cross-sectional area of each orifice, and the gravitational constant. Substituting Eq (3) into Eq (2), a set of nonlinear state equations that describe the system dynamics of the coupled tank are derived. (4)(5) For a set of inflows Qi1 and Qi2 the fluid level in the tanks is at some steady state level H1 and H2. Consider a small variation in each inflow, q1 in Qi1 and q2 in Qi2. Let the resulting perturbation in level be h1 and h2 respectively. From Eqs (4) and (5), the equation becomes: For Tank 1: (6) For Tank 2: (7) Subtracting Eqs (4) and (5) from Eqs (6) and (7), the equations obtained are as follows: (8) (9) For small perturbations: (10) Therefore; (11) In Eqs (10) and (11), note that the coefficients of the perturbations in level are functions of the steady state operating points H1 and H2. Note that the two equations can also be written in the form: (12) (13) Where; qo1 and qo2 represent perturbations in the outflow at the drain pipes. This is appropriate in the case where the outflow is controlled by attaching an external clamp for instance. Each value of β1, β2, β3, A1, A2, H1, and H2 can be obtained from mathematical modeling equations as shown in Table 1. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 1. Parameter values [8]. https://doi.org/10.1371/journal.pone.0317600.t001 By using the Parameters value and Eqs (13) and (14), we can get the following equations in the form of manipulating variables q1, q2 and process variables h1, h2: (14) (15) Rearranging into state space representation as follows: (16) (17) Above Eqs (16) and (17) are the transfer function of coupled tank system in the form of state space matrices, where: = Derivative of state variable for tank 1 = Derivative of state variable for tank 2 h1 = State variable for tank 1 h2 = State variable for tank 2 q1 = Input variable for tank 1 q2 = Input variable for tank 2 y1 = Output variable for tank 1 y2 = Output variable for tank 2 From the above analysis, I have found state space matrix A, B, and C &Results in the following matrix transfer function: 2.2 Controllers theory and general facts 2.2.1 PID (Proportional-Integral-Derivative) controller. PID controllers are a popular choice in the process industry for their simplicity, rapid response, and ability to eliminate steady-state errors [9]. Their low cost and effectiveness in handling complex, nonlinear systems make them a versatile tool for industrial applications. PID controllers work by calculating and applying a corrective output to adjust the process, ensuring that the actual output matches the desired setpoint. The overall controller structure of PID is shown in Fig 3. This feedback mechanism helps maintain accurate and stable process control. (18)(19)(20) Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. PID (Proportional Integral Derivative) controller structure. https://doi.org/10.1371/journal.pone.0317600.g003 The proportional term P provides a control action based on the error signal, the integral term I produces steady-state errors, and the term "D-improving transient response. PID-Controller-PI-controller cannot predict future error behavior, so it reacts normally. The D-controller anticipates error behavior, increasing system response and stability. Combining these controllers improves response speed and compensates for phase lag caused by the I-controller. The individual effects of these three terms on the closed-loop performance are summarized in Table 2 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 2. Effects of P, I, and D individual controllers. https://doi.org/10.1371/journal.pone.0317600.t002 2.2.2 Fuzzy Logic Controller (FLC). Fuzzy logic controllers (FLCs) use fuzzy set theory to represent human operator experience in linguistic variables called fuzzy rules. Although this article was first published in 1965, the use of fuzzy logic (FL) increased after the second half of the 1970s when two more articles, in which the application of fuzzy set theory to uncertain systems and decision-making were described. FL applications have been gaining a high speed ever since the Japanese started using them in commercially available appliances. Nowadays, it is possible to find fuzzy-based applications in almost every area [10]. Fuzzy logic controllers (FLCs) based on fuzzy set theory are used to represent the experience and knowledge of a human operator in terms of linguistic variables called fuzzy rules. Since an experienced human operator adjusts the system inputs to get a desired output by just looking at the system output without any knowledge of the system’s dynamics and interior parameter variations, the implementation of linguistic fuzzy rules based on the procedures done by human operators does not also require a mathematical model of the system. 2.2.3 Fuzzy logic controller structures. Fig 4 below shows the general structure of the fuzzy interface system. Fuzzy logic control can play an important role because knowledge-based design rules can easily be implemented in systems with unknown structures. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 4. Fuzzy logic controller general structure. https://doi.org/10.1371/journal.pone.0317600.g004 2.2.1 PID (Proportional-Integral-Derivative) controller. PID controllers are a popular choice in the process industry for their simplicity, rapid response, and ability to eliminate steady-state errors [9]. Their low cost and effectiveness in handling complex, nonlinear systems make them a versatile tool for industrial applications. PID controllers work by calculating and applying a corrective output to adjust the process, ensuring that the actual output matches the desired setpoint. The overall controller structure of PID is shown in Fig 3. This feedback mechanism helps maintain accurate and stable process control. (18)(19)(20) Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. PID (Proportional Integral Derivative) controller structure. https://doi.org/10.1371/journal.pone.0317600.g003 The proportional term P provides a control action based on the error signal, the integral term I produces steady-state errors, and the term "D-improving transient response. PID-Controller-PI-controller cannot predict future error behavior, so it reacts normally. The D-controller anticipates error behavior, increasing system response and stability. Combining these controllers improves response speed and compensates for phase lag caused by the I-controller. The individual effects of these three terms on the closed-loop performance are summarized in Table 2 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 2. Effects of P, I, and D individual controllers. https://doi.org/10.1371/journal.pone.0317600.t002 2.2.2 Fuzzy Logic Controller (FLC). Fuzzy logic controllers (FLCs) use fuzzy set theory to represent human operator experience in linguistic variables called fuzzy rules. Although this article was first published in 1965, the use of fuzzy logic (FL) increased after the second half of the 1970s when two more articles, in which the application of fuzzy set theory to uncertain systems and decision-making were described. FL applications have been gaining a high speed ever since the Japanese started using them in commercially available appliances. Nowadays, it is possible to find fuzzy-based applications in almost every area [10]. Fuzzy logic controllers (FLCs) based on fuzzy set theory are used to represent the experience and knowledge of a human operator in terms of linguistic variables called fuzzy rules. Since an experienced human operator adjusts the system inputs to get a desired output by just looking at the system output without any knowledge of the system’s dynamics and interior parameter variations, the implementation of linguistic fuzzy rules based on the procedures done by human operators does not also require a mathematical model of the system. 2.2.3 Fuzzy logic controller structures. Fig 4 below shows the general structure of the fuzzy interface system. Fuzzy logic control can play an important role because knowledge-based design rules can easily be implemented in systems with unknown structures. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 4. Fuzzy logic controller general structure. https://doi.org/10.1371/journal.pone.0317600.g004 2.3. Genetic algorithms Genetic Algorithm (GA) is an evolutionary computing technique that uses Darwin’s Theory of Evolution’s concept of ’Survival of the Fittest’ to find the global optimum solution for optimization problems. GA assumes unique solutions are described by parameters, with the fitness function reflecting the candidate’s goodness. The fittest chromosome produces high-quality offspring, resulting in a more solution [11]. Initialization of the GA parameters and flow chart is as shown in Fig 5: Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. Block diagram of GA/ flow chart of genetic algorithm. https://doi.org/10.1371/journal.pone.0317600.g005 3. System design and simulation result 3.1. Introduction This part discusses controller designs, performance evaluation parameters, Simulink model simulations, and performance comparisons between conventional PID with FLC and GA with PID, using figures and performance specifications. 3.2. Design decoupler A decoupling control scheme minimizes interaction between controlled and manipulated variables by diagonalizing the system and decomposing input and output processes by two decentralized SISO controllers. This MIMO control is achieved through state measurement via a feedback law, allowing for better time response and traceability. the overall block diagram of the decoupler is shown in Fig 6. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. Decoupler block diagram. https://doi.org/10.1371/journal.pone.0317600.g006 Pre-compensators or pre-post compensators can be used to decouple multivariable systems, typically at a given frequency, ensuring good system performance at the frequency of decoupling. 3.2.1 Decoupling design technics (pre-compensator method). The pre-compensation approach employs three methods: dynamic decoupling, steady-state decoupling, and approximate decoupling, with the primary goal of decoupling the system. The resulting system W(s) G(s) is shaped “approximately-diagonal” transfer function Gs(s), by considering W(s) as the decoupler transfer function. This document utilizes dynamic decoupling. The overall pre-compensator arrangement is shown in Fig 7. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Pre-compensator arrangement. https://doi.org/10.1371/journal.pone.0317600.g007 Dynamic decoupling is a pre-compensator technique that uses the inverse of the system transfer function as a pre-compensator, decoupling the system over the entire frequency results in the following decoupler. Implies that; (21) Decouplers for designing over the Simulink model of the overall system we used the following; since dynamic decoupling is available for decoupling the plant. Therefore; the Decouplers are D11, D12, D21 and D22: (22) (23) (24) (25) In the control scheme of the Fig 8 given above, there are two feedback controllers Gc1 and Gc2, and four decoupling controllers D11, D12, D21, and D22. The Decouplers Dij, i, j = 1…2, have the role of cancelling the interaction effect from input j on the output i. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. Decoupling control scheme with 1-1/2-2 pairing. https://doi.org/10.1371/journal.pone.0317600.g008 3.2.2 Checking the possibility of controlling the system (using CN). Let’s first investigate the possibility of controlling the system using CN (condition number) at steady state operation before designing controllers (using MATLAB command). The transfer function at zero frequency is: (26) Using MATLAB command, first, insert the transfer function at zero frequency and then determine the singular values using the singular value decomposition (SVD) command and evaluating the condition‐number (CN): (27) This small condition number demonstrates that the system is in good condition implies possible to control the system. 3.3 Fuzzy Logic Controller (FLC) design and Genetic Algorithm (GA) 3.3.1 Fuzzy membership functions design. FL applications have been gaining a high speed ever since the Japanese started using them in commercially available appliances. Nowadays, it is possible to find fuzzy-based applications in almost every area [12]. Fuzzy logic systems are widely used for control, system identification, pattern recognition problems, and many more applications from industry to academia. The membership functions (MFs) play vital role in the overall performance of fuzzy representation. The MFs are the building blocks of fuzzy set theory, that is, fuzziness in a fuzzy set is determined by its MF. Accordingly, the shapes of MFs are important for a particular problem since they effect on a fuzzy inference system. They may have different shapes such as triangular, trapezoidal, Gaussian, and so forth. The only condition a MF must really satisfy is that it must vary between 0 and 1. The membership function is a graphical representation of the magnitude of participation of each input variable. The number 1 assigned to an element means that the element is in the set s, and 0 means that the element is definitely not in the set S. All other values mean a graduated membership of the set S. Membership functions representing fuzzy sets have different shapes, which are defined by certain types of mathematical formulas. The most used membership function types are triangular, trapezoid, bell, sinusoid, Gaussian. Cauchy and sigmoid. When using different MFs for a given problem, it has usually been found that triangular and Gaussian MFs have very good results, better than other types of MFs. The MFs can be of any shape and form as long as it maps the given data with desirable degree of memberships. As far as choice of MFs is concerned, it is us to decide. This is where fuzzy system offers individual degrees of freedom. With experience, one will come to know which shape of MF is good for the application under consideration. As there are infinite number of ways to characterize fuzziness, there are infinite number of ways to graphically depict the MFs that describe this fuzziness. The choice of which of the methods to use depends entirely on the problem size and problem type. Instead of choosing the shape of MF, setting the interval and number of MFs are also very important. For instance, to model a temperature coupled Tank control system by fuzzy logic, it is really important to know how many MFs are needed (e.g., Very Low, Low, Normal, High and Very High) MF and also choosing the intervals of MFs. These two factors also have a great impact on the outcome of a fuzzy logic system. In addition, looking at the distribution of the data is a good idea. Although, trial and error method are often used for MF shape, because there is no exact method for choosing the MFs. The shape of MFs depends on how one believes in a given linguistic variable. It is more a question of intuition then criteria. The only condition a MF must really satisfy is that it must vary between 0 and 1. The function itself can be an arbitrary curve whose shape we can define as a function that suits us from the point of view of simplicity, convenience, speed, and efficiency. Therefore, the type of MF does not play a crucial role in shaping how the model performs. However, the number of MF has greater influence as it determines the computational time. Hence, the optimum model can be determined by varying the type of MFs for achieving best system performance. The triangular function specifically as an integral transform kernel function from which more realistic signals can be derived, for example in kernel system estimation. Based on extensive review on many literatures, it can be concluded that the triangular MF is widely used because of its simplicity. Using various MF for given problems, usually triangular MFs are found to be closely performing well and better than other types of MF. There are many references giving directions of how to choose MF [13]. The basic problem with modelling a situation, is to break the 0–1 modelling. This can be done by using triangular MF. However, if the situation is complex and deep, we might need a special type of MF. For instance, if the problem at hand is a quantum mechanics problem, then a special MF is needed. In order to make the best choice, one needs a lot of “experience” with the given situation. This experience will tune up and best fit, the subjective choice of the researcher with the given reality. There is no objective way to do so. Thus, a high-fidelity intuition based on sufficient experience will give an acceptable answer. Generally speaking, triangular MF is one of the most encountered MF in practice. Of highly applied MFs, the triangular MFs are formed using straight lines. These straight-line membership functions have the advantage of simplicity to implement and fast for computation. Beside to all the above statements, it’s obvius that the selection criteria is depend on the researcher interest/ authors view of point to the model/system we conducted, due to this we are selected the triangular MF for our study. Fuzzy membership functions range from 0 to 1, with five values: very low (VL), low (L), normal (N), high (H), and very high (VH). Figs 9–11 show error input, change in input, and output functions for tank 1, and Figs 12–14 show error input, change in input, and output functions for tank 2 respectively. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Membership function of error E1 for tank 1. https://doi.org/10.1371/journal.pone.0317600.g009 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 10. Membership function of change in error ΔE1 for tank 1. https://doi.org/10.1371/journal.pone.0317600.g010 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 11. Membership function of output for tank 1. https://doi.org/10.1371/journal.pone.0317600.g011 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 12. Membership function of error E2 for tank 2. https://doi.org/10.1371/journal.pone.0317600.g012 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 13. Membership function of change in error (ΔE2) for tank 2. https://doi.org/10.1371/journal.pone.0317600.g013 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 14. Membership function of output for tank 2. https://doi.org/10.1371/journal.pone.0317600.g014 3.3.2 Fuzzy reasoning/rule base and inference mechanism design. The main idea of the rules is to bring a set point to its specified level point. Rule 1: If E is H and ΔE is VH then output is VH. This implies that if the flow rate is very high then the valve is close fast. Rule 2: If E is H and ΔE is H Then output is N. This implies that if flow is OK, and flow rate is OK then the valve need not be varied. These rules are employed for controlling the liquid level such as it is reached to its specified value depending on membership functions mentioned above. The overall result of the rule viewed and surface viewed from the set of rules for tank 1 and the result of the rule viewed and surface viewed from the set of rules for tank 2 is shown below in Figs 15–18 respectively. As shown in the Table 3 below. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 15. Rule viewed result from a set of rules for tank 1. https://doi.org/10.1371/journal.pone.0317600.g015 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 16. Surface viewed result from a set of rules for tank. https://doi.org/10.1371/journal.pone.0317600.g016 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 17. Rule viewed result from a set of rules for tank 2. https://doi.org/10.1371/journal.pone.0317600.g017 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 18. Surface viewed result from a set of rules for tank 2. https://doi.org/10.1371/journal.pone.0317600.g018 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 3. Rules employed for controlling the system. https://doi.org/10.1371/journal.pone.0317600.t003 3.3.3 Basic elements of GA (Genetic Algorithm). The tuning of the GA-PID involves 6 variables, 20 population sizes, and 30 maximum generations which are all initially randomized for simulation/in-tuning algorithm. In determining the population of the new GA generation, where the fittest chromosome has one copy directly in the new generation. By interfacing the Simulink model with the codded algorithm of GA, the system employed for this paperwork is discussed in the next content. 3.4 MATLAB Simulink model and simulation results Models for decoupling level and flow rate control of coupled tank systems are designed on the MATLAB/Simulink library. A plant model with FLC-PID and GA-PID controller is designed, and the result is verified. Fig 19 shown below is the MATLAB Simulink model and results for a decoupled system with an FLC- PID controller (Level response of the decoupled system for PID controller for tank1, H1, and tank2, H2). Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 19. Simulink model of the decoupled system FLC with PID controller. https://doi.org/10.1371/journal.pone.0317600.g019 3.4.1 Simulink model and simulation result for the decoupled Simulink model for FLC with PID controller. Figs 19 and 20 show that the Simulink model and the simulation result for the level of decoupled system for FLC with PID controller respectively; it has more results than the conventional PID controller. As the result tells us it has a fast rise time (118.101ms), short settling time (8.65 sec), and with no overshoot (-0.033%), undershoot (1.618%) for H1. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 20. Simulation result for level of decoupled system for FLC with PID controller. https://doi.org/10.1371/journal.pone.0317600.g020 3.4.2 Simulink model and simulation result for the decoupled Simulink model for FLC with PID controller with disturbance (robustness). As shown in Figs 21 and 22 Simulink model and simulation result of the FLC-PID controller tolerate disturbance (robust against disturbance) respectively. All the requirements of parameters for performance evaluation taken for FLC-PID without disturbance are the same with the presence of disturbance; like rise time (118.101ms), settling time (8.65sec), and with no overshoot (-0.033%)/undershoot (1.618%) for H1 as we see from the two response graphs. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 21. Simulink model of the decoupled system FLC—PID controller for robustness. https://doi.org/10.1371/journal.pone.0317600.g021 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 22. Simulation result for level of decoupled system for FLC with PID controller with disturbance. https://doi.org/10.1371/journal.pone.0317600.g022 3.4.3 Simulink model and simulation result for the decoupled Simulink model for GA with PID controller. Figs 23 and 24 show the Simulink model and the response graphs of decoupled level and flow rate control using GA with PID controller for TITO system respectively. As the result shown in Fig 24 it has a fast rise time (39.114ms), short settling time (8.50sec), and overshoot (-0.370%)/undershoots (1.604%) for H1 is proven. It tells GA-PID has got more results than the rest. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 23. Simulink model of the decoupled system GA with PID controller. https://doi.org/10.1371/journal.pone.0317600.g023 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 24. Simulation result of tank level H of the decoupled system GA with PID controller. https://doi.org/10.1371/journal.pone.0317600.g024 3.4.4 Simulink model and simulation result for the decoupled Simulink model for GA with PID controller with disturbance (robustness). Figs 25 and 26 show; that the GA-PID controller tolerates disturbance, which are the input disturbances (robust against disturbance) to some extent Simulink model and results respectively. The requirements of parameter for performance evaluation taken for GA-PID without disturbance is the same with the presence of disturbance for settling time which is (8.50 sec). However, rise time (39.167ms) and overshoot (-0.393%)/undershoot (1.721%) with the presence of disturbance for H1, whereas rise time (39.114ms) and overshoot (-0.370%)/undershoot (1.604%) for H1 is proven. Here there are slight differences in measurements taken for evaluating the performance of the system. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 25. Simulink model of the decoupled system GA with PID controller for robustness. https://doi.org/10.1371/journal.pone.0317600.g025 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 26. Simulation result of tank level H of the decoupled system GA -PID for robustness. https://doi.org/10.1371/journal.pone.0317600.g026 3.5 Time domain performance indices for a set of controllers Here in Table 4 shows below are time domain performance indices for a set of controllers that are taken for the sake of discussing the comparative study to ensure the objective of the paper stated above. Here the rise time, overshoot, and settling time are more important for the comparative study; while PID parameters are very vital for the control application. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 4. Time domain performance indices for a set of controllers. https://doi.org/10.1371/journal.pone.0317600.t004 3.6 Optimal control theory Optimal control theory deals with the problem of finding a control law for a given system such that a certain optimality criterion is achieved. It is an extension of the calculus of variations and is a mathematical optimization method for deriving control policies. The method is largely due to the work of Lev Pontryagin and Richard Bellman in the 1950s, after contributions to the calculus of variations by Edward J. McShane. Optimal control can be seen as a control strategy in control theory [13]. According to optimal control, the objective of minimum-time optimal operation is to minimize the time required to drive a system from its initial state to the final state or to drive the system to the required desired set point. J or performance function is: (28) For the GA-PID controller; the performance function J: For tank 1 and tank2 respectively: (29) For the Fuzzy-PID controller; the performance function J: For tank1 and tank2 respectively: (30) From this, we understand that the system with the GA-PID controller has the more optimal result or the minimum time optimal problem is more achieved for the GA-PID controller than the other controllers. 3.1. Introduction This part discusses controller designs, performance evaluation parameters, Simulink model simulations, and performance comparisons between conventional PID with FLC and GA with PID, using figures and performance specifications. 3.2. Design decoupler A decoupling control scheme minimizes interaction between controlled and manipulated variables by diagonalizing the system and decomposing input and output processes by two decentralized SISO controllers. This MIMO control is achieved through state measurement via a feedback law, allowing for better time response and traceability. the overall block diagram of the decoupler is shown in Fig 6. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. Decoupler block diagram. https://doi.org/10.1371/journal.pone.0317600.g006 Pre-compensators or pre-post compensators can be used to decouple multivariable systems, typically at a given frequency, ensuring good system performance at the frequency of decoupling. 3.2.1 Decoupling design technics (pre-compensator method). The pre-compensation approach employs three methods: dynamic decoupling, steady-state decoupling, and approximate decoupling, with the primary goal of decoupling the system. The resulting system W(s) G(s) is shaped “approximately-diagonal” transfer function Gs(s), by considering W(s) as the decoupler transfer function. This document utilizes dynamic decoupling. The overall pre-compensator arrangement is shown in Fig 7. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Pre-compensator arrangement. https://doi.org/10.1371/journal.pone.0317600.g007 Dynamic decoupling is a pre-compensator technique that uses the inverse of the system transfer function as a pre-compensator, decoupling the system over the entire frequency results in the following decoupler. Implies that; (21) Decouplers for designing over the Simulink model of the overall system we used the following; since dynamic decoupling is available for decoupling the plant. Therefore; the Decouplers are D11, D12, D21 and D22: (22) (23) (24) (25) In the control scheme of the Fig 8 given above, there are two feedback controllers Gc1 and Gc2, and four decoupling controllers D11, D12, D21, and D22. The Decouplers Dij, i, j = 1…2, have the role of cancelling the interaction effect from input j on the output i. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. Decoupling control scheme with 1-1/2-2 pairing. https://doi.org/10.1371/journal.pone.0317600.g008 3.2.2 Checking the possibility of controlling the system (using CN). Let’s first investigate the possibility of controlling the system using CN (condition number) at steady state operation before designing controllers (using MATLAB command). The transfer function at zero frequency is: (26) Using MATLAB command, first, insert the transfer function at zero frequency and then determine the singular values using the singular value decomposition (SVD) command and evaluating the condition‐number (CN): (27) This small condition number demonstrates that the system is in good condition implies possible to control the system. 3.2.1 Decoupling design technics (pre-compensator method). The pre-compensation approach employs three methods: dynamic decoupling, steady-state decoupling, and approximate decoupling, with the primary goal of decoupling the system. The resulting system W(s) G(s) is shaped “approximately-diagonal” transfer function Gs(s), by considering W(s) as the decoupler transfer function. This document utilizes dynamic decoupling. The overall pre-compensator arrangement is shown in Fig 7. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Pre-compensator arrangement. https://doi.org/10.1371/journal.pone.0317600.g007 Dynamic decoupling is a pre-compensator technique that uses the inverse of the system transfer function as a pre-compensator, decoupling the system over the entire frequency results in the following decoupler. Implies that; (21) Decouplers for designing over the Simulink model of the overall system we used the following; since dynamic decoupling is available for decoupling the plant. Therefore; the Decouplers are D11, D12, D21 and D22: (22) (23) (24) (25) In the control scheme of the Fig 8 given above, there are two feedback controllers Gc1 and Gc2, and four decoupling controllers D11, D12, D21, and D22. The Decouplers Dij, i, j = 1…2, have the role of cancelling the interaction effect from input j on the output i. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. Decoupling control scheme with 1-1/2-2 pairing. https://doi.org/10.1371/journal.pone.0317600.g008 3.2.2 Checking the possibility of controlling the system (using CN). Let’s first investigate the possibility of controlling the system using CN (condition number) at steady state operation before designing controllers (using MATLAB command). The transfer function at zero frequency is: (26) Using MATLAB command, first, insert the transfer function at zero frequency and then determine the singular values using the singular value decomposition (SVD) command and evaluating the condition‐number (CN): (27) This small condition number demonstrates that the system is in good condition implies possible to control the system. 3.3 Fuzzy Logic Controller (FLC) design and Genetic Algorithm (GA) 3.3.1 Fuzzy membership functions design. FL applications have been gaining a high speed ever since the Japanese started using them in commercially available appliances. Nowadays, it is possible to find fuzzy-based applications in almost every area [12]. Fuzzy logic systems are widely used for control, system identification, pattern recognition problems, and many more applications from industry to academia. The membership functions (MFs) play vital role in the overall performance of fuzzy representation. The MFs are the building blocks of fuzzy set theory, that is, fuzziness in a fuzzy set is determined by its MF. Accordingly, the shapes of MFs are important for a particular problem since they effect on a fuzzy inference system. They may have different shapes such as triangular, trapezoidal, Gaussian, and so forth. The only condition a MF must really satisfy is that it must vary between 0 and 1. The membership function is a graphical representation of the magnitude of participation of each input variable. The number 1 assigned to an element means that the element is in the set s, and 0 means that the element is definitely not in the set S. All other values mean a graduated membership of the set S. Membership functions representing fuzzy sets have different shapes, which are defined by certain types of mathematical formulas. The most used membership function types are triangular, trapezoid, bell, sinusoid, Gaussian. Cauchy and sigmoid. When using different MFs for a given problem, it has usually been found that triangular and Gaussian MFs have very good results, better than other types of MFs. The MFs can be of any shape and form as long as it maps the given data with desirable degree of memberships. As far as choice of MFs is concerned, it is us to decide. This is where fuzzy system offers individual degrees of freedom. With experience, one will come to know which shape of MF is good for the application under consideration. As there are infinite number of ways to characterize fuzziness, there are infinite number of ways to graphically depict the MFs that describe this fuzziness. The choice of which of the methods to use depends entirely on the problem size and problem type. Instead of choosing the shape of MF, setting the interval and number of MFs are also very important. For instance, to model a temperature coupled Tank control system by fuzzy logic, it is really important to know how many MFs are needed (e.g., Very Low, Low, Normal, High and Very High) MF and also choosing the intervals of MFs. These two factors also have a great impact on the outcome of a fuzzy logic system. In addition, looking at the distribution of the data is a good idea. Although, trial and error method are often used for MF shape, because there is no exact method for choosing the MFs. The shape of MFs depends on how one believes in a given linguistic variable. It is more a question of intuition then criteria. The only condition a MF must really satisfy is that it must vary between 0 and 1. The function itself can be an arbitrary curve whose shape we can define as a function that suits us from the point of view of simplicity, convenience, speed, and efficiency. Therefore, the type of MF does not play a crucial role in shaping how the model performs. However, the number of MF has greater influence as it determines the computational time. Hence, the optimum model can be determined by varying the type of MFs for achieving best system performance. The triangular function specifically as an integral transform kernel function from which more realistic signals can be derived, for example in kernel system estimation. Based on extensive review on many literatures, it can be concluded that the triangular MF is widely used because of its simplicity. Using various MF for given problems, usually triangular MFs are found to be closely performing well and better than other types of MF. There are many references giving directions of how to choose MF [13]. The basic problem with modelling a situation, is to break the 0–1 modelling. This can be done by using triangular MF. However, if the situation is complex and deep, we might need a special type of MF. For instance, if the problem at hand is a quantum mechanics problem, then a special MF is needed. In order to make the best choice, one needs a lot of “experience” with the given situation. This experience will tune up and best fit, the subjective choice of the researcher with the given reality. There is no objective way to do so. Thus, a high-fidelity intuition based on sufficient experience will give an acceptable answer. Generally speaking, triangular MF is one of the most encountered MF in practice. Of highly applied MFs, the triangular MFs are formed using straight lines. These straight-line membership functions have the advantage of simplicity to implement and fast for computation. Beside to all the above statements, it’s obvius that the selection criteria is depend on the researcher interest/ authors view of point to the model/system we conducted, due to this we are selected the triangular MF for our study. Fuzzy membership functions range from 0 to 1, with five values: very low (VL), low (L), normal (N), high (H), and very high (VH). Figs 9–11 show error input, change in input, and output functions for tank 1, and Figs 12–14 show error input, change in input, and output functions for tank 2 respectively. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Membership function of error E1 for tank 1. https://doi.org/10.1371/journal.pone.0317600.g009 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 10. Membership function of change in error ΔE1 for tank 1. https://doi.org/10.1371/journal.pone.0317600.g010 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 11. Membership function of output for tank 1. https://doi.org/10.1371/journal.pone.0317600.g011 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 12. Membership function of error E2 for tank 2. https://doi.org/10.1371/journal.pone.0317600.g012 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 13. Membership function of change in error (ΔE2) for tank 2. https://doi.org/10.1371/journal.pone.0317600.g013 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 14. Membership function of output for tank 2. https://doi.org/10.1371/journal.pone.0317600.g014 3.3.2 Fuzzy reasoning/rule base and inference mechanism design. The main idea of the rules is to bring a set point to its specified level point. Rule 1: If E is H and ΔE is VH then output is VH. This implies that if the flow rate is very high then the valve is close fast. Rule 2: If E is H and ΔE is H Then output is N. This implies that if flow is OK, and flow rate is OK then the valve need not be varied. These rules are employed for controlling the liquid level such as it is reached to its specified value depending on membership functions mentioned above. The overall result of the rule viewed and surface viewed from the set of rules for tank 1 and the result of the rule viewed and surface viewed from the set of rules for tank 2 is shown below in Figs 15–18 respectively. As shown in the Table 3 below. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 15. Rule viewed result from a set of rules for tank 1. https://doi.org/10.1371/journal.pone.0317600.g015 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 16. Surface viewed result from a set of rules for tank. https://doi.org/10.1371/journal.pone.0317600.g016 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 17. Rule viewed result from a set of rules for tank 2. https://doi.org/10.1371/journal.pone.0317600.g017 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 18. Surface viewed result from a set of rules for tank 2. https://doi.org/10.1371/journal.pone.0317600.g018 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 3. Rules employed for controlling the system. https://doi.org/10.1371/journal.pone.0317600.t003 3.3.3 Basic elements of GA (Genetic Algorithm). The tuning of the GA-PID involves 6 variables, 20 population sizes, and 30 maximum generations which are all initially randomized for simulation/in-tuning algorithm. In determining the population of the new GA generation, where the fittest chromosome has one copy directly in the new generation. By interfacing the Simulink model with the codded algorithm of GA, the system employed for this paperwork is discussed in the next content. 3.3.1 Fuzzy membership functions design. FL applications have been gaining a high speed ever since the Japanese started using them in commercially available appliances. Nowadays, it is possible to find fuzzy-based applications in almost every area [12]. Fuzzy logic systems are widely used for control, system identification, pattern recognition problems, and many more applications from industry to academia. The membership functions (MFs) play vital role in the overall performance of fuzzy representation. The MFs are the building blocks of fuzzy set theory, that is, fuzziness in a fuzzy set is determined by its MF. Accordingly, the shapes of MFs are important for a particular problem since they effect on a fuzzy inference system. They may have different shapes such as triangular, trapezoidal, Gaussian, and so forth. The only condition a MF must really satisfy is that it must vary between 0 and 1. The membership function is a graphical representation of the magnitude of participation of each input variable. The number 1 assigned to an element means that the element is in the set s, and 0 means that the element is definitely not in the set S. All other values mean a graduated membership of the set S. Membership functions representing fuzzy sets have different shapes, which are defined by certain types of mathematical formulas. The most used membership function types are triangular, trapezoid, bell, sinusoid, Gaussian. Cauchy and sigmoid. When using different MFs for a given problem, it has usually been found that triangular and Gaussian MFs have very good results, better than other types of MFs. The MFs can be of any shape and form as long as it maps the given data with desirable degree of memberships. As far as choice of MFs is concerned, it is us to decide. This is where fuzzy system offers individual degrees of freedom. With experience, one will come to know which shape of MF is good for the application under consideration. As there are infinite number of ways to characterize fuzziness, there are infinite number of ways to graphically depict the MFs that describe this fuzziness. The choice of which of the methods to use depends entirely on the problem size and problem type. Instead of choosing the shape of MF, setting the interval and number of MFs are also very important. For instance, to model a temperature coupled Tank control system by fuzzy logic, it is really important to know how many MFs are needed (e.g., Very Low, Low, Normal, High and Very High) MF and also choosing the intervals of MFs. These two factors also have a great impact on the outcome of a fuzzy logic system. In addition, looking at the distribution of the data is a good idea. Although, trial and error method are often used for MF shape, because there is no exact method for choosing the MFs. The shape of MFs depends on how one believes in a given linguistic variable. It is more a question of intuition then criteria. The only condition a MF must really satisfy is that it must vary between 0 and 1. The function itself can be an arbitrary curve whose shape we can define as a function that suits us from the point of view of simplicity, convenience, speed, and efficiency. Therefore, the type of MF does not play a crucial role in shaping how the model performs. However, the number of MF has greater influence as it determines the computational time. Hence, the optimum model can be determined by varying the type of MFs for achieving best system performance. The triangular function specifically as an integral transform kernel function from which more realistic signals can be derived, for example in kernel system estimation. Based on extensive review on many literatures, it can be concluded that the triangular MF is widely used because of its simplicity. Using various MF for given problems, usually triangular MFs are found to be closely performing well and better than other types of MF. There are many references giving directions of how to choose MF [13]. The basic problem with modelling a situation, is to break the 0–1 modelling. This can be done by using triangular MF. However, if the situation is complex and deep, we might need a special type of MF. For instance, if the problem at hand is a quantum mechanics problem, then a special MF is needed. In order to make the best choice, one needs a lot of “experience” with the given situation. This experience will tune up and best fit, the subjective choice of the researcher with the given reality. There is no objective way to do so. Thus, a high-fidelity intuition based on sufficient experience will give an acceptable answer. Generally speaking, triangular MF is one of the most encountered MF in practice. Of highly applied MFs, the triangular MFs are formed using straight lines. These straight-line membership functions have the advantage of simplicity to implement and fast for computation. Beside to all the above statements, it’s obvius that the selection criteria is depend on the researcher interest/ authors view of point to the model/system we conducted, due to this we are selected the triangular MF for our study. Fuzzy membership functions range from 0 to 1, with five values: very low (VL), low (L), normal (N), high (H), and very high (VH). Figs 9–11 show error input, change in input, and output functions for tank 1, and Figs 12–14 show error input, change in input, and output functions for tank 2 respectively. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Membership function of error E1 for tank 1. https://doi.org/10.1371/journal.pone.0317600.g009 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 10. Membership function of change in error ΔE1 for tank 1. https://doi.org/10.1371/journal.pone.0317600.g010 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 11. Membership function of output for tank 1. https://doi.org/10.1371/journal.pone.0317600.g011 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 12. Membership function of error E2 for tank 2. https://doi.org/10.1371/journal.pone.0317600.g012 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 13. Membership function of change in error (ΔE2) for tank 2. https://doi.org/10.1371/journal.pone.0317600.g013 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 14. Membership function of output for tank 2. https://doi.org/10.1371/journal.pone.0317600.g014 3.3.2 Fuzzy reasoning/rule base and inference mechanism design. The main idea of the rules is to bring a set point to its specified level point. Rule 1: If E is H and ΔE is VH then output is VH. This implies that if the flow rate is very high then the valve is close fast. Rule 2: If E is H and ΔE is H Then output is N. This implies that if flow is OK, and flow rate is OK then the valve need not be varied. These rules are employed for controlling the liquid level such as it is reached to its specified value depending on membership functions mentioned above. The overall result of the rule viewed and surface viewed from the set of rules for tank 1 and the result of the rule viewed and surface viewed from the set of rules for tank 2 is shown below in Figs 15–18 respectively. As shown in the Table 3 below. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 15. Rule viewed result from a set of rules for tank 1. https://doi.org/10.1371/journal.pone.0317600.g015 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 16. Surface viewed result from a set of rules for tank. https://doi.org/10.1371/journal.pone.0317600.g016 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 17. Rule viewed result from a set of rules for tank 2. https://doi.org/10.1371/journal.pone.0317600.g017 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 18. Surface viewed result from a set of rules for tank 2. https://doi.org/10.1371/journal.pone.0317600.g018 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 3. Rules employed for controlling the system. https://doi.org/10.1371/journal.pone.0317600.t003 3.3.3 Basic elements of GA (Genetic Algorithm). The tuning of the GA-PID involves 6 variables, 20 population sizes, and 30 maximum generations which are all initially randomized for simulation/in-tuning algorithm. In determining the population of the new GA generation, where the fittest chromosome has one copy directly in the new generation. By interfacing the Simulink model with the codded algorithm of GA, the system employed for this paperwork is discussed in the next content. 3.4 MATLAB Simulink model and simulation results Models for decoupling level and flow rate control of coupled tank systems are designed on the MATLAB/Simulink library. A plant model with FLC-PID and GA-PID controller is designed, and the result is verified. Fig 19 shown below is the MATLAB Simulink model and results for a decoupled system with an FLC- PID controller (Level response of the decoupled system for PID controller for tank1, H1, and tank2, H2). Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 19. Simulink model of the decoupled system FLC with PID controller. https://doi.org/10.1371/journal.pone.0317600.g019 3.4.1 Simulink model and simulation result for the decoupled Simulink model for FLC with PID controller. Figs 19 and 20 show that the Simulink model and the simulation result for the level of decoupled system for FLC with PID controller respectively; it has more results than the conventional PID controller. As the result tells us it has a fast rise time (118.101ms), short settling time (8.65 sec), and with no overshoot (-0.033%), undershoot (1.618%) for H1. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 20. Simulation result for level of decoupled system for FLC with PID controller. https://doi.org/10.1371/journal.pone.0317600.g020 3.4.2 Simulink model and simulation result for the decoupled Simulink model for FLC with PID controller with disturbance (robustness). As shown in Figs 21 and 22 Simulink model and simulation result of the FLC-PID controller tolerate disturbance (robust against disturbance) respectively. All the requirements of parameters for performance evaluation taken for FLC-PID without disturbance are the same with the presence of disturbance; like rise time (118.101ms), settling time (8.65sec), and with no overshoot (-0.033%)/undershoot (1.618%) for H1 as we see from the two response graphs. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 21. Simulink model of the decoupled system FLC—PID controller for robustness. https://doi.org/10.1371/journal.pone.0317600.g021 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 22. Simulation result for level of decoupled system for FLC with PID controller with disturbance. https://doi.org/10.1371/journal.pone.0317600.g022 3.4.3 Simulink model and simulation result for the decoupled Simulink model for GA with PID controller. Figs 23 and 24 show the Simulink model and the response graphs of decoupled level and flow rate control using GA with PID controller for TITO system respectively. As the result shown in Fig 24 it has a fast rise time (39.114ms), short settling time (8.50sec), and overshoot (-0.370%)/undershoots (1.604%) for H1 is proven. It tells GA-PID has got more results than the rest. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 23. Simulink model of the decoupled system GA with PID controller. https://doi.org/10.1371/journal.pone.0317600.g023 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 24. Simulation result of tank level H of the decoupled system GA with PID controller. https://doi.org/10.1371/journal.pone.0317600.g024 3.4.4 Simulink model and simulation result for the decoupled Simulink model for GA with PID controller with disturbance (robustness). Figs 25 and 26 show; that the GA-PID controller tolerates disturbance, which are the input disturbances (robust against disturbance) to some extent Simulink model and results respectively. The requirements of parameter for performance evaluation taken for GA-PID without disturbance is the same with the presence of disturbance for settling time which is (8.50 sec). However, rise time (39.167ms) and overshoot (-0.393%)/undershoot (1.721%) with the presence of disturbance for H1, whereas rise time (39.114ms) and overshoot (-0.370%)/undershoot (1.604%) for H1 is proven. Here there are slight differences in measurements taken for evaluating the performance of the system. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 25. Simulink model of the decoupled system GA with PID controller for robustness. https://doi.org/10.1371/journal.pone.0317600.g025 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 26. Simulation result of tank level H of the decoupled system GA -PID for robustness. https://doi.org/10.1371/journal.pone.0317600.g026 3.4.1 Simulink model and simulation result for the decoupled Simulink model for FLC with PID controller. Figs 19 and 20 show that the Simulink model and the simulation result for the level of decoupled system for FLC with PID controller respectively; it has more results than the conventional PID controller. As the result tells us it has a fast rise time (118.101ms), short settling time (8.65 sec), and with no overshoot (-0.033%), undershoot (1.618%) for H1. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 20. Simulation result for level of decoupled system for FLC with PID controller. https://doi.org/10.1371/journal.pone.0317600.g020 3.4.2 Simulink model and simulation result for the decoupled Simulink model for FLC with PID controller with disturbance (robustness). As shown in Figs 21 and 22 Simulink model and simulation result of the FLC-PID controller tolerate disturbance (robust against disturbance) respectively. All the requirements of parameters for performance evaluation taken for FLC-PID without disturbance are the same with the presence of disturbance; like rise time (118.101ms), settling time (8.65sec), and with no overshoot (-0.033%)/undershoot (1.618%) for H1 as we see from the two response graphs. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 21. Simulink model of the decoupled system FLC—PID controller for robustness. https://doi.org/10.1371/journal.pone.0317600.g021 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 22. Simulation result for level of decoupled system for FLC with PID controller with disturbance. https://doi.org/10.1371/journal.pone.0317600.g022 3.4.3 Simulink model and simulation result for the decoupled Simulink model for GA with PID controller. Figs 23 and 24 show the Simulink model and the response graphs of decoupled level and flow rate control using GA with PID controller for TITO system respectively. As the result shown in Fig 24 it has a fast rise time (39.114ms), short settling time (8.50sec), and overshoot (-0.370%)/undershoots (1.604%) for H1 is proven. It tells GA-PID has got more results than the rest. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 23. Simulink model of the decoupled system GA with PID controller. https://doi.org/10.1371/journal.pone.0317600.g023 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 24. Simulation result of tank level H of the decoupled system GA with PID controller. https://doi.org/10.1371/journal.pone.0317600.g024 3.4.4 Simulink model and simulation result for the decoupled Simulink model for GA with PID controller with disturbance (robustness). Figs 25 and 26 show; that the GA-PID controller tolerates disturbance, which are the input disturbances (robust against disturbance) to some extent Simulink model and results respectively. The requirements of parameter for performance evaluation taken for GA-PID without disturbance is the same with the presence of disturbance for settling time which is (8.50 sec). However, rise time (39.167ms) and overshoot (-0.393%)/undershoot (1.721%) with the presence of disturbance for H1, whereas rise time (39.114ms) and overshoot (-0.370%)/undershoot (1.604%) for H1 is proven. Here there are slight differences in measurements taken for evaluating the performance of the system. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 25. Simulink model of the decoupled system GA with PID controller for robustness. https://doi.org/10.1371/journal.pone.0317600.g025 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 26. Simulation result of tank level H of the decoupled system GA -PID for robustness. https://doi.org/10.1371/journal.pone.0317600.g026 3.5 Time domain performance indices for a set of controllers Here in Table 4 shows below are time domain performance indices for a set of controllers that are taken for the sake of discussing the comparative study to ensure the objective of the paper stated above. Here the rise time, overshoot, and settling time are more important for the comparative study; while PID parameters are very vital for the control application. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 4. Time domain performance indices for a set of controllers. https://doi.org/10.1371/journal.pone.0317600.t004 3.6 Optimal control theory Optimal control theory deals with the problem of finding a control law for a given system such that a certain optimality criterion is achieved. It is an extension of the calculus of variations and is a mathematical optimization method for deriving control policies. The method is largely due to the work of Lev Pontryagin and Richard Bellman in the 1950s, after contributions to the calculus of variations by Edward J. McShane. Optimal control can be seen as a control strategy in control theory [13]. According to optimal control, the objective of minimum-time optimal operation is to minimize the time required to drive a system from its initial state to the final state or to drive the system to the required desired set point. J or performance function is: (28) For the GA-PID controller; the performance function J: For tank 1 and tank2 respectively: (29) For the Fuzzy-PID controller; the performance function J: For tank1 and tank2 respectively: (30) From this, we understand that the system with the GA-PID controller has the more optimal result or the minimum time optimal problem is more achieved for the GA-PID controller than the other controllers. 4. Conclusion and recommendation for future works 4.1 conclusions In this paper, a comparative study of two different controllers is done for controlling liquid levels and flow rates in the coupled tank system. The coupling system is a non-linear process. It can’t be controlled by a single controller. Hence two controllers are designed for each tank. To minimize the interactions, decouplers and controllers are also designed. Here, a comparative study of different Conventional with Intelligent Controller; FLC with PID, and GA with PID controllers are studied. Numerical simulation indicates that the FLC with PID controller has more advantages than the GA with PID controller. Performance analyses of FLC with PID and GA with PID controllers have been done. The result/performance in the two radical controllers, which is based on the transient and steady-state specifications, shows that the GA with PID controllers reduces undershoot but greater overshoot, lowers the rise time, settling time, and peak time and provides minimum time optimal operation when compared to FLC with PID controllers. However, GA with PID has a greater overshoot than FLC with PID; small overshoot with a small settling time and rise time; in GA with PID controllers, the external disturbance tolerance capability of the proposed scheme is proved for given step inputs, meaning robustness against external disturbance has slight difference and FLC-PID has perfectly achieved the robustness. So, it is observed that FLC with a PID-based model gives a more performance to GA with PID controllers of the system as mentioned in the simulation result above because robustness is more important than time performance. 4.2 Recommendation for future works In the future, recommended that the nonlinear model be realized within the real plant Distributed Control System (DCS) to act as an observer of the process. Real-time systems can be implemented to get more accurate results by first evaluating experimental tests. From a practical perspective, the proposed strategy can be integrated with the existing controller (FLC with PID), without any modifications. For this matter, recommend using a solenoid valve at the coupling point. Hence, Process control of large industrial plants has evolved through many stages. Initially, control would be from panels local to the process plant. However this required a large amount of human oversight to attend to these dispersed panels, and there was no overall view of the process. The next logical development was the transmission of all plant measurements to a permanently-staffed central control room. Effectively this was the centralisation of all the localised panels, with the advantages of lower manning levels and easier overview of the process. Often the controllers were behind the control room panels, and all automatic and manual control outputs were transmitted back to plant. However, whilst providing a central control focus, this arrangement was inflexible as each control loop had its own controller hardware, and continual operator movement within the control room was required to view different parts of the process. With the coming of electronic processors and graphic displays it became possible to replace these discrete controllers with computer-based algorithms, hosted on a network of input/output racks with their own control processors. These could be distributed around plant, and communicate with the graphic display in the control room or rooms. The introduction of DCSs to this existing system allows easy interconnection and re-configuration of plant controls and easy interfacing with other production computer systems. It enabled sophisticated alarm handling, introduced automatic event logging, removed the need for physical records such as chart recorders, allowed the control racks to be networked and thereby located locally to plant to reduce cabling runs, and provided high level overviews of plant status and production levels. A distributed control system (DCS) is a computerized control system for a process or plant usually with many control loops, in which autonomous controllers are distributed throughout the system, but there is no central operator supervisory control. The DCS concept increases reliability and reduces installation costs by localizing control functions near the process plant, with remote monitoring and supervision. 4.1 conclusions In this paper, a comparative study of two different controllers is done for controlling liquid levels and flow rates in the coupled tank system. The coupling system is a non-linear process. It can’t be controlled by a single controller. Hence two controllers are designed for each tank. To minimize the interactions, decouplers and controllers are also designed. Here, a comparative study of different Conventional with Intelligent Controller; FLC with PID, and GA with PID controllers are studied. Numerical simulation indicates that the FLC with PID controller has more advantages than the GA with PID controller. Performance analyses of FLC with PID and GA with PID controllers have been done. The result/performance in the two radical controllers, which is based on the transient and steady-state specifications, shows that the GA with PID controllers reduces undershoot but greater overshoot, lowers the rise time, settling time, and peak time and provides minimum time optimal operation when compared to FLC with PID controllers. However, GA with PID has a greater overshoot than FLC with PID; small overshoot with a small settling time and rise time; in GA with PID controllers, the external disturbance tolerance capability of the proposed scheme is proved for given step inputs, meaning robustness against external disturbance has slight difference and FLC-PID has perfectly achieved the robustness. So, it is observed that FLC with a PID-based model gives a more performance to GA with PID controllers of the system as mentioned in the simulation result above because robustness is more important than time performance. 4.2 Recommendation for future works In the future, recommended that the nonlinear model be realized within the real plant Distributed Control System (DCS) to act as an observer of the process. Real-time systems can be implemented to get more accurate results by first evaluating experimental tests. From a practical perspective, the proposed strategy can be integrated with the existing controller (FLC with PID), without any modifications. For this matter, recommend using a solenoid valve at the coupling point. Hence, Process control of large industrial plants has evolved through many stages. Initially, control would be from panels local to the process plant. However this required a large amount of human oversight to attend to these dispersed panels, and there was no overall view of the process. The next logical development was the transmission of all plant measurements to a permanently-staffed central control room. Effectively this was the centralisation of all the localised panels, with the advantages of lower manning levels and easier overview of the process. Often the controllers were behind the control room panels, and all automatic and manual control outputs were transmitted back to plant. However, whilst providing a central control focus, this arrangement was inflexible as each control loop had its own controller hardware, and continual operator movement within the control room was required to view different parts of the process. With the coming of electronic processors and graphic displays it became possible to replace these discrete controllers with computer-based algorithms, hosted on a network of input/output racks with their own control processors. These could be distributed around plant, and communicate with the graphic display in the control room or rooms. The introduction of DCSs to this existing system allows easy interconnection and re-configuration of plant controls and easy interfacing with other production computer systems. It enabled sophisticated alarm handling, introduced automatic event logging, removed the need for physical records such as chart recorders, allowed the control racks to be networked and thereby located locally to plant to reduce cabling runs, and provided high level overviews of plant status and production levels. A distributed control system (DCS) is a computerized control system for a process or plant usually with many control loops, in which autonomous controllers are distributed throughout the system, but there is no central operator supervisory control. The DCS concept increases reliability and reduces installation costs by localizing control functions near the process plant, with remote monitoring and supervision. Supporting information S1 File. https://doi.org/10.1371/journal.pone.0317600.s001 (DOCX) TI - Decoupled level and flow rate control of a two-tank system in beverage production: A comparative analysis of Fuzzy-PID and GA-PID for minimum time operation JF - PLoS ONE DO - 10.1371/journal.pone.0317600 DA - 2025-02-05 UR - https://www.deepdyve.com/lp/public-library-of-science-plos-journal/decoupled-level-and-flow-rate-control-of-a-two-tank-system-in-beverage-hs3ch0JX0l SP - e0317600 VL - 20 IS - 2 DP - DeepDyve ER -