Next Article in Journal
Toward Secure and Resilient Networks: A Zero-Trust Security Framework with Quantum Fingerprinting for Devices Accessing Network
Next Article in Special Issue
Modelling Fractional Advection–Diffusion Processes via the Adomian Decomposition
Previous Article in Journal
Counting Traversing Hamiltonian Cycles in Tiled Graphs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Experimental Validation of Fractional PID Controllers Applied to a Two-Tank System

by
Felipe de J. Sorcia-Vázquez
1,
Jesse Y. Rumbo-Morales
1,
Jorge A. Brizuela-Mendoza
2,
Gerardo Ortiz-Torres
1,
Estela Sarmiento-Bustos
3,*,
Alan F. Pérez-Vidal
1,
Erasmo M. Rentería-Vargas
1,
Miguel De-la-Torre
1 and
René Osorio-Sánchez
1
1
Computer Science and Engineering Department, University of Guadalajara, Ameca 46600, Mexico
2
Exact Sciences and Methodologies Department, University of Guadalajara, Ciudad Guzmán 49000, Mexico
3
Academic Division of Industrial Mechanics, Emiliano Zapata Technological University of the State of Morelos, Emiliano Zapata 62760, Mexico
*
Author to whom correspondence should be addressed.
Mathematics 2023, 11(12), 2651; https://doi.org/10.3390/math11122651
Submission received: 19 April 2023 / Revised: 30 May 2023 / Accepted: 7 June 2023 / Published: 10 June 2023
(This article belongs to the Special Issue Fractional Modeling, Control, Analysis and Applications)

Abstract

:
An experimental validation of fractional-order PID (FOPID) controllers, which were applied to a two coupled tanks system, is presented in this article. Two FOPID controllers, a continuous FOPID (cFOPID) and a discrete FOPID (dFOPID), were implemented in real-time. The gains tuning process was accomplished by applying genetic algorithms while considering the cost function with respect to the tracking error and control effort. The gains optimization process was performed directly to the two-tanks non-linear model. The real-time implementation used a National Instruments PCIe-6321 card as a data acquisition system; for the interface, we used a Simulink Matlab and Simulink Desktop Real-Time Toolbox. The performance of the fractional controllers was compared with the performance of classical PID controllers.

1. Introduction

The research community has deeply studied the classical PID controller. These controllers have been applied to industrial processes, electromechanical systems, electric and electronic systems, and aeronautical and aerospace systems. The PID controller’s success is focused on its simplicity and robustness. One important characteristic of this controller is that the integral term offers robustness against disturbances and parameter uncertainty. Several tuning methods are applied to these controllers, e.g., root locus, frequency, or graphical methods, which are relatively easy to implement. These facts make the controller attractive for implementing the regulation of almost any system or process. A weak characteristic of PID controllers is related to the derivative term. This term is sensitive to the noise originating that the resulting control signal is noisy. This fact negatively affects the performance of the closed-loop system. Different proposals of PID structures have been developed in place of classical PIDs, such as fuzzy PID controllers [1,2], adaptive PID controllers [3,4], sliding mode PID controllers [5,6], intelligent PID controllers [7,8], and generalized PI and PID controllers [9,10,11]. All of these developments try to improve the performance of classical PIDs and give better characteristics that classical PIDs lack.
Another variation of the classical PID controller is the fractional-order PID controller (FOPID). This variation is based on fractional calculus. During the last decades, fractional calculus has been the focus of automatic control researchers. Fractional calculus has been applied to modeling systems that have fractional-order differential equations. At first, models were developed based on fractional order equations for mechanical [12,13] and electrical systems [14,15]. Later, the first continuous FOPID (cFOPID) controller was introduced by Podlubny in 1999 [16]. This controller has two additional parameters compared with classical PIDs. These parameters are the constants of the fractional-order integral and fractional-order derivative. This new characteristic added to the classical PID generates a more flexible controller and provides the opportunity to better adjust the dynamical properties of the closed-loop system [16]. After this first development, the use of the FOPID controller to regulate different types of systems increased. Examples of the applications in engineering systems that are regulated by FOPIDs are: smart reactors [17], electronic power converters [18,19,20], rehabilitation systems [21]; automatic voltage regulators [22,23], industrial process models [24,25], robotic systems [26], power systems using synchronous generators [27], and wind turbines [28].
The gains-tuning process is essential in the implementation of FOPIDs for regulating dynamic systems, which is a challenging aspect. This process can be manually facilitated, but the performance of the closed-loop system could be better. Different methods for tuning FOPID controllers have been developed to solve this problem, e.g., rule-based, analytical, and numerical methods [29]. We focus on numerical methods, specifically evolutionary algorithms. An evolutionary algorithm is an optimization algorithm that is inspired by a natural, biological, or physical phenomenon. Among the evolutionary algorithms, genetic algorithms (GAs) and their improvements have been an attractive solution used to tune fractional-order PID controllers. In order to start the optimization process, it is necessary to establish a suitable objective function. Many popular objective functions have been defined and used for tracking error minimizations, such as the integral squared error (ISE), integral of the time-weighted squared error (ITSE), integral absolute error (IAE), and integral time-weighted absolute error (ITAE) indices [27], with the aim of obtaining the minimum value of these functions. In [30], the authors used a GA to tune the fractional factors of a cFOPID while considering the ISE index as the objective function and setting the fractional order bound as ranging from 0 to 100. A third-order continuous transfer function was utilized as a controlled system. The results showed that the cFOPID controller can regulate the system, even if the fractional factor values exceed the general bound for these two parameters [29]. In [31], the authors implemented a simulation of a cFOPID controller with a three-DOF robot system that is driven by DC motors. In this work, the objective function considered the overshoot, settling time, and IAE index. The optimization was performed to find all FOPID parameters, and the simulation results show that GAs can find optimal values for all FOPID parameters. In [32], the authors discussed the control of a CD motor fed by a buck–boost converter using a cFOPID, and its performance was compared with the classical PID controller; in this work, the controller was tuned by applying a GA, and the tuning process was conducted while considering three different cost functions: the ISE, ITSE, and mean square error (MSE). The results obtained show that, for this study case, the ISE function achieved the best performance for the cFOPID. In [33], the authors addressed the tuning of a cFOPID device using GAs and particle swarm optimization for a two-DOF robot trajectory control. The authors used three different cost functions during the tuning process: the root mean squared error (MRSE), mean absolute error (MAE), and mean minimum fuel and absolute error (MMFAE). Each cost function is used individually to obtain the optimal values of both controllers. The results show that the MRSE cost function provides the best controller parameters with the lowest fitness values. In [34], the authors addressed the application of a multi-objective genetic algorithm (MOGA) fractional-order PID controller for semi-active magnetorheological damped seat suspension. The authors selected the gain crossover frequency and phase margin for the optimization problem of the FOPID controller as objective functions. The simulations performed show that cFOPID offers superior performance over the integer controllers. An improvement of GAs called multi-objective evolutionary non-dominated sorting genetic algorithm II (NSGAII), which is used to tune a cFOPID, was applied to a hydraulic turbine and addressed in [35]. The performance of the cFOPID was compared with the performance of a PID. The authors considered two objective functions for optimizing the controller parameters in the system: the ISE as the cost function one and ITSE as cost function two. The results show that the NSGAII algorithm is an efficient algorithm for tuning a cFOPID. In [36], the authors implemented a novel optimization algorithm called cloud-model-based quantum genetic algorithm (CQGA) to tune a cFOPID to control the motion of an autonomous underwater vehicle (AUV) in real time, and the authors considered the linear transfer functions of the AUV dynamics. CQGA is a fusion of cloud-model theory and the quantum genetic algorithm (QGA). The QGA algorithm is based on the principles and concepts of quantum computing. The authors adopted the ITAE as the objective function. The results show that the cFOPID performs the best for the heading control, diving control, and path-following systems compared with a classical PID. The authors established the limits of the fractional order factors as λ , μ ( 0 , 1 ) , but their optimization result shows values of λ and μ out of this interval. The authors in [37] constructed the design of a cFOPID device tuned using GAs for a conical tank and compared its performance with a PID device. From the nonlinear model of the tank, the authors analyzed the dynamical response in an open-loop system at different operating points. After this process, a linear transfer function at the height of 40 cm was selected to perform the tuning process of the cFOPID. The ITAE was chosen as the objective function. The cFOPID achieved the best transient response and performance at the operation point of 40 cm compared with the results obtained by applying the PID. In [38], the authors presented the application of a robust queen bee assisted genetic algorithm (QBGA) for tuning a cFOPID to control a boost converter with a non-minimum phase behavior. The authors selected the ISE as the objective function to minimize. The tests performed show that the cFOPID performs better than two PID controllers that were tuned based on the transient response and ISE using the QBGA. The robustness of the controllers of the closed-loop system was tested by applying parameter variations to the model. The results show that the cFOPID has better robustness than the PID controllers.
From a general point of view, the FOPID tuning process using GAs employs objective cost functions depending on the tracking error (e.g., ISE, ITAE, and ITSE) and simplified linear models of the system under control. This motivated our study to explore the behavior of GAs by using a cost function that incorporates the weighted quadratic error and control effort, as well as the nonlinear system model, to perform the optimization process. Considering the control input in the cost function allows us to penalize large control inputs, which improves the dynamic performance [39]. In this research work, we present the study of the performance of cFOPID and dFOPID controllers in real time. The performance of the FOPID controllers was compared with the performance of continuous and discrete classical PID controllers, which were also tuned using GAs. The work contribution is summarized as follows:
  • The tuning process of the FOPID using GAs that considers an objective function including the weighted quadratic error and control effort;
  • An offline simulation for the optimization process that uses the nonlinear model of the system for control;
  • The experimental results demonstrate that the proposed controllers’ optimization results are adequate for testing the FOPIDs tuned using a GA and the cost function defined by Equation (19) in real time.
The remaining sections of the paper are arranged in the following order: Section 2 shows the two-tank system model and includes the experimental validation of the proposed model. Section 3 presents the structures of the fractional and classical PID controllers that were implemented in this work. Section 4 provides the results of the controllers applied in the two-tank system in real time. Additionally, this section provides a discussion of these results. Finally, Section 5 presents the conclusions of this work.

2. Two-Tanks System

2.1. Two-Tank Description

Academic and research studies have frequently used tank systems to test controller structures. The tank system is a modular process that can be easily configured or modified. Coupled tank systems can be found in arrangements of two [40], three [41], four [42], or more tanks; this is an attractive feature of tank systems. The system used to test the FOPID controllers consisted of a two-coupled tank system. Two cylindrical tanks conformed to the system, one over the other. Figure 1 shows the physical setup of the two tanks. The system had the following hardware implemented:
  • Two ultrasonic sensors to measure the levels of each tank;
  • A direct current pump that supplied water flow to fill the tank system;
  • A PCIe-6321 Data Acquisition (DAQ) unit;
  • A host PC to implement the controllers in real time.
Figure 1. Two-tank system.
Figure 1. Two-tank system.
Mathematics 11 02651 g001
The conical bottom section of the two tanks was eliminated using cones created by a 3D printer, which allowed us to measure the tank levels from the top of these conical sections.

2.2. Two-Tank Model System

Figure 2 depicts the two-tank system scheme. The system consists of a water reservoir where a pump draws the water to fill the tanks and two ultrasonic sensors measure levels h 1 and h 2 . The pump flow fills tank 1, and tank 1’s outlet flow supplies tank 2.
The dynamic model for the two tanks’ liquid levels is derived as follows. The time rate of change of the volume in each tank is described by
d V i ( t ) d t = F i , i n ( t ) F i , o u t ( t ) , i = 1 , 2 ,
where V i ( t ) is the volume of the tank and F i , i n ( t ) and F i , o u t ( t ) are the inlet and outlet flow for the i-th tank, respectively. Equation (1) can be expressed in terms of the liquid level, considering the tank volume as V i ( t ) = A i h i ( t ) :
d h i ( t ) d t = 1 A i F i , i n ( t ) F i , o u t ( t ) , i = 1 , 2 ,
where A i denotes the cross-sectional area of the i-th tank. The inlet flow in tank 1 is defined by
F 1 , i n = K f u ( t ) ,
where K f is the pump constant (cm3/sV) and u ( t ) is the voltage applied to the pump. The outlet flow in each tank is modeled using Bernoulli’s law, which describes the outlet flow velocity of tanks with small orifices. This velocity is defined as
v i , o u t = 2 g h i ( t ) i = 1 , 2 ,
Therefore, the outlet flow rate for each tank, considering the cross-sectional area of the outlet orifice, is described by
F i , o u t = a i 2 g h i ( t ) i = 1 , 2 ,
where a i is the cross-sectional area of the outlet flow orifice in each tank and g is the gravitational acceleration. Finally, from Figure 2, the inlet flow to tank 2 is the outlet flow of tank 1,
F 1 , o u t = F 2 , i n ,
From this consideration, the two-tank model system can be derived from Equation (2), (3), (5), and (6) as follows
d h 1 ( t ) d t = a 1 A 1 2 g h 1 ( t ) + K f A 1 u ( t ) , d h 2 ( t ) d t = a 1 A 2 2 g h 1 ( t ) a 2 A 2 2 g h 2 ( t ) .
Figure 2. Two-tank system scheme.
Figure 2. Two-tank system scheme.
Mathematics 11 02651 g002

2.3. Experimental Validation of the Two-Tank System Model

An essential step in designing controller schemes and implementing them in real time is the model validation of the plant wanting to be controlled. The model validation was performed by simulating Equation (7) and using the parameters shown in Table 1. During the test, a fixed voltage input of u ( t ) = 0.5 was applied to the pump. Under this same condition, the physical tank system was exited to capture its dynamic. It is relevant to establish that the pump’s input voltage is normalized in the following interval: u ( t ) [ 0 1 ] .
Figure 3 depicts the validation of the dynamics of the tank levels. The bottom graph shows the dynamic of level h 2 , and the top graph shows the dynamic of level h 1 . It can be seen in this figure that at the beginning of the level evolutions, the model cannot reproduce the dynamics of the tank. This issue originated from a turbulent flow in the tank’s outlets when the water began entering each tank. After that, the outlet flow in each tank becomes a laminar flow, and the model can reproduce the tank’s dynamics better. With this result, it is considered that the two-tank model, which is represented by Equation (7), can reproduce the dynamics of the physical two-tank system.
Table 1 shows the final values reached for each tank.

3. PID Control Structures Applied to the Two-Tank System

3.1. Continuous Fractional PID Controller

Fractional-order Systems are based on the generalized non-integer order fundamental operator
a D t α = d α d t α , α > 0 , 1 , α = 0 . a t ( d t ) α , α < 0 ,
where a and t are the limits of the operation. In general, it is assumed that α R , but it may also be a complex number. Several definitions of the integro-differential operator have been developed. The application of the cFOPID considers the Grünwald–Letnikov definition because of its applicability to the numerical evaluation of fractional-order derivatives
a D t α f ( t ) = lim h 0 1 h α j = 0 k ( 1 ) j α j f ( t j h ) ,
where a = 0 , t = k h , k is the number of computation steps, and h is the step size. Considering zero initial conditions, the Laplace transform of the α -order derivative is given by
0 e s t 0 D t α f ( t ) d t = s α F ( s ) ,
in this case, α R + , and s is the usual Laplace variable.
The generalized cFOPID controller, which was proposed by Podlubny in 1999 [16], is called PI λ D μ . This controller has an integrator with order λ and a differentiator with order μ . The cFOPID controller has the following time domain equation
u c ( t ) = K p e ( t ) + K i D λ e ( t ) + K d D μ e ( t ) ,
where D λ e ( t ) and D μ e ( t ) represent the fractional-order integral and fractional-order derivative, respectively. Applying the Laplace transform to Equation (11), the general cFOPID controller transfer function takes the form
u c ( s ) e ( s ) = K p + K i s λ + K d s μ .
If the fractional order constants are λ = μ = 1 , the result is the classical PID controller. Figure 4 shows the cFOPID controller plane, where four points mark out the classical PID controller and its variations. The FOPID controller has more degrees of freedom than the classical PID. This characteristic allows for a better adjustment of the dynamical response of the fractional-order control system [16].

3.2. Discrete Fractional PID Controller

For the implementation of the dFOPID controller, the following structure of the cFOPID will be considered:
u c ( t ) = K p + K i λ ( q ) + K d μ ( q ) e ( t ) ,
where λ ( q ) and μ ( q ) are the backward (nabla) discrete-time fractional-order integrator and difference, q is the forward shift operator, and h is the sample time [43]. The nabla fractional-order difference can be defined by the use of the discrete-time Grünwald–Letnikov operator as
μ e ( t ) = h μ j = 0 t / h ( 1 ) j μ j e ( t h j ) = μ ( q ) e ( t ) ,
where μ ( q ) = h μ j = 0 t / h ( 1 ) j μ j q j . The Z -transform of μ ( q ) is defined as
μ ( z ) = h μ j = 0 ( 1 ) j μ j z j .
In practice, μ ( z ) cannot be implemented because of the infinite sum; therefore, in practical applications, their finite-length implementations can be employed in the form of
μ ( z ) L μ ( z ) = h μ j = 0 L ( 1 ) j μ j z j ,
with L being the finite length of the sum. To calculate the fractional-order integrator λ ( q ) , μ is substituted by λ in Equation (15). Therefore, the operator λ ( z ) can be obtained as follows
L λ ( z ) = 1 λ ( z ) = 1 h λ j = 0 L ( 1 ) j λ j z j .
Finally, the discrete fractional-order PID (dFOPID) controller has the form
u d ( z ) e ( z ) = K p + K i L λ ( z ) + K d L μ ( z ) .

3.3. Continuous and Discrete PID Controller

As stated, the continuous PID controller is a particular case of the fractional-order PID controller. The general form of the discrete PID (dPID) controller is obtained by discretizing Equation (12) while considering the fractional-order factor as λ = μ = 1 . The transfer function in the Z -transform of the dPID has the form
u d ( z ) e ( z ) = K p + K i 1 z 1 + K d ( 1 z 1 ) .
It is important to emphasize that the same gain variables and fractional-order factors ( K p , K i , K d , μ , λ ) are used in the continuous controllers and discrete controllers, but these gains and factors are different in each controller.

3.4. Genetic Algorithm for Tuning Controller Gains

Evolutionary algorithms are an important field of machine learning techniques and are of great interest to researchers. The genetic algorithm (GA) is a population-based stochastic algorithm inspired by natural selection, which is the basis of the Darwinian theory of evolution. The elements of GA are chromosome representation, fitness selection, and biological-inspired operators [44,45]. In the execution of the GA, a random initial population, called a generation, competes at a given task with a defined cost function. Specific rules or genetic operators determine how successful individuals advance to the next generation. After the first generation is populated with individuals, each individual is evaluated and assigned a fitness based on their performance on the cost function [46]. The GA can be applied to the gains-tuning process in almost any control structure. Specifically, GAs can be applied in the tuning process fractional-order PID controllers to obtain the optimal values of the gains K p , K i , K d , integral λ , and derivative μ factors, defining a specific cost function (the reader can refer to [47] for more information about meta-heuristics algorithms for tuning FOPIDs). The cost function considered in this work has the form:
J ( y ( k ) , u ( k ) , r ( k ) ) = k = 1 k f Q r ( k ) y ( k ) 2 + k = 1 k f R u ( k ) 2 ,
where y ( k ) is the system output, u ( k ) is the control input, r ( k ) is the reference, and Q > 0 and R > 0 are the cost function weights. The optimization problem is established as follows
x o p t = arg min   x J ( y ( k ) , u ( k ) , r ( k ) ) , subject to x ̲ x x ¯ ,
where x is the decision variable representing the controller gains and the fractional-order factors, and x ̲ and x ¯ denote the lower and upper bounds of x. Algorithm 1 shows the offline optimization process to obtain the optimal gains for each classical PID controller and FOPID controller. Figure 5 depicts the diagram of the closed-loop system; h 2 r ( t ) is the desired level of tank 2. It can be seen in this figure that the data needed to launch the GA and perform the offline optimization is obtained by simulating the closed-loop systems with the optimal values of the current generation before performing an optimization process.
Algorithm 1 (Controllers tuning process)
1:
Initialize the gains ( [ K p , K i , K d ] or [ λ , μ ] ) equals to zero.  
2:
GA: search for controller gains considering Equation (20).  
3:
Update the gains with the new value found.  
4:
Perform the closed-loop simulation with the optimal values of the current generation using Simulink and Equation (7) to update h 2 y ( k ) and V u ( k ) .  
5:
If the stop criterion reached? Foud the minimum of Equation (19) through evaluate Equation (20), get the values of the optimal gains, and finish the optimization process.  
6:
Else, if Gen < MaxGen and the stop criterion has not been reached, increment the generation index G e n = G e n + 1 and return to step 2.  

4. Results and Discussion

4.1. Tuning Results

The tuning process using a GA in the proposed controllers for implementation in real time was performed while following these considerations
  • The classical PID controllers were first tuned to obtain the optimal gains K p , K i , and K d for each controller;
  • The FOPID controllers used the optimal K p , K i , and K d from the classical PID controllers as fixed gains, and only the fractional-order factors λ and μ were optimized;
  • The experiment was set to a population of 10, and the maximum number of generations was defined depending on the best results obtained in the optimization process;
  • The experiment considered a simple time of h = 2 ms (for the simulations and real time tests).
The optimization process considers bounds for the gains and the fractional-order factor. The bounds are set based on the physical limits of the voltage applied to the pump and on testing the continuous and discrete PIDs in real time using pole placement as the tuning method. These bounds have the form:
  • Discrete and continuous classical PID bounds:
    0 K p 1 , 5 × 10 4 K i 5 × 10 3 , 0 K d 3 .
  • Discrete and continuous FOPID bounds
    0 λ 2 , 0 μ 1.5 .
The values of the cost function weights were selected to ensure an acceptable performance in the real-time application. After several tests, the best values found were Q = 10 and R = 0.001 .
Figure 6 presents the obtained results of applying a GA to the continuous classical and fractional-order PID. As can be seen in this figure, the optimization of the cPID controller needed sixty generations to find the optimal gains. On the other hand, the optimization process of the fractional-order factors of the cFOPID needed only twenty generations.
Figure 7 depicts the obtained results of applying a GA to the discrete classical and fractional-order PID. As the figure shows, in this case, the optimization of the dPID controller needed forty generations to find the optimal gains. On the other hand, the optimization process of the fractional-order factors of the dFOPID controller needed only twenty generations. Table 2 concentrates the optimal values for the gains and fractional factors found by the GA for all controllers. In this table, it can be seen that the parameters of the controllers as found by the GA vary in a small proportion. However, these variations are enough to generate different responses in the closed-loop systems.
Regarding the computational cost in the optimization process, when optimizing the gains of the PID controllers, the optimization time between generations yielded an average of 16.5 s. The computational cost for optimizing the fractional-order factors was 15.5 s between generations. We performed a test that considered both the gains and fractional factors in the optimization, obtaining a computational cost of 18.5 s between generations. In this last test, satisfactory results were not obtained in real time; this is why we optimized the gains of the PID controllers first and then optimized the fractional-order factors. All of these times include the simulation time of the closed-loop system with the optimal controller parameters of the current generation.

4.2. Experimentel Results

The experimental tests were performed while considering the parameters shown in Table 2. The real-time implementation was completed on a computer with the following features:
  • CPU: Intel core i5.
  • RAM memory: 16 GB;
  • Operating system: Windows 10;
  • Data acquisition card: National Instruments PICe-6321;
  • Matlab 2020b software with the Simulink Desktop Real-Time Toolbox.
The real-time application was performed while considering the steady-state levels reached with the constant signal being applied to the pump. When the two-tank system was at its steady-state point, the controller that was to be tested was turned on. The reference changes considered in the experiments were
h 2 r ( t ) = 6.12 , 0 t 500 , 7.12 , 500 t 1500 , 6.12 , 1500 t 2500 , 6.52 , 2500 t 3500 .
These reference changes consider an increment of 1 cm at the 500 s; at 1500 s, a decrement of 1 cm is applied. Finally, an increment of 0.5 cm is applied at 2500 s.
Figure 8 shows the results obtained after applying the cPID and cFOPID to the two-tank system in real time. It can be observed in this figure that the cFOPID has a better transient response than the cPID (zooms were performed in the figure for better clarity). The tank level reached a value of 7.39 cm with the cPID and 7.21 cm with the cFOPID. With these level values, therefore, the cPID generated an overshoot of 27 % , while the cFOPID generated an overshoot of 9 % . In the second zoom, it is observed that the cFOPID did not generate an undershoot when the reference changed from 7.2 cm to 6.2 cm. In terms of the settling time, considering an error criteria of 5 % and the level change at 500 s, the cPID stabilized the level in 177.63 s, while the cFOPID stabilized the level in 100.9 s. Another relevant fact is with respect to the control signal. The control signal of the cPID was noisier than the control signal of the cFOPID.
Figure 9 depicts the results obtained by implementing the dPID and dFOPID in the two-tank system in real time. As can be observed in this figure, the dFOPID had a better transient response than the dPID, in the same way as in the results obtained with the continuous controllers. In these tests, the tank level reached a value of 7.4 cm with the dPID and 7.24 cm with the dFOPID (this can be observed in the zooms performed in the figure). The dPID generated an overshoot of 28 % , while the dFOPID generated an overshot of 12 % . When the reference change was performed at 1500 s, it was observed that the dFOPID, as in the result obtained when using the cFPIOD, did not generate undershoot (second zoom in the figure). With respect to the settling time in these tests, considering the same conditions as with the continuous controllers, the dPID stabilized the level in 180.11 s, whereas the dFOPID stabilized the level in 114.55 s. Concerning the control signal obtained in these results, it can be observed that the control signal of the dPID was noisier than the control signal of the dFOPID. Table 3 summarizes the transient response data analyzed for the four controllers.

4.3. Discussion

The results obtained by applying the classical PID controllers and fractional-order PID controllers show that the FOPIDs achieved better transient responses than the PIDs. The FOPIDs have more parameters that offer more degrees of freedom in the tuning process, which contribute to them improving the closed-loop dynamic response. In order to quantify the controllers’ performance, the integral squared error (ISE), integral absolute error (IAE), and integral time-weighted absolute error (ITAE) indices were evaluated. These performance indices are defined as follows
I S E = e 2 ( t ) , I A E = e ( t ) , I T A E = t e ( t ) .
Table 4 concentrates the performance results obtained after testing all of the controllers. Observing the performance results shown in this table, the cFOPID controller had the best results among all controllers, except in the ISE index; the dFOPID controller had better performance but with a minimal variation in contrast to the ISE obtained by the cFOPID. The dPID controller had the worst performance, generating the highest performance values in all cases.
Considering the tuning process results obtained using the GA, the controllers’ performances could be different with better results because the GA cannot always reach the global minimum in the optimization processes. Another significant fact is that if no bounds are set in the optimization problem, the GA could expend much computational time to reach the optimal solution with the population and generations setup. It could be considered that the possible values for the decision variables are infinity, as in the case of the gains’ values for the controllers tested in this work, where it could be considered that if the gain values obtained by the GA were different, the controllers could have better performance; however, evaluating all possible value combinations is impractical or virtually impossible.

5. Conclusions

The present work addresses the experimental validation of fractional-order PID controllers applied to a two-tank system. The study was limited to optimizing the parameters of the PID and FOPID controllers while considering the cost function described in Equation (19). The performance of the fractional controllers was compared with the performance of classical PID controllers. All of the controllers were tuned using genetic algorithms to obtain optimal values for the controllers’ gains and the fractional-order factors. The GAs were applied to each controller considering the nonlinear model of the two-tank system. After testing all controllers in real time, the results show that the FOPID controllers performed better than the classical PIDs. The controllers’ parameters obtained with the GA adequately controlled the two-tank system; using an objective cost function that includes the weighted quadratic error and control effort is an acceptable alternative to the typical cost objective functions that are based on the tracking error, which are only optimal for minimizing the error tracking. The FOPIDs reduced the transient response characteristic as the overshoot and settling time. Another interesting result is related to the control signal: the FOPIDs generated less noisy control signals compared with the PIDs.
In conclusion, the FOPID controllers are an attractive alternative to the classical PIDs for real-time control systems. FOPID controllers, having fractional-order factors in their structures, bring more degrees of freedom than classical PIDs. This characteristic presents the opportunity of allowing better adjustment to the controller parameters, improving the closed-loop performance or transient response when the controllers are applied to nonlinear systems; this is a feature that classical PIDs lack. In a future work, we will consider implementing a FOPID controller to regulate ethanol production in a complex dynamical system such as the pressure swinging adsorption process; moreover, we will consider testing the proposed cost function with other optimization algorithms and contrasting the optimization result with the conventional error-based performance indices.

Author Contributions

Conceptualization, F.d.J.S.-V. and J.Y.R.-M.; methodology, J.A.B.-M. and F.d.J.S.-V.; software, G.O.-T. and R.O.-S.; validation, A.F.P.-V. and E.M.R.-V.; formal analysis, F.d.J.S.-V. and G.O.-T.; investigation, J.Y.R.-M. and A.F.P.-V.; resources, E.S.-B. and M.D.-l.-T.; supervision, F.d.J.S.-V. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The simulations and experimental data can be shared after a reasonable request to the authors.

Acknowledgments

The authors wish to thank the Centro Universitario de los Valles of the University of Guadalajara for the access and use of the Remote Automation and Computing Laboratory, in which the two-tank System is located.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PIDProportional-integral-derivative
FOPID  Fractional-order proportional-integral-derivative
GAGenetic algorithm
ISEIntegral of the square error
IAEIntegral of the absolute value of the error
ITAEIntegral of the absolute value of the error pondered by the time

References

  1. Carvajal, J.; Chen, G.; Ogmen, H. Fuzzy PID controller: Design, performance evaluation, and stability analysis. Inf. Sci. 2000, 123, 249–270. [Google Scholar] [CrossRef]
  2. Zhu, Z.; Liu, Y.; He, Y.; Wu, W.; Wang, H.; Huang, C.; Huang, C. Fuzzy PID Control of the Three-Degree-of-Freedom Parallel Mechanism Based on Genetic Algorithm. Appl. Sci. 2022, 12, 11128. [Google Scholar] [CrossRef]
  3. Qiao, L.; Zhao, M.; Wu, C.; Ge, T.; Fan, R.; Zhang, W. Adaptive PID control of robotic manipulators without equality/inequality constraints on control gains. Int. J. Robust Nonlinear Control 2022, 32, 9742–9760. [Google Scholar] [CrossRef]
  4. Mandava, R.K.; Vundavilli, P.R. An adaptive PID control algorithm for the two-legged robot walking on a slope. Neural Comput. Appl. 2020, 32, 3407–3421. [Google Scholar] [CrossRef]
  5. Nguyen, D.N.; Nguyen, T.A. A Novel Hybrid Control Algorithm Sliding Mode-PID for the Active Suspension System with State Multivariable. Complexity 2022, 2022, 9527384. [Google Scholar] [CrossRef]
  6. Ghani, M.F.; Ghazali, R.; Jaafar, H.I.; Soon, C.C.; Sam, Y.; Has, Z. Improved Third Order PID Sliding Mode Controller for Electrohydraulic Actuator Tracking Control. J. Robot. Control 2022, 3, 219–226. [Google Scholar] [CrossRef]
  7. Fliess, M.; Join, C. Intelligent PID controllers. In Proceedings of the 2008 16th Mediterranean Conference on Control and Automation, Ajaccio, France, 25–27 June 2008; pp. 326–331. [Google Scholar]
  8. Fliess, M.; Join, C. Model-free control. Int. J. Control 2013, 86, 2228–2252. [Google Scholar] [CrossRef] [Green Version]
  9. Sira-Ramirez, H.; Marquez, R.; Fliess, M. On the generalized pid control of linear dynamic systems. In Proceedings of the 2001 European Control Conference (ECC), Porto, Portugal, 4–7 September 2001; pp. 166–171. [Google Scholar]
  10. Becedas, J.; Trapero, J.R.; Feliu, V.; Sira-Ramirez, H. Adaptive Controller for Single-Link Flexible Manipulators Based on Algebraic Identification and Generalized Proportional Integral Control. IEEE Trans. Syst. Man Cybern. Part B 2009, 39, 735–751. [Google Scholar] [CrossRef]
  11. Zurita-Bustamante, E.W.; Linares-Flores, J.; Guzman-Ramirez, E.; Sira-Ramirez, H. A Comparison Between the GPI and PID Controllers for the Stabilization of a DC-DC “Buck" Converter: A Field Programmable Gate Array Implementation. IEEE Trans. Ind. Electron. 2013, 58, 5251–5262. [Google Scholar] [CrossRef]
  12. Oldham, K.B.; Zoski, C.G. Analogue instrumentation for processing polarographic data. J. Electroanal. Chem. Interfacial Electrochem. 1983, 157, 27–51. [Google Scholar]
  13. Westerlund, S.; Ekstam, L. Capacitor theory. IEEE Trans. Dielectr. Electr. Insul. 1994, 1, 826–839. [Google Scholar] [CrossRef]
  14. Bagley, R.; Calico, R. Fractional order state equations for the control of viscoelasticallydamped structures. J. Guid. Control Dyn. 1991, 14, 301–311. [Google Scholar] [CrossRef]
  15. Makroglou, A.; Miller, R.K.; Skaar, S. Computational results for a feedback control for a rotating viscoelastic beam. J. Guid. Control Dyn. 1994, 17, 84–90. [Google Scholar] [CrossRef]
  16. Podlubny, I. Fractional-order systems and PIλDμ-controllers. IEEE Trans. Autom. Control 1999, 44, 208–214. [Google Scholar] [CrossRef]
  17. Safarzadeh, O.; Noori-kalkhoran, O. A fractional PID controller based on fractional point kinetic model and particle swarm optimization for power regulation of SMART reactor. Nucl. Eng. Des. 2021, 377, 111137. [Google Scholar] [CrossRef]
  18. Pereira, L.F.D.S.C.; Batista, E.; de Brito, M.A.G.; Godoy, R.B. A Robustness Analysis of a Fuzzy Fractional Order PID Controller Based on Genetic Algorithm for a DC-DC Boost Converter. Electronics 2022, 11, 1894. [Google Scholar] [CrossRef]
  19. Warrier, P.; Shah, P. Optimal Fractional PID Controller for Buck Converter Using Cohort Intelligent Algorithm. Appl. Syst. Innov. 2021, 4, 50. [Google Scholar] [CrossRef]
  20. Seo, S.-W.; Choi, H.H. Digital Implementation of Fractional Order PID-Type Controller for Boost DC-DC Converter. IEEE Access 2019, 7, 142652–142662. [Google Scholar] [CrossRef]
  21. Wang, H.; Lu, J. Research on Fractional Order Fuzzy PID Control of the Pneumatic-hydraulic Upper Limb Rehabilitation Training System Based on PSO. Int. J. Control Autom. Syst. 2022, 20, 310–320. [Google Scholar] [CrossRef]
  22. Abood, L.H.; Oleiwi, B.K. Design of fractional order PID controller for AVR system using whale optimization algorithm. Indones. J. Electr. Eng. Comput. Sci. 2021, 23, 1410–1418. [Google Scholar] [CrossRef]
  23. Altbawi, S.M.A.; Mokhtar, A.S.B.; Jumani, T.A.; Khan, I.; Hamadneh, N.N.; Khan, A. Optimal design of Fractional order PID controller based Automatic voltage regulator system using gradient-based optimization algorithm. J. King Saud Univ. Eng. Sci. 2021, in press. [Google Scholar] [CrossRef]
  24. Koszewnik, A.; Pawluszewicz, E.; Ostaszewski, M. Experimental Studies of the Fractional PID and TID Controllers for Industrial Process. Int. J. Control Autom. Syst. 2021, 19, 1847–1862. [Google Scholar] [CrossRef]
  25. Zhang, F.; Yang, C.; Zhou, X.; Gui, W. Optimal Setting and Control Strategy for Industrial Process Based on Discrete-Time Fractional-Order PIλDμ. IEEE Access 2019, 7, 47747–47761. [Google Scholar] [CrossRef]
  26. Mohammad, A.F.; Abdulsalam, M.A. Fractional order PID controller tuned by bat algorithm for robot trajectory control. Indones. J. Electr. Eng. Comput. Sci. 2012, 21, 74–83. [Google Scholar]
  27. Saadatmand, M.; Gharehpetian, G.B.; Kamwa, I.; Siano, P.; Guerrero, J.M.; Haes Alhelou, H. A Survey on FOPID Controllers for LFO Damping in Power Systems Using Synchronous Generators, FACTS Devices and Inverter-Based Power Plants. Energies 2021, 14, 5983. [Google Scholar] [CrossRef]
  28. Paducel, I.; Safirescu, C.O.; Dulf, E.-H. Fractional Order Controller Design for Wind Turbines. Appl. Sci. 2022, 12, 8400. [Google Scholar] [CrossRef]
  29. Shah, P.; Agashe, S. Review of fractional PID controller. Mechatronics 2016, 38, 29–41. [Google Scholar] [CrossRef]
  30. Padhee, S.; Gautam, A.; Singh, Y.; Kaur, G. A Novel Evolutionary Tuning Method for Fractional Order PID Controller. Int. J. Soft Comput. Eng. 2011, 1, 1–9. [Google Scholar]
  31. Lazarević, M.P.; Batalov, S.A.; Latinović, T.S. Fractional PID Controller Tuned by Genetic Algorithms for a Three DOF’s Robot System Driven by DC motors. In Proceedings of the 6th Workshop on Fractional Differentiation and Its Applications Part of 2013 IFAC Joint Conference SSSC, FDA, TDS, Grenoble, France, 13–15 February 2013; pp. 385–390. [Google Scholar]
  32. Khather, S.I.; Almaged, M.; Abdullah, A.I. Fractional order based on genetic algorithm PID controller for controlling the speed of DC motors. Int. J. Eng. Technol. 2018, 7, 5386–5392. [Google Scholar]
  33. Bingül, Z.; Karahan, O. Fractional PID controllers tuned by evolutionary algorithms for robot trajectory control. Turk. J. Electr. Eng. Comput. Sci. 2012, 7, 1123–1136. [Google Scholar] [CrossRef]
  34. Gad, S.; Metered, H.; Bassuiny, A.; Abdel Ghany, A.M. Multi-objective genetic algorithm fractional-order PID controller for semi-active magnetorheologically damped seat suspension. J. Vib. Control 2017, 23, 1248–1266. [Google Scholar] [CrossRef]
  35. Chen, Z.; Yuan, X.; Ji, B.; Wang, P.; Tian, H. Design of a fractional order PID controller for hydraulic turbine regulating system using chaotic non-dominated sorting genetic algorithm II. Energy Convers. Manag. 2014, 84, 390–404. [Google Scholar] [CrossRef]
  36. Wan, J.; He, B.; Wang, D.; Yan, T.; Shen, Y. Fractional-Order PID Motion Control for AUV Using Cloud-Model-Based Quantum Genetic Algorithm. IEEE Access 2019, 7, 124828–124843. [Google Scholar] [CrossRef]
  37. Jaiswal, S.; Chiluka, S.K.; Seepana, M.M.; Babu, G.U.B. Design of Fractional Order PID Controller Using Genetic Algorithm Optimization Technique for Nonlinear System. Chem. Prod. Process. Model. 2020, 15, 20190072. [Google Scholar] [CrossRef]
  38. Devaraj, S.V.; Gunasekaran, M.; Sundaram, E.; Venugopal, M.; Chennianppan, S.; Almakhles, D.J.; Subramaniam, U.; Bhaskar, M.S. Robust Queen Bee Assisted Genetic Algorithm (QBGA) Optimized Fractional Order PID (FOPID) Controller for Not Necessarily Minimum Phase Power Converters. IEEE Access 2021, 9, 93331–93337. [Google Scholar] [CrossRef]
  39. Cao, J.; Cao, B. Design of Fractional Order Controllers Based on Particle Swarm Optimization. In Proceedings of the 1st IEEE Conference on Industrial Electronics and Applications, Singapore, 24–26 May 2006; pp. 1–6. [Google Scholar]
  40. Gouta, H.; Said, S.H.; Barhoumi, N.; M’Sahli, F. Observer-Based Backstepping Controller for a State-Coupled Two-Tank System. IETE J. Res. 2015, 63, 259–268. [Google Scholar] [CrossRef]
  41. Join, C.; Sira-Ramírez, H.; Fliess, M. Control of an uncertain three-tank system via on-line parameter identification and fault detection. IFAC Proc. Vol. 2005, 38, 251–256. [Google Scholar] [CrossRef] [Green Version]
  42. Sorcia-Vázquez, F.; García-Beltrán, C.; Valencia-Palomo, G.; Brizuela-Mendoza, J.; Rumbo-Morales, J. Decentralized robust tube-based model predictive control: Application to a four-tank system. Rev. Mex. Ing. QuḾica 2020, 19, 1135–1151. [Google Scholar] [CrossRef]
  43. Stanislawski, R.; Rydel, M.; Li, Z. A New Reduced-Order Implementation of Discrete-Time Fractional-Order PID Controller. IEEE Access 2022, 10, 17417–17429. [Google Scholar] [CrossRef]
  44. Mirjalili, S. Genetic Algorithm. In Evolutionary Algorithms and Neural Networks: Theory and Applications; Kacprzyk, J., Ed.; Springer International Publishing: Warsaw, Poland, 2019; pp. 43–55. [Google Scholar]
  45. Katoch, S.; Chauhan, S.S.; Kumar, V. A review on genetic algorithm: Past, present, and future. Multimed. Tools Appl. 2021, 80, 8091–8126. [Google Scholar] [CrossRef]
  46. Duriez, T.; Brunton, S.L.; Noack, B.R. Machine Learning Control—Taming Nonlinear Dynamics and Turbulence; Springer: Cham, Switzerland, 2017; pp. 11–46. [Google Scholar]
  47. Tepljakov, A.; Alagoz, B.B.; Yeroglu, C.; Gonzalez, E.A.; Hosseinnia, S.H.; Petlenkov, E.; Ates, A.; Cech, M. Towards Industrialization of FOPID Controllers: A Survey on Milestones of Fractional-Order Control and Pathways for Future Developments. IEEE Access 2021, 9, 21016–21042. [Google Scholar] [CrossRef]
Figure 3. Real-time validation of the two-tank system model.
Figure 3. Real-time validation of the two-tank system model.
Mathematics 11 02651 g003
Figure 4. cFPID controller plane.
Figure 4. cFPID controller plane.
Mathematics 11 02651 g004
Figure 5. Process for the optimization of the DFOPID parameters.
Figure 5. Process for the optimization of the DFOPID parameters.
Mathematics 11 02651 g005
Figure 6. Optimization results of the parameters for the continuous classical and fractional-order PID controllers. (a) K p optimization results. (b) K i optimization results. (c) K d optimization results. (d) λ optimization results. (e) μ optimization results.
Figure 6. Optimization results of the parameters for the continuous classical and fractional-order PID controllers. (a) K p optimization results. (b) K i optimization results. (c) K d optimization results. (d) λ optimization results. (e) μ optimization results.
Mathematics 11 02651 g006
Figure 7. Optimal gains for the discrete classical and fractional-order PID controllers. (a) K p optimization results. (b) K i optimization results. (c) K d optimization results. (d) λ optimization results. (e) μ optimization results.
Figure 7. Optimal gains for the discrete classical and fractional-order PID controllers. (a) K p optimization results. (b) K i optimization results. (c) K d optimization results. (d) λ optimization results. (e) μ optimization results.
Mathematics 11 02651 g007
Figure 8. Experimental results obtained by applying the cPID and cFOPID controllers to the two-tank system.
Figure 8. Experimental results obtained by applying the cPID and cFOPID controllers to the two-tank system.
Mathematics 11 02651 g008
Figure 9. Experimental results obtained by applying the dPID and dFOPID controllers to the two-tank system.
Figure 9. Experimental results obtained by applying the dPID and dFOPID controllers to the two-tank system.
Mathematics 11 02651 g009
Table 1. Two-tank system parameters.
Table 1. Two-tank system parameters.
ParameterVariableValueUnits
Pump constant K f 116.66 cm 3 /sV
Area of tank 1 and 2 ( A 1 , A 2 ) 630cm 2
Discharge constant of tank 1 a 1 0.75 cm 2
Discharge constant of tank 2 a 2 0.532 cm 2
Gravitational constantg981cm/s2
Level of tank 1 h 1 3.08cm
Level of tank 2 h 2 6.12cm
Table 2. Optimal gains and optimal fractional-order factors of the PID controllers and FOPID controllers.
Table 2. Optimal gains and optimal fractional-order factors of the PID controllers and FOPID controllers.
Controller K p K i K d λ μ
cPID 0.5214 6.516 × 10 4 2.99 --
cFOPID 0.5214 6.516 × 10 4 2.99 1.0918 0.6321
dPID 0.5246 6.485 × 10 4 2.8432 --
dFOPID 0.5246 6.485 × 10 4 2.8432 1.0908 0.6307
Table 3. Transient response of the classical PID and FOPID controllers.
Table 3. Transient response of the classical PID and FOPID controllers.
ControllerOvershootSettling Time (Seconds)
Continuous PID 29 % 177.63
Continuous FOPID 7 % 100.9
Discrete PID 28 % 180.11
Discrete FODPID 12 % 114.55
Table 4. Performance of the classical PID and FOPID controllers.
Table 4. Performance of the classical PID and FOPID controllers.
ControllerISEIAEITAE
Continuous PID 47.37 106.1 9.465 × 10 4
Continuous FOPID 47.09 102.8 9.112 × 10 4
Discrete PID 49.65 108.6 9.915 × 10 4
Discrete FODPID 47.02 103.1 9.712 × 10 4
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.

Share and Cite

MDPI and ACS Style

Sorcia-Vázquez, F.d.J.; Rumbo-Morales, J.Y.; Brizuela-Mendoza, J.A.; Ortiz-Torres, G.; Sarmiento-Bustos, E.; Pérez-Vidal, A.F.; Rentería-Vargas, E.M.; De-la-Torre, M.; Osorio-Sánchez, R. Experimental Validation of Fractional PID Controllers Applied to a Two-Tank System. Mathematics 2023, 11, 2651. https://doi.org/10.3390/math11122651

AMA Style

Sorcia-Vázquez FdJ, Rumbo-Morales JY, Brizuela-Mendoza JA, Ortiz-Torres G, Sarmiento-Bustos E, Pérez-Vidal AF, Rentería-Vargas EM, De-la-Torre M, Osorio-Sánchez R. Experimental Validation of Fractional PID Controllers Applied to a Two-Tank System. Mathematics. 2023; 11(12):2651. https://doi.org/10.3390/math11122651

Chicago/Turabian Style

Sorcia-Vázquez, Felipe de J., Jesse Y. Rumbo-Morales, Jorge A. Brizuela-Mendoza, Gerardo Ortiz-Torres, Estela Sarmiento-Bustos, Alan F. Pérez-Vidal, Erasmo M. Rentería-Vargas, Miguel De-la-Torre, and René Osorio-Sánchez. 2023. "Experimental Validation of Fractional PID Controllers Applied to a Two-Tank System" Mathematics 11, no. 12: 2651. https://doi.org/10.3390/math11122651

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop