Next Article in Journal
Lane Line Detection Based on Object Feature Distillation
Next Article in Special Issue
Finite-Time Adaptive Higher-Order SMC for the Nonlinear Five DOF Active Magnetic Bearing System
Previous Article in Journal
Temperature Measurement at Curved Surfaces Using 3D Printed Planar Resistance Temperature Detectors
Previous Article in Special Issue
Modeling and Recipe Optimization of Anti-Glare Process Using Sandblasting for Electronic Display Glass
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Identification and Metaheuristic PID Control of a Two-Tank System

Faculty of Automatic Control and Computers, “Politehnica” University of Bucharest, 313 Splaiul Independentei, 060042 Bucharest, Romania
*
Author to whom correspondence should be addressed.
Submission received: 14 April 2021 / Revised: 28 April 2021 / Accepted: 28 April 2021 / Published: 7 May 2021
(This article belongs to the Special Issue Control of Nonlinear Systems and Industrial Processes)

Abstract

:
In the modern optimization context, this paper introduces an optimal PID-based control strategy for a two-tank installation, namely ASTANK2. The process model was identified by using raw and spline smoothed measured data, respectively. Two PID controller configurations, a standard (regular) one (PID-R) and a non-standard one (PID-N), were considered for each type of model, resulting in four regulators. The optimal tuning parameters of each regulator were obtained by a searching approach relying on a combination of two metaheuristics. Firstly, an improved version of the Hill Climbing algorithm was employed to comprehensively explore the searching space, aiming to find fairly accurate tuning parameters. Secondly, an improved version of the Firefly Algorithm was proposed to intensively refine the search around the previously found optimal parameters. A comparative analysis between the four controllers was achieved in terms of performance and robustness. The simulation results showed that all optimal controllers yielded good performance in the presence of exogenous stochastic noise (bounded error tracking, setpoint tracking, reduced overshoot, short settling time). Robustness analysis is extensive and illustrates that the PID-R controllers are more robust to model uncertainties, whilst PID-N controllers are more robust to tracking staircase type references.

1. Introduction

Although there is a variety of complex control strategies (such as model predictive, sliding mode, adaptive control, neural and fuzzy control [1]), in control engineering practice, the Proportional–Integral–Derivative (PID) control structures are the most widely used (over 95% from industrial applications [2]), owing to their simple structure, good stability [3], high reliability, reasonable closed loop performance and robustness [4,5,6].
The key problem in designing a PID controller ensuring these features is to tune the parameters accurately and efficiently. This is a challenging task when dealing with industrial processes that usually are modelled as multi-variable systems, with nonlinear dynamics and a large number of tunable variables [5]. Adjusting controller parameters in Multi-Input–Multi-Output (MIMO) process can become a difficult problem, especially in case of strong coupling of the output channels, for which Single-Input–Single-Output (SISO) decoupled loops might affect the performance [4].
Over the years, the PID tuning methods evolved from empirical (Ziegler–Nichols [7,8], Cohen–Coon) and analytical (internal model, pole placement, gain-phase margin [9]) to adaptive and optimization-based [5]. Unlike the empirical and analytical methods that provide weak or only satisfying performance, the optimization techniques applied to PID tuning yield good performance (disturbance rejection, set-point tracking) and robustness [4,10,11]. Therefore, in recent decades, the problem of designing an optimal PID controller that drives the systems into a desired behavior has increasingly captured the interest of the automatic control community.
To find the optimal PID controller, a multi-objective optimization problem with constraints has to be solved [4,12,13,14]. Although there is no clear methodology to define the cost function to optimize [12] (usually, to minimize), most of them rely on the tracking error variation (both on transient and steady-state zones in signal dynamics). For example, root mean square error (RMSE) and integral RMSE are basic minimization criteria, from which different variants have been derived, such as integral absolute error, integral square error, integral time square error [1], integral time weighted square error and integral time absolute error [3,6]. By default, minimizing these criteria guarantees the trade-off between of a set of desired but conflicting control performance indexes (e.g., overshoot, settling time, rise time, decay ratio, steady-state error) [3,15,16]. Moreover, in real applications, since the process outputs are affected by environmental and/or measure disturbances (exogenous noises) that are stochastic in nature, the performance indexes cannot be computed by means of closed form expressions. In this case, building the multi-objective cost function is not an easy task. A compromise between opposite desired performances has to be found. Usually, a weighted sum criterion, with some experimentally set weights, is defined for this aim [12].
Two main classes of optimization techniques are mostly referred to in the literature for optimal PID controller design. The first one is represented by traditional (exact) optimization methods, being applied in context of linear/nonlinear control theory. The second one is concerned with metaheuristics.
Interestingly, some methods usually employing state space representations can be adapted to find optimal PID controllers. For example, one can mention the methods to synthesize Linear Quadratic Regulators of H-infinity controllers (with the help of the Linear Matrix Inequality optimization procedure) [11,17]. This approach has been successfully employed to design multivariable and multiloop PID controllers implemented either in continuous time [10,11] or in discrete time [18]. Nevertheless, this approach involves an elaborated mathematical foundation and complex algorithms [12]. Additionally, the proposed solutions seem to be insufficiently tested for noisy output signals.
The second class deals with non-traditional optimization techniques, also referred to as metaheuristics, mainly based on Artificial Intelligence [14], which led to evolutionary computing. In the last two decades, metaheuristics has gained increasing attention in various research domains, including control engineering, due to its capacity to find optimal solutions (often close to global optima) in multidimensional search spaces [12], with reasonable computational burden and a good trade-off between multiple performance objectives [5,14]. Many metaheuristics use the swarm intelligence revealed by the natural (individual and social) behavior of some living entities (insects, animals) [9]. A wide range of metaheuristics has been used in optimal PID design, as reported in the literature [5]. For example, the following metaheuristics were preferred: the Genetic Algorithms [19] in [6,8,16,17,20]; Particle Swarm Optimization [19] in [8,13,21]; Ant Colony Optimization [19] in [6,9]; Artificial Bee Colony [19] in [3,13,21,22]; Differential Evolution [23] in [8]; Firefly Algorithm [19] in [4,15,24]; Cuckoo Search [25] in [2,24]; Bat Algorithm Optimization [19] in [13,22]; Symbiotic Organisms Search [26] in [9]; and Grey-Wolf Optimization [27] in [3]. In some of these references, two or more metaheuristics were combined.
Intensive research has been reported in the literature for tuning the parameters of PID or Fractional Order PID [1] controllers using metaheuristics in the genuine or improved versions. Additionally, numerous comparative studies highlight the superiority of a metaheuristic over the others [6,8,21,22,24] or over empirical tuning methods [2,9,16,21].
Most contributions deal with continuous time SISO PID controllers [6,9,12,13,15,21,22,24]. To the best of our knowledge, few contributions are concerned with designing optimal PID controllers for the real-world MIMO processes [4,9,20]. In this case, the plant constructive characteristics, the operating conditions and, moreover, the noises corrupting the useful signals impose significant restrictions. Moreover, real-world processes often fail to verify some sufficient hypotheses usually employed to prove robustness of designed controllers. This involves the necessity to test robustness for each controller. Generally, the control strategy either is of the multi-loop PID type (decentralized) [4] or is based on decoupled SISO loops [3].
In this paper, two multivariable PID-based control strategies for a laboratory installation (ASTANK2 [28]) were designed and implemented starting from the identification models proposed in [29]. This resulted in two control strategies for each type of identification model. Based on the modern optimization context, to find the optimal PID parameters, a combination of two metaheuristics was proposed. The first is the Advanced Hill Climbing Algorithm (AHCA) [29], aiming to widely explore the search space and to find a sufficiently accurate optimal point. The second is an improved version of the Firefly Algorithm (FA) [19,30], employed to efficiently refine the exploitation around the previously found optimum point and to improve accuracy.
The article is structured as follows: Within the next section, the context of research development is described at length. Additionally, the optimization problem is formulated, and the methods to find optimal solutions, based on AHCA and improved FA metaheuristics, are proposed. Section 3 is entirely devoted to simulation results analysis. The investigations are directed towards three main directions: metaheuristics behavior, PID controllers performance for step references (such as bounded tracking error of step references, commands smoothness, short transient response, reduced overshoot, disturbance rejection) and robustness. The performance and robustness are comparatively analyzed. Four types of robustness are considered: to sudden change of references, to stochastic and constant disturbances, as well as to model uncertainties. To this aim, automatic procedures to define and detect fairly accurate robustness margins are introduced. The supplementary explanations are given in three appendices. Some concluding remarks, together with future developments are included into the last section of article.

2. Materials and Methods

2.1. Main Framework

The present study aims to design and implement a PID-based control strategy of a two-tank system, starting from the identification models determined in [29]. Actually, this research was already mentioned as possible future development in the end of that article.
The two-tank system, namely ASTANK2, is a laboratory installation, as illustrated in the functional diagram in Figure 1a.
The plant is composed of two main tanks (#1 and #2) located above an auxiliary storage reservoir, a main inverted-driven pump P (acting in the [0, 10] V range), two auxiliary on-off pumps (P1, P2) and a flexible pipeline network handled by seven manual taps (R11, R12, R13, R21, R22, R23, R). By acting the taps, different configurations of the installation can be set, such as serial/cascaded tank connection or independent tanks. The water is continuously recycled from the storage reservoir by means of the main pump P through the main vertical pipe that forks at the upper side and feeds the upper tanks. The supply flows of both tanks can be controlled by means of the two electro-valves (e-v) FC1 and FC2 (the voltage of which can also vary in the [0, 10] V range). The water can be evacuated from the main tanks either by a communication horizontal pipeline (in cases of serial configuration) or directly in the storage tank through the emptying pipes (operated by the manual taps R11, R21). The water level data are acquired by means of transducers LT1 and LT2. Additionally, the feeding water flows can be monitored thanks to FT1 and FT2 transducers. A detailed description of ASTANK2 can be found in [28].
As explained in [29], the two-tank system can be represented as a nonlinear MIMO system with 2 × 2 I/O channels. The inputs are the voltages u 1 and u 2 of the two e-v. The outputs are the water levels in the upper tanks, h 1 and h 2 , respectively. Note that the main pump voltage U is kept constant to protect the pump against sudden variations or shocks.
Despite the nonlinear dynamics, in [29], a linear MIMO Box-Jenkins (BJ) identification model (idmo) of ASTANK2 were determined and implemented for simulations. In order to identify the MIMO system, two Multi-Input Single-Output (MISO) systems corresponding to each output channel y 1 and y 2 , namely MISO1 and MISO2, respectively, were identified, starting from the experimental data. A comprehensive block diagram of the global model identification is illustrated in Figure 1b.
Each MISO component model includes three additive filters. Each input ( u 1 , u 2 ) stimulates two useful linear filters of B / A type. A noise linear filter of the C / D type modifies each output after processing two uncorrelated Gaussian white noises ( e 1 , e 2 ). For each output channel y j ( j { 1 , 2 } ), the MISO model relies on polynomials A j , B j 1 , B j 2 , C j and D j , of degrees n a j , n b j 1 , n b j 2 , n c j and n d j , respectively, with intrinsic delays n k j 1 , n k j 2 , defined as:
A j q 1 = 1 + a 1 , j q 1 + + a n a j , j q n a j B j 1 q 1 = q 1 n k j 1 b 1 , j 1 q 1 + b 2 , j 1 q 2 + b n b j 1 , j 1 q n b j 1 B j 2 q 1 = q 1 n k j 2 b 1 , j 2 q 1 + b 2 , j 2 q 2 + b n b j 2 , j 2 q n b j 2 C j q 1 = 1 + c 1 , j q 1 + + c n c j , j q n c j D j q 1 = 1 + d 1 , j q 1 + + d n d j , j q n d j .
Two types of experimental data were employed to identify the BJ models: raw (directly acquired from the sensors) and smoothed. The smoothed data were built from the raw data by using a least squares optimal stochastic cubic spline model [29]. In both cases, the optimal structure of the BJ models was obtained by means of a metaheuristic that maximizes the Signal-to-Noise Ratio (SNR). Table 1 illustrates the structural indices of each optimal MISO subsystem for both raw and smoothed data (whilst n k j 1 = n k j 1 = 1 ), as well as the variances of both Gaussian white noises.
The simulation results showed that when using smoothed data, the useful models have significantly fewer poles than when using raw data (see the first structural index, n a ). Such models are expected to yield better performance in closed loop than the models identified from raw data.
In addition to the idmo of ASTANK2, a static input/output (I/O) map was built experimentally. This map includes quadruples u 1 , s , u 2 , s , y 1 , s , y 2 , s with the following meaning: if the tanks #1 and #2 need to be filled with water at constant levels y 1 , s and y 2 , s , respectively, then, in the absence of perturbations, the corresponding constant voltages of e-v FC1 and FC2 are u 1 , s and u 2 , s , respectively. This map is extremely useful in setting nominal functioning points of installation, around of which the dynamics of nonlinear installation are almost linear. Hence, if some reference water levels y 1 , ref and y 2 , ref are prescribed, then, from the static map, one can obtain the necessary voltages u 1 , ref and u 2 , ref to be applied on each e-v. If y 1 , ref and/or y 2 , ref do not correspond to the static points in the map, then the voltages u 1 , ref and u 2 , ref are obtained by linear interpolation. The static map includes 49 combinations of static water levels (7 for each tank), between 7 cm and 11 cm. This range was preferred to avoid water turbulences in tanks, which may provide wrong acquired data. Moreover, the linear models above were identified for the same level range.
The static map also revealed some constructive limitations of the ASTANK2 plant, to be considered as constraints in the design of any controller. The most important of them are as follows: (a) the e-v voltages are saturated at 2 V and 10 V (below 2 V, the e-v does not react any more); (b) the water levels in any tank can vary between 0 cm and 15 cm only; (c) to avoid hard saturation of voltages on e-v, the absolute difference between level references, y 1 , ref y 2 , ref , is bounded by 2 cm; (d) to protect e-v against premature failure, any voltage cannot jump from the current value to the next one with more than ± 3 V.

2.2. Selected PID Controllers and Closed Loop Configurations

The proposed control strategy relies on PID type controllers. Since the ASTANK2 plant is a multivariable system, two PID-based control configurations were designed and investigated (among many possible others) in order to meet certain performances, such as bounded tracking error of step references, smooth commands, short transient response, reduced overshoot, disturbance rejection, robustness against reference shocks, external perturbations and model uncertainties. An extended analysis of performance indicators is made in Section 3, devoted to simulation results. Note, however, that the optimal PID controllers were synthesized by means of a cost function, referred to as fitness, defined in the next subsection. The fitness does not consider all possible performance indicators, especially because many of them are defined for systems with smooth I/O signals. Alternatively, ASTANK2 installation works with noisy signals, as shown later.
The two selected PID are described by the schemes in Figure 2 and Figure 3. They are depicted for SISO continuous time systems to allow for easy understanding. In both configurations, H is the transfer function of system to regulate, u is the input (the command), y is the output, y r is the reference signal, ε y r y is the tracking error, whereas K p > 0 (the proportionality constant), T i > 0 (the integral constant), T d 0 (the derivative constant) and N d > 0 (the derivative divisor) are parameters of the PID controller.
The derivative component is filtered by a first order system to yield physical realizability. The derivative divisor N d usually is an integer at least equal to 10. Thus, the time constant of filter ( T d / N d ) is small enough (i.e., its bandwidth is large enough) to minimally distort the derivative component of the command. Here and hereafter, N d was set to 10.
The fist PID structure, as seen in Figure 2, is a regular (standard) one, being abbreviated by PID-R. The characteristic transfer function of the PID-R controller, from tracking error ε to command u , is:
H PID R ( s ) = K p 1 + 1 T i s + T d s T d N d s + 1 = K p T i T d N d + 1 s 2 + T d + N d T i s + N d T d T i s 2 + N d T i s .
The second structure, illustrated in Figure 3, is non-standard and was considered for its main feature; the derivative component of the command is furthermore filtered by the other two components (P, I), which results in quite smooth commands (with as few spikes as possible). The acronym for this structure is PID-N, and the corresponding transfer function is:
H PID N ( s ) = K p T i s + 1 T i s 1 T d N d + 1 s + N d T d s + N d .
Unlike PID-R, the transfer function of PID-N is of the MISO type, with two inputs: the reference signal y r and the system output y . This allows for working with two regulation blocks of the SISO type: one on feedback, H R (the ”pure” regulator), and another one in front of the system, H S (the ”sensitive” controller), providing the command u :
H PID N ( s ) = H S ( s ) 1 H R ( s ) ,   with :   H S ( s ) = K p T i s + 1 T i s H R ( s ) = T d N d + 1 s + N d T d s + N d .
Since the idmo of the ASTANK2 plant is discrete, it is suitable to discretize the PID regulators. A fairly accurate discretizing method is the bilinear Tustin method, in which s 2 T s 1 z 1 1 + z 1 , for some sampling period T s > 0 . After discretization, the transfer functions (2) and (4) become:
H PID R ( s ) H PID R ( z ) = Q ( z ) P ( z )   and   H PID N ( s ) H PID N ( z ) = Q S ( z ) P S ( z ) 1 Q R ( z ) P R ( z ) ,
where Q , P , Q S , P S , Q R , P R are polynomials of the second degree at most. Their coefficients are expressed as follows, depending on the controller type:
  • P controllers ( T i = , T d = 0 ):
    Q S ( z ) = Q ( z ) = K p P S ( z ) = P ( z ) = 1 ;   Q R ( z ) = 1 P R ( z ) = 1 .
  • PI controllers ( T d = 0 ):
    Q ( z ) = Q S ( z ) = K p T s + 2 T i z + T s 2 T i P ( z ) = P S ( z ) = 2 T i ( z 1 ) ;   Q R ( z ) = 1 P R ( z ) = 1 .
  • PD controllers ( T i = ):
    Q ( z ) = K p Q R ( z ) = K p N d T s + 2 N d + 1 T d z + N d T s 2 N d + 1 T d P ( z ) = P R ( z ) = N d T s + 2 T d z + N d T s 2 T d ;   Q S ( z ) = K p P S ( z ) = 1 .
  • PID controllers (general case): Q ( z ) = q 2 z 2 + q 1 z + q 0 P ( z ) = p 2 z 2 + p 1 z + p 0 , with:
    q 2 = K p 2 N d + 1 T i T d N d T s + T s 2 + T d N d + T i q 1 = K p T s 4 N d + 1 T i T d N d T s q 0 = K p 2 N d + 1 T i T d N d T s + T s 2 T d N d T i ;   p 2 = 2 T i T d N d T s + T i p 1 = 4 T i T d N d T s p 0 = 2 T i T d N d T s T i ;
    Q S ( z ) = K p T s + 2 T i z + T s 2 T i P S ( z ) = 2 T i ( z 1 ) Q R ( z ) = N d T s + 2 N d + 1 T d z + N d T s 2 N d + 1 T d P R ( z ) = N d T s + 2 T d z + N d T s 2 T d .
For ASTANK2 installations, the selected closed loop configurations are displayed in Figure 4, for the two PID structures. There are 4 characteristic polynomials for the configuration in Figure 4a: Q 1 , P 1 , Q 2 and P 2 . Additionally, in Figure 4b, 8 polynomials have to be set: Q S , 1 , P S , 1 , Q R , 1 , P R , 1 , Q S , 2 , P S , 2 , Q R , 2 and P R , 2 . Their coefficients are determined by the 6 parameters of continuous time PID controllers, namely K p , 1 , T i , 1 , T d , 1 (for the first channel), and K p , 2 , T i , 2 , T d , 2 (for the second channel). To compute them, Equations (6)–(10) can be employed. Each PID controller is fed with the output and/or the tracking error of one channel, but provides a command that applies to both MISO blocks.

2.3. Optimization Problem Statement and Cost Function Definition

One seeks to find the optimal parameters of the two PID controllers by optimizing a cost function. There is an extensive discussion in the literature concerning the choice of such a cost function. Most approaches rely on the RMSE applied on the tracking error and the norm of command. Both have to be minimized. Usually, they are combined in a cost function with some weights in their original or modified versions. Basically, the cost function defined in this article, referred to as fitness, also employs the RMSE, but with some refinements adapted to ASTANK2 dynamics.
Take, for example, the output signal y of Figure 5, tracking some reference y ref .
The global RMSE is then:
RMSE = 1 N n = 1 N y [ n ] y ref [ n ] 2 ,
where N is the number of acquired output samples. Evidently, RMSE is a cost function to minimize. Using definition (11) in the context of the ASTANK2 plant revealed several disadvantages. The most important comes from the fact the tracking error can have similar values on transient and steady-state zones, which can lead to output signals that oscillate too much around references, while RMSE takes relatively small values. Thus, separating the two zones is necessary. Since the output signal is corrupted by stochastic noises, no analytical formula can be employed to compute the transient time, N t . Therefore, N t has to be estimated by using statistical tools.
Let ε y y ref be the tracking error. A key parameter in estimating N t is the backward moving standard deviation (std) of tracking error:
σ ε b [ k ] = 1 k + 1 n = N k N ε [ n ] μ ε b [ k ] 2 ,   k 1 , N 1 ¯ ,
where μ ε b is the backward moving average:
μ ε b [ k ] = 1 k + 1 n = N k N ε [ n ] ,   k 1 , N 1 ¯ .
For the signal in Figure 5, σ ε b is displayed in Figure 6a. At the right side end, the std of final tracking error is computed, whereas the larger values obtained at the left side end correspond to the first values of tracking error.
Actually, the variation above was horizontally flipped, as, according to the computing formula, the first values of std are the ones that lie at the right side end. Normally, the transient time is given at the left entry of the flat variation in the graphic. However, finding this entry is rather difficult, because, as one can easily notice, any of the lags between 180 and 300 can play this role. Therefore, a penalty can be applied to the std, aiming to better isolate the transient time. Among several penalties known in the literature, the Akaike-Rissanen (A-R) criterion seems to be suitable to the variation above. The A-R penalized std is then:
σ ε b , A C [ k ] = log σ ε b [ k ] + k 2 N log ( N ) ,   k 1 , N 1 ¯ .
In Figure 6b, the penalized A–R std is overlapped on normalized signal and reference variations (in range [0, 2]). One can notice how easy it now is to find the transient time (the minimum point of the penalized std) and how well this value corresponds to the subjective selection performed by visual inspection of signal variation.
In the framework of the ASTANK2 plant, the two output signals y 1 and y 2 are tracking the references y 1 , ref and y 2 , ref , with errors ε 1 y and ε 2 y , respectively. To define the fitness, the two zones of each signal dynamics are processed separately. Let N t , 1 and N t , 2 be the two transient times detected on output signals by using the procedure above. For the transient zone, the fitness can be defined as follows:
φ t , j y 100 1 + σ 1 N t , j n = 1 N t , j ε j y [ n ] 2   [ % ] ,   j { 1 , 2 } ,
where σ > 0 is a factor that allows for scaling of the fitness. For example, the function 100 / ( 1 + x ) (on which the definition (15) relies) takes the value of 58.82% in x = 0.7 ; by using the scaling factor σ = 0.5 , i.e., σ x instead of x , the value can be increased to 74.07%. Assuming both output signals have the same length, N , for the steady-state zone, the fitness is:
φ s , j y 100 1 + σ 1 N N t , j n = N t , j + 1 N ε j y [ n ] 2   [ % ] ,   j { 1 , 2 } .
Now, it is natural to consider that each fitness above has a weight proportional to the duration of its zone, which leads to the fitness of each output channel:
ϕ j y N t , j φ t , j y + N N t , j φ s , j y N ,   j { 1 , 2 } .
In the case of commands u 1 and u 2 , the references u 1 , ref and u 2 , ref are computed from the static map, depending on references y 1 , ref and y 2 , ref , as explained in the end of Section 2.2. Two zones in command variation are considered as well, with transient times M t , 1 and M t , 2 . Unlike for outputs, the two commands should be analyzed as a whole, since they are simultaneously applied to both MISO models that produce the outputs; therefore, on the transient zones, a unique fitness is defined by means of tracking errors ε 1 u and ε 2 u :
φ t , 12 u 100 1 + σ 1 M t , 1 + M t , 2 n = 1 M t , 1 ε 1 u [ n ] 2 + n = 1 M t , 2 ε 2 u [ n ] 2   [ % ] .
Similarly, the fitness on the steady-state zone is:
φ s , 12 u 100 1 + σ 1 2 N M t , 1 M t , 2 n = M t , 1 + 1 N ε 1 u [ n ] 2 + n = M t , 2 + 1 N ε 2 u [ n ] 2   [ % ] .
Finally, the fitness of both input channels is a weighted average of (18) and (19):
ϕ 12 u M t , 1 + M t , 2 φ t , 12 u + 2 N M t , 1 M t , 2 φ s , 12 u 2 N .
The fitness definitions (17) and (20) can be combined into a weighted average, to obtain the overall fitness of PID-ASTANK2 scheme:
Φ α ϕ 1 y + ϕ 2 y + β ϕ 1 , 2 u   [ % ] ,
where 2 α + β = 1 . For example, α = 0.35 and β = 0.3 . The fitness of output signals has the same weight, as no channel is more important than the other. Obviously, the fitness is a cost function to maximize.
Definition (21) has an important drawback. Theoretically, a certain value of fitness, Φ 0 , can be obtained by an infinity of triplets ϕ 1 y , ϕ 2 y , ϕ 1 , 2 u . Thus, one of the fitness functions from the triplet can be small, whilst, in compensation, the other two are large. Usually, this happens when ϕ 1 , 2 u is small (the commands having big oscillations) and ϕ 1 y and ϕ 2 y are large (tracking of references being very fast, with small overshoot or even without overshoot). This means the e-v are worked hard in order to fasten the reference tracking. Or, such a situation is to be avoided. It is more suitable to have smoother commands, even though the references are tracked slower and/or with some overshoot. To deal with this ambiguity, the characteristics of a closed loop system can be taken into consideration. For an ASTANK2 installation, simulations have shown that good fitness values are above 75% (for definition (21) and the scaling factor σ = 0.5 ). In this case, the difference between ϕ 1 y and ϕ 2 y is less than 10% ( ϕ 1 y ϕ 2 y < 0.1 ). Moreover, commands fitness exhibit two behaviors: (a) if ϕ 12 u < ϕ 1 y + ϕ 2 y 2 , then the overall fitness can take big values, although the commands are oscillating too much (increasing the risk of e-v premature wearing out or failure); (b) if, on the contrary, ϕ 12 u ϕ 1 y + ϕ 2 y 2 (or, even better, if ϕ 12 u max ϕ 1 y , ϕ 2 y ), then the commands are quite smooth, and the overall fitness can take large values. Obviously, the last case is suitable for finding optimal controllers. In order to drive the search towards smooth commands and large overall fitness values, definition (21) can be refined:
Φ β ϕ 12 u + max ϕ 1 y , ϕ 2 y 2 + 2 α min ϕ 1 y , ϕ 2 y , min ϕ 1 y , ϕ 2 y < 75 β ϕ 1 y + ϕ 2 y 2 + 2 α ϕ 12 u , min ϕ 1 y , ϕ 2 y 75 & ϕ 12 u < ϕ 1 y + ϕ 2 y 2 α ϕ 1 y + ϕ 2 y + β ϕ 12 u , min ϕ 1 y , ϕ 2 y 75 & ϕ 12 u ϕ 1 y + ϕ 2 y 2 ,
where α ( 0.25 , 0.5 ) . Practically, in definition (22), the former definition (21) is only employed to find optimal regulators with smooth commands—see the third case. For the other two cases, the term that produce fitness ambiguity is now multiplied by large weight (of at least 0.5), which results in smaller overall fitness values.
The fitness depends on the 6 parameters of continuous time PID controllers. Obviously, it is not possible to visually observe the characteristics of fitness in this case. Nevertheless, 6 fitness surfaces can be drawn, by varying couples of parameters, while keeping constant the other four. Such surfaces are depicted in Figure 7.
The stochastic nature of the I/O measured data induces irregular variations, with many local extremes of fitness. A mutual characteristic of all surfaces above is the alternance between smooth slopes and fractal heights or ridges, where the maximum point lies. Solving the maximization problem becomes a difficult task that cannot be accomplished by using exact methods [31]. Instead, a suitable alternative to this problem is adopting evolutionary computing techniques, referred to as metaheuristics [19]. In this article, two metaheuristics are employed: one to widely explore the search space and another one to exploit some narrow zones where the maximum seems to exist. Figure 8 suggests the search strategy. For exploration, the AHCA from [29] was employed. Its main task is to find an optimum with fair accuracy, while exploring large zones of search space. Since in case of the 6 optimal PID parameters the upper bound is unknown and the fitness exhibits smooth slopes where the gradient is not oscillating, AHCA fits very well. Once the climbers have found some optima, a vicinity around them can be isolated. Now the search can be performed within a bounded zone. To exploit this zone, the FA was selected (and improved), due to its simplicity and effectiveness. Whilst the climbers are strongly dependent on the local gradient of fitness, the fireflies can easily jump from one peak to another, regardless of the gradient (which, anyway, may oscillate too much—see the magnification on the left side of Figure 8).
It has to be outlined that both the exploration and the exploitation phases are performed by varying all 6 parameters (and not only couples of them, as Figure 7 might suggest). The improved FA (IFA) is described next.

2.4. Improved Firefly Algorithm

The FA [19,30] was inspired by the principle of mutual attraction between insects and the phenomenon of natural attenuation of light with distance. The fireflies are small flying beetles, usually luminescent at twilight, that produce a cold light to attract mates or prey. They are grouped into swarms and, apparently, fly at random. In its flight, a firefly is tempted to fly towards other shinier fireflies in the swarm, being attracted by the light signals the latter are emitting. In this way, the shinier fireflies become targets for the current one. The strongest target is the shiniest firefly, which attracts the entire swarm. Thus, the swarm is more and more grouped around the firefly emitting the most intense light. Nevertheless, the shiniest firefly flies as well and their light can fade. In this case, another firefly becomes the shiniest. Even though the swarm was grouped around a firefly, it can move away towards another shinier firefly. In this way, there is a good balance between the convergence and the diversity of firefly swarms.
Figure 9 illustrates a swarm of fireflies and its evolution from current to next positions. The current firefly is colored in blue, and the shiniest firefly is in red, whereas the other fireflies are in orange (the shinier ones) or in yellow (the less shining ones).
The perceived light attractiveness depends on the brilliance of the casting beetle. The brighter a firefly, the more fireflies it attracts. The current firefly is motivated to fly towards the shiniest one along the arrow in red (see the left side of Figure 9). Nevertheless, while tracking the target, our firefly can perceive lights from other fireflies, especially from the shinier ones, which constitute attraction points as well. Hence, the other fireflies in the swarm, especially the ones in orange, could disturb the flight along the direction colored in orange as well. By composing the two directions (in red and in orange), the final direction, in blue, is taken by the current firefly. Meanwhile, the swarm moves to new positions and changes light intensities, as suggested in the right side of Figure 9. It is possible that the shiniest firefly decreases its light intensity, whilst another firefly becomes the shiniest. All fireflies can change not only in position, but in light intensity as well. The swarm permanently tries to group around the shiniest firefly, but this becomes possible only if no other firefly becomes shinier. Otherwise, the swarm can oscillate between several positions, until a best position (of maximum light intensity) is found, eventually.
This behavior can be simulated by means of a numerical algorithm based on the following recursive equation expressing how the position of an artificial firefly changes:
x p k + 1 = x p k + q S p β p , q k x q k x p k + η k ξ k S ,   p 1 , P ¯ ,   k .
The notations in Equation (23) are explained next. Assume the swarm includes P fireflies. Each firefly p 1 , P ¯ takes a position x p k at instant k , into the search space S n x , where n x is the length of position vector. (For example, in the case of PID-ASTANK2 configurations, n x = 6 .) The search space can be specified as a cartesian product of compact intervals:
S = x min , 1 , x max , 1 × x min , 2 , x max , 2 × × x min , n x , x max , n x = i = 1 n x x min , i , x max , i .
To compute the next position, the firefly will take ( x p k + 1 ), and the current position is affected by two disturbances: one produced by the shinier fireflies than the current one (including the shiniest one), referred to as diversity disturbance, and another one generated by the entire swarm—the convergence disturbance. The sum term in Equation (23) stands for the diversity disturbance, where all the shinier fireflies than the current one are grouped into the set S p . This disturbance actually contributes to swarm diversity and is expressed as a linear combination of attraction directions from the current firefly to its shinier mates, x q k x p k q S p . Thus, the current firefly is not exclusively attracted by the shiniest firefly, but by the other shinier fireflies as well. This phenomenon keeps the diversity of fireflies’ swarms to some extent. The corresponding coefficients, β p , q k q S p , are light intensities perceived by the current firefly from the shinier ones. According to Biology, each perceived intensity can be computed as follows:
β p , q k = I 0 exp x p k x q k D ( S ) ,   p 1 , P ¯ ,   q S p ,   k ,
where I 0 is a biological constant standing for the maximum light intensity a firefly can produce (usually set to unit) and D ( S ) is the diameter of search space, defined by:
D ( S ) = sup x , y S x y = i = 1 n x x min , i x max , i 2 .
Definition (25) shows that the perceived light intensity is higher if the fireflies are closer to each other. However, the current firefly also can be strongly attracted by a distant firefly radiating an intense light. This case is not taken into consideration in definition (25). Therefore, a first improvement consists of including the radiated light intensity into the perceived intensity formula. Let Φ p k be the light intensity radiated by firefly p 1 , P ¯ at instant k . Then, the intensity of light the other fireflies perceive should increase as Φ p k increases and the distance from the current firefly decreases. A second improvement concerns the diameter. Normally, the perceived intensity should adapt itself to the space the entire swarm of fireflies is taking at current instant, denoted by S k . Obviously, S k S and then:
S k = i = 1 n x min p 1 , P ¯ x p , i k , max p 1 , P ¯ x p , i k = i = 1 n x x min , i k , x max , i k ;   D S k = i = 1 n x x max , i k x min , i k 2 .
With the two improvements above, definition (25) can be replaced by:
β p , q k = I 0 exp x p k x q k D S k Φ p k Φ q k ,   p 1 , P ¯ ,   q S p ,   k ,
where, evidently, Φ q k Φ p k , q S p .
The last term of Equation (23) expresses the second disturbance, generated by the entire swarm at each instant k . The disturbance intensity is given by the scalar factor η k , uniformly selected at random in the interval [ 1 , + 1 ] . Its sign encodes whether the disturbance is direct (+1) or opposite (–1). The other factor, ξ k S n x , stands for the absolute disturbance vector generated by the swarm. According to biologists, each component of this vector, ξ i k S ( i 1 , n x ¯ ), is generated at random as well, but not uniformly. This time, the random numbers generator uses Lévy’s (probability) distribution:
p u = u λ ,   u + ,
where λ [ 0 , 3 ] is preset. Usually, λ = 1.5 . To generate numbers with prescribed probability distribution, Baker’s algorithms can be implemented and run [19,32]. The Lévy’s distribution is assigned to each component of search space, i.e., to each interval x min , i , x max , i ( i 1 , n x ¯ ). Thus, ξ i k S x min , i , x max , i ( i 1 , n x ¯ ), which explains why the vector ξ k depends on the search space S . However, during the run of IFA, this definition revealed two caveats: (a) Lévy’s distribution over x min , i , x max , i yields generating the most values in the vicinity of x min , i , although there is no reason the fireflies should be directed to the lower bound of the search space; and (b) as the swarm concentrates around a shiniest firefly, the disturbing direction becomes unrealistic, because the vector ξ k does not belong anymore to the space the fireflies are moving into, i.e., S k . Therefore, two more improvements of basic FA were made: (a) Lévy’s distribution is centered around the light center of the swarm; and (b) instead of using S to generate the components of vector ξ k , the current search space S k is employed. The light center can be determined by using the radiated light of each firefly:
x c k = p = 1 P Φ p k x p k p = 1 P Φ p k ,   k .
Now Lévy’s distribution is defined as follows, for each component i 1 , n x ¯ :
p u = u x c , i k λ ,   u x min , i k , x max , i k ,
Hence, in definition (23), the factor ξ k S is replaced by ξ k S k . The product η k ξ k S k is a disturbance that ensures the swarm convergence to some extent.
After being computed, the next position x p k + 1 may need to be made viable. This means bringing back all outsider components of x p k + 1 inside the corresponding min–max interval, according to the initial search space definition (24). Assume x p , i k + 1 x min , i , x max , i for some i 1 , n x ¯ . Then, the integer below can be computed:
n p , i k + 1 = x p , i k + 1 x min , i x max , i x min , i ,   if   x p , i k + 1 > x max , i   or   n p , i k + 1 = x max , i x p , i k + 1 x max , i x min , i ,   if   x p , i k + 1 < x min , i .
Consequently, x p , i k + 1 can be replaced by the new component below:
x p , i k + 1 x p , i k + 1 n p , i k + 1 x max , i x min , i , x p , i k + 1 > x max , i x p , i k + 1 + n p , i k + 1 x max , i x min , i , x p , i k + 1 < x min , i .
It is easy to prove that the new component belongs now to the corresponding min-max interval.
The notation for radiated light intensity is not selected at random. In fact, Φ is the cost function to maximize among the fireflies’ swarm during the search (and will stand for fitness, in case of PID controllers optimization).
The numerical procedure of IFA (the Algorithm 1) is summarized next.
Algorithm 1. Main steps of IFA procedure
1Input data:
  • cost function to maximize, Φ (associated with light intensity eradiated by fireflies);
  • search space boundaries (see Equation (24));
  • configuring parameters: swarm size P , specific light intensity I 0 , Lévy’s constant λ , maximum number of iterations K , surviving (aging) factor S .
2Initialization. Spread the fireflies approximately uniform over the search space S and evaluate their performance (by using Φ ). Save the shiniest firefly.
3Main loop. While the number of iterations is less than K and the shiniest firefly survived over less than S iterations, do the following:
3.1.
Evaluate the current search space S k and its diameter using Equation (27).
3.2.
Evaluate the mass left of swarm, by using Equation (30).
3.3.
For each firefly in the swarm:
3.3.1.
For each shinier firefly:
3.3.1.1.
Evaluate the perceived light intensity by using Equation (28).
3.3.1.2.
Compute the corresponding disturbance, according to the second term of Equation (23).
3.3.2.
Update the current position by adding all disturbances of shinier fireflies.
3.3.3.
Set the swarm disturbance intensity at random, uniformly, in [ 1 , + 1 ] .
3.3.4.
Use Baker’s algorithm to generate the absolute swarm disturbing direction with Lévy’s distribution (31).
3.3.5.
Update the current position by adding the convergence disturbance, according to the last term of Equation (23).
3.3.6.
Make viable the new position by using Equations (32) and (33).
3.4.
Update the swarm performance and determine the new shiniest firefly.
3.5.
If the current shiniest firefly still is shinier than the current one, increment the surviving counter.
3.6.
Otherwise, replace the current shiniest firefly by the new one and reset the surviving factor.
3.7.
Increment the number of iterations.
4Output data:
  • optimal value of Φ and position of the shiniest firefly;
  • performance parameters of IFA: total number of iterations, surviving counter.
As in cases of many metaheuristics, there are no theoretical results proving the IFA is convergent. Therefore, to terminate the numerical procedure, the stop tests of the main loop in Algorithm 1 are necessary. Additionally, the position of the current shiniest firefly changes only because of the convergence disturbance, and its light can fade.

3. Analysis of Simulation Results

3.1. Simulations Setting

The simulations were performed within the MATLAB-SIMULINK™ environment. The two closed loop configurations of Figure 4 were implemented as SIMULINK models, as depicted in Figure 10 and Figure 11. Unlike the schemes in Figure 4, the SIMULINK models include the characteristic limitations of ASTANK2 plant (enumerated in the end of Section 2.1). The output references are of two types: a step for optimal PID design, and a staircase for robustness analysis. In Figure 10 and Figure 11, the step references are set as follows: y 1 , ref = 8.5 V, y 2 , ref = 9.5 V. They can be switched, as displayed in the left side of both schemes (see the block sw). Additionally, the sampling period was set to unit( T s = 1 s) in all simulations. Since ASTANK2 has a slow dynamic, the simulation duration was set to T = 1000 T s = 1000 s for step references. Longer durations are employed in cases of other references types.
In the case of staircase references, the input of each scheme is changed to the one in Figure 12. The staircases can be designed by the user within an M-script with two variables: one giving the height of each step (stair), and another one setting the time instants of each step (time_steps). The staircases have to comply with ASTANK2 limitations of outputs (no more than 2 cm difference between steps on different channels).
Additionally, the staircases can be scaled in a suitable interval Y min , Y max (specified by means of block Y_minmax). By default, the scaling interval is 7 , 11 cm.
To the right side of schemes in Figure 10 and Figure 11, the characteristic static map of the ASTANK2 plant with linear interpolation is implemented (see the block u_ref). Thus, the command references are available during the simulation, depending on output references y 1 , ref and y 2 , ref .
The Gaussian white noises are generated by means of corresponding blocks on each channel. Their variances are set according to the last column of Table 1, where the estimations resulted after linear identification of the ASTANK 2 plant.
Many signals are displayed in both schemes. Nevertheless, when simulation is employed to evaluate the regulators fitness, signals plotting is suppressed in order to speed up the search.
For the two metaheuristics (AHCA and IFA), the configuring parameters are listed in Table 2, where, beside P , K , S , I 0 , λ , the following notations are used: M is the maximum number of mutations per climber, δ is the climber’s altitude relative accuracy, P e is the number of elite climbers (see [29] for details of AHCA), ρ min is the relative lower bound of the search space, ρ max is the relative upper bound of the search space.
The last two notations are useful to confine the search space for IFA. Assume AHCA provided a sufficiently accurate optimal solution, x o AHCA . Then the boundaries of search space for fireflies are: x min = ρ min x o AHCA and x max = ρ max x o AHCA .

3.2. Metaheuristic Optimization Results

Before running AHCA and IFA, the PID-R regulators were tuned by means of the well-known Ziegler–Nichols empirical method [7]. The resulting parameters of PID-R controllers are listed in Table 3 (where K u is the critical gain that pushes the system to stability limit, with oscillations of period T u ).
After simulation with step references, the I/O signals of PID-R controllers are displayed in Figure 13 (<raw> idmo) Figure 14 (<spline> idmo). Channels 1 and 2 are represented on top and at bottom of figures, respectively. Additionally, variation of commands and outputs are depicted to the left side and right side of figures, respectively. The commands are represented in blue (left side) and the outputs in red (right side). All references are tracked in both cases, but the I/O signals are smoother for <spline> idmo than for <raw> idmo. This is proven by the corresponding fitness values in Table 3 as well (73.12% versus 70.12%). It is well known that Ziegler–Nichols method usually yields oscillating commands, but the variations for <raw> idmo are unacceptable (Figure 13). In the case of <spline> idmo (Figure 14), while the first command can be marginally accepted, the second command is still too variable. The results after running the two metaheuristics are now analyzed. In Table 4, some running performances of AHCA and IFA are given, such as the final number of iterations, k ; the surviving counter of best climber/firefly, n s ; the total number of mutations applied to climbers, m ; the total number of fitness evaluations n Φ ; and the optimal fitness, Φ o .
The algorithms were run on a regular computer at current technological levels. Usually, the exploration by AHCA takes about 20 min, whereas the exploitation by IFA is about 90 min long. (The optimal PID-N controllers were found to be a few minutes faster than the optimal PID-R controllers.) The difference between the two durations is due to the fact that the climbers are only employed to find the most promising zone where the optimum could exist. Inside that zone, as the fitness rather exhibits fractal variations, the climbers cannot use their compasses based on local gradient evaluation and, therefore, AHCA usually oscillates. Fireflies do not use the gradient to fly, but IFA is not as efficient as AHCA. Consequently, the configuring parameters were set to allow longer search durations and, thus, to increase the optimal point accuracy. The number of fitness evaluations, n Φ , is much higher for IFA than for AHCA, which means the search for optimum is more intense in the case of fireflies than in the case of climbers. One can see that both algorithms complete the search after the best optimal climber or firefly has survived at maximum (see parameters S and counters n s in Table 2 and Table 4, respectively) and not after maximally iterating the positions updating (see parameters K and counters k , respectively). There is one exception; the optimal PID-R for <spline> idmo was found with a maximum number of iterations (100), but the surviving factor was almost maximum too (29 instead of 30). For AHCA, an interesting parameter is m , with values starting from 4192. Mutations are applied to blocked climbers on local peaks, for which the fitness cannot increase by using the gradient. The purpose of mutation is to throw the climber on another slope of fitness hyper-surface in the hope that, from there, it can continue to climb. Good exploration of search space is thus ensured. This short analysis proves that, very likely, the best local optimum was found by combining the two metaheuristics.
Looking again at Table 4, one can see that the optimal fitness of climbers is smaller than the optimal fitness of fireflies. Nevertheless, the difference is not so big. Furthermore, this difference can barely be observed when comparing the corresponding I/O signals in Figure 15, Figure 16, Figure 17 and Figure 18. (The signals are arranged exactly like in the case of Figure 13 and Figure 14.) Additionally, the optimal PID controllers for <spline> idmo are slightly fitter than the optimal ones for <raw> idmo, as expected. However, one can notice that both PID-N and PID-R controllers exhibit almost the same fitness for the same idmo, which does not meet the initial expectations. Normally, the commands the PID-N controller provides should have been smoother than the commands of the PID-R controller. Or, the command smoothness is almost the same for both PID controllers. One can notice, though, a slight improvement for PID-N commands in the case of <spline> idmo.
The parameters of optimal PID controllers found by IFA are listed in Table 5. The optimal PID-R parameters are very different from the ones in Table 3, especially in the case of derivative time constant ( T d ). Not only the parameters are different, but the I/O signals are as well, as revealed by Figure 15, Figure 16, Figure 17 and Figure 18. Interestingly, the best PID controller found (PID-N for <spline> idmo) works with a PI rule on the first channel (see the null T d , 1 in Table 5), whilst the derivative time constant on the second channel is at least 70 times larger than the other derivative time constants on that channel. Simulations proved that the command on channel 2 mastered very well both output channels, which, in turn, were less sensitive to the variations of command on channel 1.
Moreover, as seen in Figure 15 and Figure 17, corresponding to <raw> idmo, the command u 2 exhibits saturation of e-v voltage at 10 V on the first 100 s of transient zone. Though this may have speeded up the references tracking on output channels, saturating the voltages at their upper limit is to be avoided in order to protect the e-v. Fortunately, saturation does not occur in the case of <spline> idmo (Figure 16 and Figure 18), which constitute an important advantage of this model.
Another interesting characteristic concerns the outputs. In all variations above, the output signals are like step responses of a second order system, corrupted by some noises.
This allows some supplementary performance parameters (beside the fitness) to be estimated, provided that the noise can be filtered. Such a filter can be designed by identification of each noisy output with the ideal step response of order II.
In Appendix A, the identification method is briefly described. Let y j , II ( ζ , ω , τ ) ) be the identified step response of order II corresponding to output y j ( j { 1 , 2 } . Then, after performing identification on outputs in Figure 15, Figure 16, Figure 17 and Figure 18, the matched step responses of order II are depicted in Figure 19.
Starting from y j , II ( ζ , ω , τ ) ( j { 1 , 2 } ), several specific performances can be evaluated. In Appendix B, the most important performance parameters are defined. Table 6 encompasses the values of performance parameters corresponding to signals in Figure 19.
The damping factor ζ in the table shows that all outputs are under damped, although the relative overshoot RO is noticeably bigger on the second channel compared to the first channel (where this parameter is very small). Nevertheless, the maximum RO is less than 10% of reference for all controllers, which constitutes a good performance. The natural pulsation ω is slightly bigger on the second channel. This property is confirmed by the parameter T u in Table 3 (smaller for the second channel) and the small, damped oscillations of y 2 in Figure 15, Figure 16, Figure 17, Figure 18 and Figure 19. On channel 1, an intrinsic delay τ between 9 and 11 s was detected, which corresponds to variations of y 1 in Figure 15, Figure 16, Figure 17, Figure 18 and Figure 19. The controllers working with <spline> idmo seem to be slightly faster than the ones synthesized for <raw> idmo, not only in terms of intrinsic delay, but also when looking at the other time parameters: shorter time delay τ d , rise time τ r and settling time τ s . However, PID-N controllers are not necessarily better than PID-R controllers, according to the parameters in Table 6. In the last column of the table, the estimated transient time N t is shown for each controller. This parameter is compared with the settling time, τ s , to validate the estimation method described in Section 2.3 One can notice that the approximation is fair. Nevertheless, recall that τ s is computed for a clearly specified tolerance tube around the reference in the steady-state zone (set to ± 5 %), whereas this specification is not employed in estimation of N t .

3.3. Robustness Analysis

Controllers can or cannot be robust in several respects. Four types of robustness are investigated within this subsection: (a) against sudden change of references; (b) against constant perturbations on outputs; (c) against stochastic perturbations on outputs; and (d) against idmo uncertainties (stochastic variations of model parameters). The reason such an analysis is developed hereafter is twofold. On one hand, very often, installations like ASTANK2 do not comply with the theoretical hypotheses founding the very sound robustness theory devised in the literature. The hypotheses regarding the nature and power of exogenous noises usually are violated. Since such hypotheses only are sufficient (but not necessary) conditions of robustness, the fact they are not verified does not mean the controller cannot be robust to some extent. So, robustness has to be tested in order to estimate robustness margins without employing theoretical results in this aim. On the other hand, robustness analysis of such a real-world plant (especially the robustness against model uncertainties) are very useful in practice. Knowing the robustness margins, even with satisfactory accuracy, can help in predicting the mean time before failure or the right instant to act in correcting defects (not too soon, not too late). This may result in a better maintenance of installation, with optimally small costs.

3.3.1. Robustness against Sudden Change of References

The Simulink model of Figure 10 and Figure 11 with inputs of Figure 12 were employed to test this type of robustness. More specifically, the step references were replaced by staircases. The performance of each PID controller was evaluated by means of fitness. Unlike fitness in (22), in this case, the fitness was computed according to the procedure described in Appendix C. Several staircase references were tested. Overall, if the references steps comply with ASTANK2 limitations, in all tested scenarios, the outputs succeed to track them, which means this type of robustness is accomplished (although with different fitness values, for different references).
To illustrate the tracking performance, the matrices of variations in Figure 20 and Figure 21 were built. In Figure 21, the results correspond to switched staircase references of Figure 20. Additionally, each row of matrix exhibits I/O signals of a controller, as specified on the graphical windows. (Many of the following figures have the same structure.)
The best fitness values are obtained by the PID-N controller with <raw> idmo (77.84% and 76.96%), for which the commands better follow their static references and the outputs better track the specified references. The second best is the PID-R controller with <spline> idmo (75.18% and 74.99%). Additionally, one can easily see that channel 1 is less robust than channel 2, where the references are sensibly better tracked. This phenomenon probably is due to the fact the first tank of installation, with a slanted face, induces stronger dynamic non linearities than the second tank (a regular parallelepiped). Hence, the first linear MISO idmo is not as accurate as the second MISO idmo when approximating the nonlinearities of the ASTANK2 plant.

3.3.2. Robustness against Constant Perturbations on Outputs

Two constant perturbations were artificially added to each output, while keeping constant the reference: the first one above the reference and the second one, later, beneath the reference. Additionally, the perturbations were not synchronized between channels. The simulation results are displayed by the matrix of variations in Figure 22. All four controllers succeeded in rejecting the constant perturbations, but no one had sensibly better fitness. The commands were slightly smoother in the case of <spline> idmo.

3.3.3. Robustness against Stochastic Perturbations on Outputs

The previous simulations were performed by using two sources of Gaussian white noise with variances estimated after ASTANK2 identification (see the last column of Table 1).
To investigate controllers robustness against stochastic perturbations, the variances of noises generators were varied in range 0 , λ max 2 , where λ max 2 was experimentally set to 1 (after few simulations). The problem is how to define and estimate the robustness margin. The fitness can be used for this aim. Obviously, the fitness decreases when noises increase in power, as the variation in Figure 23a illustrates. Here, the horizontal index points to the noise variance. In this example, N = 31 noise variance levels are employed within the interval [ 0 , 1 ] . Thus, if the index is set to n 1 , N ¯ , then the two noises have the same variance λ 1 , n 2 = λ 2 , n 2 .
The problem with fitness is that, apparently, the robustness margin can only be set by subjective means while visually inspecting the I/O signals of the plant. Clearly, the marginal behavior of a closed loop system is expressed by outputs that oscillate around references with approximately constant amplitudes. However, there is a fine line between various oscillating behaviors. Hence, setting the right robustness margin becomes a difficult task. To remove the subjectiveness, a supplementary parameter can be employed. Consider the tracking errors on the steady-state zone for all I/O signals (commands and outputs). Evidently, when the noise variance increases, the std of each tracking error increases as well.
Therefore, a global std on the steady-state zone can be computed as follows (with natural notations related to I/O signals):
σ ssz = α σ ε y , 1 ssz + σ ε y , 2 ssz + β 2 σ ε u , 1 ssz + σ ε u , 2 ssz ,
where the weights α and β are the ones employed to compute fitness (see definition (21)), e.g. α = 0.35 and β = 0.3 . Such a global std varies as shown in Figure 23b. The variation is increasing with the noise index, as expected.
Since the fitness decreases and the variance increases, a natural way to quantify the robustness margin is to normalize both variations and to define a cost function by taking their product. More specifically, one can define J Φ norm σ norm ssz , where:
Φ norm Φ min n 1 , N ¯ Φ [ n ] max n 1 , N ¯ Φ [ n ] min n 1 , N ¯ Φ [ n ]   and   σ norm ssz σ ssz [ n ] min n 1 , N ¯ σ ssz [ n ] max n 1 , N ¯ σ ssz [ n ] min n 1 , N ¯ σ ssz [ n ] .
Figure 23c shows the variation of cost function J . The maximum point, n max , can be set to the index of robustness margin. The robustness margin is then defined as n max , Φ n max . If the exogenous noises lead to fitness values at least equal to Φ n max , then one considers the controller is robust. Otherwise, the controller is not performing well. Nevertheless, it is possible that the closed loop system remains at stability limit even outside the robustness zone.
After simulations with step references and variable noise variances, the results in Figure 24 were obtained. In fact, in the figure, the noise variance was replaced by the estimated SNR, on each channel, computed on the steady-state zone of outputs. The fitness surfaces in Figure 24 are split in two regions by a horizontal plane determined after maximization of cost function J . One considers that all points on the surface above the plane are due to the robust behavior of controller. The height of each separation plan is listed in Table 7, together with the corresponding marginal SNR. The lower the separation plan height, the larger the robustness zone of the controller. One can notice that the PID-N controller for <spline> idmo is slightly more robust than the other three controllers. Additionally, every controller can be robust if one noise is strong while the other one is weak.
Another remark concerns the robustness surface: large fitness values cover a larger area for <raw> idmo than for <spline> idmo. This means that, in general, the stochastic noises are better rejected by PID-R and PID-N controllers determined for <raw> idmo than by the other two controllers.
The I/O signals at the robustness margin are shown by the matrix of variations in Figure 25. Such behavior is considered as robust. Many other situations with similar I/O variations exist, but the robustness is decided by fitness margins in Table 7.

3.3.4. Robustness against Identification Model Uncertainties

The uncertainties are induced by changing the coefficients of idmo polynomials. Assume P is any of the model polynomials, expressed as:
P q 1 = p 0 + p 1 q 1 + + p n p q n p .
Then, the coefficient p i ( i 1 , n p ¯ ) is replaced by a (uniform) random value in the interval 1 η , 1 + η p i , if p i 0 or in the interval η , + η , if p i = 0 . The parameter η [ 0 , 1 ] is referred to as uncertainty power.
The problem is to define and determine the robustness margin of a PID regulator, while working with uncertain model polynomials and variable uncertainty powers. Obviously, the PID performance is expressed in terms of fitness. Nevertheless, to solve the problem of uncertainty margin detection, the fitness needs to be put into correspondence with the reference tracking property. One can consider that the uncertainty margin is reached as soon as the closed loop system is unable to track at least one output reference signal. In this case, the polynomials are affected by uncertainties of some power, whilst the closed loop system exhibits a marginal fitness. Thus, the uncertainty margin can be defined by the smallest fitness value for which the closed loop system still manages to track all given references. This lower limit also reveals the marginal (maximal) values of uncertainty power. For example, the robustness margin of 75% (in terms of fitness) can be obtained by affecting the plant model with uncertainties of estimated marginal (maximal) power of 10% ( η [ 0 , 1 ] ). Increasing the uncertainty power leads to the incapacity of the closed loop system to track references.
In the following, an example is given. The output y 1 of ASTANK2 installation is acquired after applying uncertainties on the numerator and denominator of the useful transfer function in MISO1 idmo (see Figure 1b again). The uncertainties were generated at random, by using the uniform pseudo-random generator of MATLAB (rand function).
The uncertainties can affect the 3 polynomials of useful transfer function, namely: A 1 , B 1 , 1 and B 1 , 2 . As Equation (1) shows, the first coefficient of polynomials is normalized: 1 for A 1 and 0 for B 1 , 1 , B 1 , 2 . Uncertainties cannot affect this coefficient. By inducing uncertainties on the remaining coefficients, a fitness surface can be generated, depending on two uncertainty powers: one affecting the denominator A 1 and another one modifying the numerators B 1 , 1 , B 1 , 2 . The ASTANK2 idmo usually have polynomials with many coefficients (up to 50, in some cases). Trying to test all combinations of uncertainty applied on model coefficients is unrealistic. Therefore, the Monte-Carlo method can be employed to estimate the uncertainty margin. Hence, 100 uncertainty cases are uniformly generated at random on each axis. The resulted fitness surface looks like that in the left side of Figure 26. The estimated fitness margin is represented by the horizontal plane intersecting the fitness surface. All points above the plane correspond to the robust behavior of the closed loop system. The other fitness values, beneath the plane, rather reveal the incapacity of the closed loop system to track at least one reference. As the figure clearly shows, there are cases in which the robustness is preserved even though one uncertainty power is high and the other one is low. Consequently, it is quite difficult to determine the marginal powers if they are different. It is more suitable to determine such a marginal power along the main diagonal of the separation plane, where the two powers are equal. In the right side of Figure 26, the fitness variation along the diagonal (with equal uncertainty powers) is displayed. The horizontal line refers to the separation plane.
One can see that the most fitness values are beneath this line, as expected. Increasing the uncertainty power naturally leads to the loss of robustness. Therefore, to estimate the robustness margin, one should focus on the zone with small uncertainty powers. In the figure above, one can easily notice that the marginal uncertainty power is less than 10%.
The problem with fitness is the same as in the previous subsection; apparently, the robustness margin can only be set by subjective means, while visually inspecting the I/O signals of the plant. For example, the first two output signals in Figure 27 reveal that the system is unable to track the reference, but is very close to this goal. The fitness equals 73.98% with 5% uncertainty power and 74.03% with 4.9% uncertainty power, respectively. By decreasing the uncertainty power, the last two output signals in Figure 27 were obtained. At 74.37% fitness with 4.75% uncertainty power, the reference started to be tracked in the end of variation (see the third signal of figure). Furthermore, decreasing the uncertainty power to 4.6% leads to a fitness of 74.5% and to an output that succeeds in reaching the reference sooner than previously (see the last signal). In this case, the robustness margin can be set to 74.4% fitness with 4.7% uncertainty power. The estimation of uncertainty margin is fair but subjectively set.
The robustness margins can thus be estimated by varying the separation plane and analyzing the cases leading to fitness values close to the plane height. If the uncertain idmo that leads to fitness values above and beneath the plane height still allow tracking of the references, then the plane should be lowered. On the contrary, if the idmo with fitness values around the plane height yield loss of robustness, then the plane should be raised. The separation plane is placed at the right height when the idmo with fitness below that height cannot allow reference tracking, whereas for the other idmo, with fitness above the height, the references are eventually tracked. Because of the noises corrupting the data, such a balanced behavior can be discovered experimentally, as a theoretical approach on this topic is difficult (if not impossible) in this case.
For ASTANK2 installation, three scenarios can be investigated: (a) affect MISO1 model by uncertainties and the keep the genuine MISO2 model; (b) switch MISO models (keep the genuine MISO1 and work with uncertain MISO2); (c) induce uncertainties on both MISO models. After several simulations, it has been noticed that output y 1 is more sensitive to idmo uncertainties than output y 2 . This means the controller loses robustness because of y 1 in the first. Therefore, in the following figures, only y 1 is displayed.
Figure 28, Figure 29 and Figure 30 display the simulation results corresponding to the three scenarios mentioned above. Each figure includes a matrix of variations, as usual, but with different representations from the previous figures.
In all figures, the fitness surface obtained by Monte-Carlo method takes the first column of matrix. The second column displays the diagonal of fitness surface. The last two columns are devoted to output y 1 in two cases: non robust (column 3) and robust (column 4). The corresponding fitness values of closed loop system for columns 3 and 4 are below and above the estimated marginal fitness of robustness zone, respectively.
The simulation scenarios providing the results in Figure 28, Figure 29 and Figure 30 offer further parameters allowing analyzing robustness. Hence, the robustness zone can be confined by: the marginal fitness Φ min ; the marginal uncertainty power η max ; the relative density ρ of robust behavior; the relative robustness margin μ . The first two parameters ( Φ min and η max ) are determined experimentally. The height of separation plane is set to Φ min . The fitness values Φ down and Φ up corresponding to variations of output y 1 in Figure 28, Figure 29 and Figure 30 are close to each other.
Moreover, Φ down < Φ min < Φ up , which proves that Φ min is fairly accurate. The marginal uncertainty power η max was determined by using the fitness diagonal drawn in column 2 of graphical matrices. The principle illustrated in Figure 26 was used in this aim.
The other two parameters ( ρ and μ ), although conventionally defined, allow performing a top of controllers with respect to robustness against uncertainties. Since the Monte-Carlo method is employed to draw fitness surfaces, one can compute the ratio between the number of robust behaviors and the number of all behaviors (10.000). If this ratio is multiplied by 100, the relative density ρ of robust behavior is estimated. Now, one controller is more robust than another if Φ min is as small as possible, whilst η max and ρ are as big as possible. Then, the relative robustness margin μ can be defined as:
μ = 100 1 + σ Φ min ρ η max   [ % ] ,
where σ > 0 is a constant scaling factor set to 0.04, such that μ can vary in a suitable range (recall the explanation between Equations (15) and (16)).
The robustness parameters are listed in Table 8, for all four controllers, in all scenarios. Without the last column, Table 8 is rather confusing and says almost nothing. The μ parameter can enlighten the closed loop behavior against model uncertainty.
The first clear insight is that the PID controllers for <raw> idmo are noticeably more robust to uncertainties than the PID controllers for <spline> idmo. This can be explained by the fact the <spline> idmo has a reduced number of poles, which are more exposed to the loss of stability in a way that the PID controllers cannot compensate. Secondly, among controllers for <raw> idmo, PID-R is slightly more robust than PID-N when coping with uncertainties that affect one MISO model at a time, whereas when both models are corrupted, PID-N seems to be the best (62.65% versus 45.97%). Thirdly, for <spline> idmo, the PID-R controller is better than the PID-N controller, in terms of robustness, in all scenarios. To conclude this analysis, one can notice that, regardless of the idmo type, robustness of MISO2 is superior to robustness of MISO1, as expected (since, in all simulations, output y 1 loses its tracking ability before output y 2 ). Moreover, another expectation is met: the relative robustness margin of the entire ASTANK2 idmo (in the last scenario) is the smallest one (compared to the other two scenarios).

4. Concluding Remarks and Future Developments

The main goal of this article was to perform an extensive analysis of metaheuristic PID control applied to a nonlinear installation such as ASTANK2, after identification with linear multi-MISO models. Two PID configurations were investigated, PID-R and PID-N, for each identification model type, <raw> and <spline>. Two metaheuristics were employed in the design of four optimal controllers: AHCA to extensively explore the search space, and IFA to intensively exploit a restricted zone around some promising optimal point found by climbers. Four improvements of classical FA were introduced in order to fasten the search and increase the final results accuracy. Defining a fair cost function (referred to as fitness in the article) is not an easy task. Many other authors coped with the same difficult problem, as reported in their publications. Unfortunately, to the best of our knowledge, no general cost function can be defined to be employed in any automatic control optimization problem. Therefore, adapting the cost function to the installation characteristics (and limitations) seemingly is a wise way to proceed.
The simulation results revealed the performance as well as the limitations of designed controllers. Overall, one can say that any of the four PID controllers can be employed in a closed loop with an ASTANK2 installation, as they exhibit almost the same performance. Basically, PID-R controllers are recommended to reject model uncertainties, whilst PID-N controllers are better in tracking staircase type references.
Various future research directions can be approached. A multivariable (non-decentralized) PID control structure likely yields superior performance. Another development is possible in the direction of metaheuristic multivariable RST control. Of course, the metaheuristic control based on state space representation of ASTANK2 installation is another interesting direction to investigate.

Author Contributions

Both authors equally contributed to conceptualization; methodology; software; validation; formal analysis; investigation; using resources; original draft preparation writing, review and editing; visualization; supervision. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

To the best of their knowledge, the authors declare no conflicts of interest.

Abbreviations

A–RAkaike–Rissanen (criterion)
AHCAAdvanced Hill Climbing Algorithm
BJBox-Jenkins (model)
FAFirefly Algorithm
I/Oinput/output (signals, behavior etc.)
IFAImproved Fireflies Algorithm
MIMOMulti-Input–Multi-Output (model)
MISOMulti-Input–Single-Output (model)
PIDProportional–Integral–Derivative
PID-Nnon-standard PID
PID-Rregular PID
RMSEroot mean square error
SISOSingle-Input–Single-Output (model)
SNRSignal-to-Noise Ratio
e-velectro-valve(s)
idmoidentification model(s)
stdstandard deviation

Appendix A. Identification of Second Order Step Response from Noisy Signals

Consider the usual transfer function of a second order system (in continuous time):
H ( s ) = ω 2 e s τ s 2 + 2 ζ ω s + ω 2 ,
where ω > 0 is the natural pulsation ([rad/s]), ζ 0 is the (relative) damping factor and τ 0 is the intrinsic delay. When stimulating the system with a unit step, four types of responses are possible, depending on the dumping factor:
  • Harmonic oscillation, when ζ = 0
    y ( t ) = 1 cos ω ( t τ ) ,   t τ .
  • Under damped signal (with overshoot), when ζ ( 0 , 1 ) :
    y ( t ) = 1 e ζ ω ( t τ ) 1 ζ 2 1 ζ 2 cos ω d ( t τ ) + ζ sin ω d ( t τ ) ,   t τ ,
    where ω d = ω 1 ζ 2 is the damped pulsation of system.
  • Critically damped signal, when ζ = 1 :
    y ( t ) = 1 1 + ω ( t τ ) e ω ( t τ ) ,   t τ .
  • Over damped signal (without overshoot), when ζ > 1 :
    y ( t ) = 1 1 2 ζ 2 1 e ζ + ω ( t τ ) ζ + e ζ ω ( t τ ) ζ ,   t τ ,
    where ζ ± = ζ ± ζ 2 1 .
During the delay, the response is set to null (although, by using the equations above in a mathematical sense, the response is non null).
In case of noisy signals looking like a step response of order II, the identification problem can be formulated by means of a quadratic criterion. More specifically, if y is such a signal (in discrete time) and y II ( ζ , ω , τ ) is any of the step responses (A2)–(A5), then the following quadratic cost function has to be minimized:
V ( ζ , ω , τ ) = n = 0 N 1 y n T s y II ( ζ , ω , τ ) n T s 2 ,
where ζ 0 (the damping factor), ω > 0 (the natural pulsation) and τ 0 (the intrinsic delay) completely determine the response y II ( ζ , ω , τ ) . Additionally, N is the total number of samples and T s > 0 is the sampling period (in seconds).
As one can easily notice, the response y II ( ζ , ω , τ ) is nonlinear with respect to the three parameters. Consequently, solving the quadratic optimization problem is not an easy task. Moreover, the criterion can exhibit large flat zones where the global minimum may lie. In Figure A1, criterion surfaces were drawn for each output of ASTANK2 plant ( y 1 —the left side couple, y 2 —the right side couple).
Figure A1. Quadratic criterion surfaces in identification of second order step response.
Figure A1. Quadratic criterion surfaces in identification of second order step response.
Electronics 10 01101 g0a1
The images 1 and 3 reveal how large the flat zone can be. The surface includes all four types of second order responses. For output y 1 , the intrinsic delay is set to about 11 s, whereas, for the output y 2 , τ = 0 s. A zoom on the plateau is displayed in images 2 and 4. Despite what the images 1 and 3 suggest, the plateau is not so flat. It seems that the global optimum lies somewhere in this apparently flat zone.
To solve the optimization problem, a numerical procedure is needed. Given the optimization criterion expression, an appropriate numerical recipe can be selected from the variable advancing step, gradient based class. The variable step allows fast jumps towards the global optimum in the flat zone. The Newton–Raphson method [31] is a good candidate. However, this method involves computing and inverting the Hessian matrix of quadratic criterion, which is both difficult and time consuming. The Gauss–Newton method is better, since the Hessian matrix is approximated by only using the gradient of quadratic criterion (see the details of this method in [31]). To implement the Gauss–Newton method, the gradient of quadratic criterion is needed. Fortunately, this gradient can be evaluated in closed form, as shown next. The gradient expression of is
V ( ζ , ω , τ ) = ζ ω τ T V ( ζ , ω , τ ) = 2 n = N o N 1 y n T s y II ( ζ , ω , τ ) n T s y II ( ζ , ω , τ ) n T s .
It suffices to derive the expression of second order response. The responses (A2)–(A5) are processed next. Note that all gradients below are null for t < τ . Hence:
  • Harmonic oscillation ( ζ = 0 ):
    y II ( 0 , ω , τ ) ( t ) = 0 ( t τ ) sin ω ( t τ ) ω sin ω ( t τ ) T ,   t τ .
  • Under damped signal ( ζ ( 0 , 1 ) ):
    ζ y II ( ζ , ω , τ ) ( t ) = e ζ ω ( t τ ) 1 ζ 2 ω ( t τ ) cos ω d ( t τ ) 1 1 ζ 2 sin ω d ( t τ ) ω y II ( ζ , ω , τ ) ( t ) = e ζ ω ( t τ ) 1 ζ 2 sin ω d ( t τ ) τ y II ( ζ , ω , τ ) ( t ) = ω e ζ ω ( t τ ) 1 ζ 2 sin ω d ( t τ ) = ω ω y II ( ζ , ω , τ ) ( t ) ,   t τ .
  • Critically damped signal, ( ζ = 1 ):
    y II ( 1 , ω , τ ) ( t ) = 0 ω ( t τ ) 2 e ω ( t τ ) ω 2 ( t τ ) e ω ( t τ ) T ,   t τ .
  • Over damped signal ( ζ > 1 ):
    ζ y II ( ζ , ω , τ ) ( t ) = e ζ + ω ( t τ ) e ζ ω ( t τ ) 2 ζ 2 1 3 + ω ( t τ ) e ζ + ω ( t τ ) + e ζ ω ( t τ ) ζ 2 1 ω y II ( ζ , ω , τ ) ( t ) = ( t τ ) e ζ + ω ( t τ ) e ζ ω ( t τ ) 2 ζ 2 1 τ y II ( ζ , ω , τ ) ( t ) = ω e ζ + ω ( t τ ) e ζ ω ( t τ ) 2 ζ 2 1 ,   t τ .

Appendix B. Performance Parameters of Second Order Step Response

The quality of a step response provided by the order II system (A1) is analyzed according to following parameters, also indicated in Figure A2:
Figure A2. Main performance parameters of second order step response.
Figure A2. Main performance parameters of second order step response.
Electronics 10 01101 g0a2
  • Time constant of second order system:
    T = 1 ζ ω   [ s ] .
  • Relative overshoot (only in under damped case, ζ ( 0 , 1 ) ):
    RO = 100 exp ζ π 1 ζ 2   [ % ] .
It shows how far from step reference the maximum of system response can rise. Therefore, RO is computed relatively to the reference height.
c.
Peak time (only in under damped case, ζ ( 0 , 1 ) ):
τ p = π ω 1 ζ 2 + τ   [ s ] .
It points to the time instant of when the response reaches its maximum. Note that the time delay τ adds to the maximum point value.
d.
Delay time, τ d . It stands for the necessary duration of response to rise from 0% to 50% of reference signal. In case of under damped response ( ζ ( 0 , 1 ) ), τ d is:
τ d = 1 + 0.7 ζ ω + τ   [ s ] .
For the critically damped or over damped responses ( ζ 1 ), closed form expressions are impossible to derive. Therefore, in such cases, the equation that gives τ d can be solved by numerical algorithms. An easy way to approximate τ d is as follows: express the condition y ( t ) = 0.5 ; expand the exponentials in Taylor series up to the 7-th term (as it is well known that the exponential is accurately approximated by such an expansion); compute the coefficients of polynomial that results and derive its roots; among them, there is a unique, real valued, positive root, which stands for τ d .
e.
Rise time, τ r .This is the necessary duration of response to rise from a lower bound to a higher bound expressed as percentages from the reference. In case of under damped response ( ζ ( 0 , 1 ) ), the bounds are 0% and 100%, which leads to the following closed form expression:
τ r = π arctan 1 ζ 2 ζ ω 1 ζ 2 + τ   [ s ] .
For the critically damped response ( ζ = 1 ), the bounds are 5% and 95%, respectively. For over damped responses ( ζ > 1 ), the bounds are 10% and 90%, respectively. Like in case of rise time, it is not possible to derive closed form expressions of τ r . Nevertheless, numerical procedures are available. The 7-th term expansion approach, previously described, can be considered as well.
f.
Settling time, τ s . This parameter is equal to the duration of transient zone, also known as transient time. Normally, the steady-state zone is supposed to begin when the response enters and remains within a tolerance tube around the reference. Usual tubes are form ±2% to ±10%; in case of 10% tube width (i.e., by taking a ±5% tolerance tube), τ s can be computed differently, depending on damping factor. If the response is under damped ( ζ ( 0 , 1 ) ),then:
τ s = τ log 0.5 1 ζ 2 ζ ω = τ T log 0.5 1 ζ 2   [ s ] .
Otherwise, an empirical expression is currently employed (for ±5% tolerance tube):
τ s = 3 T + τ   [ s ] .

Appendix C. Computing Fitness for Staircase References

The computing procedure of fitness is easier to understand following the example of Figure A3. Unlike for the outputs, for the inputs, the references need to consider the couple of output references at each time instant. Therefore, as the figure displays, seven zones have to be considered to extract input references from the static table. Each change of an output reference creates a delimiter for a new zone. In the example of Figure A3, each new zone preserves one output reference and changes the other one.
However, both output references can change at the same time as well, without affecting the input references extraction procedure. The main zones 1, 3, 5 and 7 have longer durations than the secondary zones 2, 4 and 5.
Like in the case of single step references, there are three fitness components to compute two for the outputs ( ϕ 1 y , ϕ 2 y ) and one for both inputs ϕ 12 u .
Figure A3. Principle of fitness evaluation for output references of staircase type.
Figure A3. Principle of fitness evaluation for output references of staircase type.
Electronics 10 01101 g0a3
For each output, the fitness is computed by processing all the steps of corresponding staircase. Let N j s be the number of steps exhibited by the staircase of channel j { 1 , 2 } (e.g., N 1 s = N 2 s = 4 , as in Figure A3). Then:
ϕ j y 1 N i = 1 N j s n i ϕ j , i y ,
where n i is the duration of current step i 1 , N j s ¯ . Obviously, i = 1 N j s n i = N (the duration of all signals). In the weighted average of (A19), the fitness of current step, ϕ j , i y , is computed like in case of single step output reference (see Equation (17)). For the two input signals, the fitness is a weighted average as well
ϕ 12 u 1 N i = 1 N 12 z n i ϕ 12 , i u ,
where N 12 z is the number of zones to extract the input references for (e.g., 7 in the previous figure); n i is the duration of current zone i 1 , N 12 z ¯ (with i = 1 N 12 z n i = N ); ϕ 12 , i u is the fitness of current zone i 1 , N 12 z ¯ , computed like in case of step output references (see Equation (A20)).
Overall, the fitness is computed by considering that the controllers are optimal. Therefore, in the refined definition of step references fitness (22), only the third case is employed
Φ α ϕ 1 y + ϕ 2 y + β ϕ 12 u .

References

  1. Bhookya, J.; Jatoth, R.K. Fractional Order PID Controller Design for Multivariable Systems using TLBO. Chem. Prod. Process. Model. 2020, 15. [Google Scholar] [CrossRef]
  2. Jitwang, T.; Puangdownreong, D. Application of Cuckoo Search to Robust PIDA Controller Design for Liquid-Level System. Int. J. Innov. Comput. Inf. Control. 2020, 16, 189–205. [Google Scholar] [CrossRef]
  3. Soued, S.; Ebrahim, M.A.; Ramadan, H.S.; Becherif, M. Optimal Blade Pitch Control for Enhancing the Dynamic Performance of Wind Power Plants via Metaheuristic Optimizers. IET Electr. Power Appl. 2017, 11, 1432–1440. [Google Scholar] [CrossRef]
  4. Coelho, L.D.; Mariani, V.C. Firefly Algorithm Approach Based on Chaotic Tinkerbell Map Applied to Multivariable PID Controller Tuning. Comput. Math. Appl. 2012, 64, 2371–2382. [Google Scholar] [CrossRef] [Green Version]
  5. Rodriguez-Molina, A.; Mezura-Montes, E.; Villarreal-Cervantes, M.G.; Aldape-Perez, M. Multi-Objective Meta-Heuristic Optimization in Intelligent Control: A Survey on the Controller Tuning Problem. Appl. Soft Comput. 2020, 93. [Google Scholar] [CrossRef]
  6. Vijayakumar, K.; Manigandan, T. Nonlinear PID Controller Parameter Optimization using Enhanced Genetic Algorithm for Nonlinear Control System. Contr. Eng. Appl. Inform. 2016, 18, 3–10. [Google Scholar]
  7. Ziegler, J.G.; Nichols, N.B. Optimum Settings for Automatic Controllers. Trans. ASME 1942, 64, 759–768. [Google Scholar] [CrossRef]
  8. Moharam, A.; El-Hosseini, M.A.; Ali, H.A. Design of Optimal PID Controller Using Hybrid Differential Evolution and Particle Swarm Optimization with an Aging Leader and Challengers. Appl. Soft Comput. 2016, 38, 727–737. [Google Scholar] [CrossRef]
  9. Janprom, K.; Permpoonsinsup, W.; Wangnipparnto, S. Intelligent Tuning of PID Using Metaheuristic Optimization for Temperature and Relative Humidity Control of Comfortable Rooms. J. Control. Sci. Eng. 2020. [Google Scholar] [CrossRef] [Green Version]
  10. Hernandez-Osorio, M.A.; Ochoa-Velasco, C.E.; Garcia-Alvarado, M.A.; Escobedo-Morales, A.; Ruiz-Lopez, I.I. Sequential synthesis of PID controllers based on LQR method. Rev. Mex. Ing. Quim. 2020, 19, 913–928. [Google Scholar] [CrossRef]
  11. Pradhan, J.K.; Ghosh, A.; Bhende, C.N. Two-Degree-of-Freedom Multi-Input Multi-Output Proportional-Integral-Derivative Control Design: Application to Quadruple-Tank System. J. Syst. Control Eng. 2019, 233, 303–319. [Google Scholar] [CrossRef]
  12. Serradilla, F.; Canas, N.; Naranjo, J.E. Optimization of the Energy Consumption of Electric Motors through Metaheuristics and PID Controllers. Electronics 2020, 9, 1842. [Google Scholar] [CrossRef]
  13. Azar, A.T.; Ali, N.; Makarem, S.; Diab, M.K.; Ammar, H.H. Design and Implementation of a Ball and Beam PID Control System Based on Metaheuristic Techniques. In Proceedings of the 5th International Conference on Advanced Intelligent Systems and Informatics, Cairo, Egypt, 26–28 October 2019. [Google Scholar]
  14. Wang, P.C.; Zhou, Y.Q.; Luo, Q.F.; Han, C.; Niu, Y.B.; Lei, M.Y. Complex-Valued Encoding Metaheuristic Optimization Algorithm: A Comprehensive Survey. Neurocomputing 2020, 407, 313–342. [Google Scholar] [CrossRef]
  15. Khanduja, N.; Bhushan, B.; Mishra, S. Control of CSTR Using Firefly and Hybrid Firefly-Biogeography Based Optimization (BBFFO) Algorithm. J. Inf. Optim. Sci. 2020, 41, 1443–1452. [Google Scholar] [CrossRef]
  16. Angel, L.; Viola, J.; Vega, M. Metaheuristic Tuning and Practical Implementation of a PID Controller Employing Genetic Algorithms. In Proceedings of the ASME International Design Engineering Technical Conferences and Computers and Information in Engineering Conference, Anaheim, CA, USA, 18–21 August 2019. [Google Scholar]
  17. Neeraj, P.J.; Seema, P.N. Control of Twin Rotor MIMO System using Cross PID Control Technique. In Proceedings of the IEEE International Conference on Communication and Signal Processing, Melmaruvathur, India, 3–5 April 2018; pp. 744–750. [Google Scholar]
  18. Guo, H.R.; Feng, Z.Y.; She, J.H. Discrete-Time Multivariable PID Controller Design with Application to an Overhead Crane. Int. J. Syst. Sci. 2020, 51, 2733–2745. [Google Scholar] [CrossRef]
  19. Stefanoiu, D.; Borne, P.; Popescu, D.; Filip, F.G.; El Kamel, A. Optimization in Engineering Sciences—Metaheuristics, Stochastic Methods and Decision Support. John Wiley & Sons: London, UK, 2014; ISBN 978-1-84821-498-9. [Google Scholar]
  20. Souza, D.A.; de Mesquita, V.A.; Reis, L.L.N.; Silva, W.A.; Batista, J.G. Optimal LQI and PID Synthesis for Speed Control of Switched Reluctance Motor Using Metaheuristic Techniques. Int. J. Control. Autom. Syst. 2021, 19, 221–229. [Google Scholar] [CrossRef]
  21. Goud, H.; Swarnkar, P. Investigations on Metaheuristic Algorithm for Designing Adaptive PID Controller for Continuous Stirred Tank Reactor. MAPAN J. Metrol. Soc. India 2019, 34, 113–119. [Google Scholar] [CrossRef]
  22. Vanchinathan, K.; Valluvan, K.R. A Metaheuristic Optimization Approach for Tuning of Fractional-Order PID Controller for Speed Control of Sensorless BLDC Motor. J. Circuits Syst. Comput. 2018, 27. [Google Scholar] [CrossRef]
  23. Storn, R.; Price, K. Differential Evolution a Simple and Efficient Heuristic for Global Optimization Over Continuous Spaces. J. Glob. Optim. 1997, 11, 341–359. [Google Scholar] [CrossRef]
  24. Nedic, N.; Stojanovic, V.; Djordjevic, V. Optimal Control of Hydraulically Driven Parallel Robot Platform Based on Firefly Algorithm. Nonlinear Dyn. 2015, 82, 1457–1473. [Google Scholar] [CrossRef]
  25. Yang, X.S.; Deb, S. Cuckoo Search Via Levy Flights. In Proceedings of the World Congress on Nature & Biologically Inspired Computing, Coimbatore, India, 9–12 December 2009; pp. 210–214. [Google Scholar]
  26. Cheng, M.Y.; Prayogo, D. Symbiotic Organisms Search: A New Metaheuristic Optimization Algorithm. Comput. Struct. 2014, 139, 98–112. [Google Scholar] [CrossRef]
  27. Mirjalili, S.; Mirjalili, S.M.; Lewis, A. Grey Wolf Optimizer. Adv. Eng. Softw. 2014, 69, 46–61. [Google Scholar] [CrossRef] [Green Version]
  28. Culita, J.; Stefanoiu, D.; Dumitrascu, A. ASTANK2: Analytical Modeling and Simulation. In Proceedings of the 20-th International Conference on Control Systems and Computer Science, CSCS-20, Bucharest, Romania, 27–29 May 2015; Volume 1, pp. 141–148. [Google Scholar] [CrossRef]
  29. Stefanoiu, D.; Culita, J. Joint Stochastic Spline and Autoregressive Identification Aiming Order Reduction Based on Noisy Sensor Data. Sensors 2020, 20, 5038. [Google Scholar] [CrossRef]
  30. Yang, X.S. YAN2009b Firefly Algorithm for Multimodal Optimization. In Stochastic Algorithms: Foundation and Applications; (Ed.) SAGA 2008; Series: Lectures Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2009; pp. 169–178. [Google Scholar]
  31. Borne, P.; Popescu, D.; Filip, F.G.; Stefanoiu, D. Optimization in Engineering Sciences–Exact Methods; John Wiley & Sons: London, UK, 2013; ISBN 978-1-84821-432-3. [Google Scholar]
  32. Baker, J.E. Adaptive Selection Methods for Genetic Algorithms. In Proceedings of the first International Conference on Genetic Algorithms and Applications; Grefenstette, J.J., Ed.; Erlbaum Printing House: New York, NY, USA, 1985. [Google Scholar]
Figure 1. (a) ASTANK2 block-diagram. (b) ASTANK2 global identification scheme.
Figure 1. (a) ASTANK2 block-diagram. (b) ASTANK2 global identification scheme.
Electronics 10 01101 g001
Figure 2. Regular, standard Proportional–Integral–Derivative(PID) structure (PID-R).
Figure 2. Regular, standard Proportional–Integral–Derivative(PID) structure (PID-R).
Electronics 10 01101 g002
Figure 3. Non-standard PID structure (PID-N).
Figure 3. Non-standard PID structure (PID-N).
Electronics 10 01101 g003
Figure 4. Closed loop PID structures for ASTANK2 installation with (a) PID-R; and (b) with PID-N.
Figure 4. Closed loop PID structures for ASTANK2 installation with (a) PID-R; and (b) with PID-N.
Electronics 10 01101 g004
Figure 5. Example of noisy output signal tracking the prescribed reference.
Figure 5. Example of noisy output signal tracking the prescribed reference.
Electronics 10 01101 g005
Figure 6. (a) Backward std variation. (b) Detection of transient time by means of A-R std.
Figure 6. (a) Backward std variation. (b) Detection of transient time by means of A-R std.
Electronics 10 01101 g006
Figure 7. Example of fitness surfaces.
Figure 7. Example of fitness surfaces.
Electronics 10 01101 g007
Figure 8. Exploration–exploitation strategy in fitness maximization.
Figure 8. Exploration–exploitation strategy in fitness maximization.
Electronics 10 01101 g008
Figure 9. Principle of the Firefly Algorithm.
Figure 9. Principle of the Firefly Algorithm.
Electronics 10 01101 g009
Figure 10. Closed loop PID-R-ASTANK2 SIMULINK model.
Figure 10. Closed loop PID-R-ASTANK2 SIMULINK model.
Electronics 10 01101 g010
Figure 11. Closed loop PID-N-ASTANK2 SIMULINK model.
Figure 11. Closed loop PID-N-ASTANK2 SIMULINK model.
Electronics 10 01101 g011
Figure 12. Staircase type inputs.
Figure 12. Staircase type inputs.
Electronics 10 01101 g012
Figure 13. I/O signals for Ziegler–Nichols tuned PID-R controller, in case of <raw> idmo, Φ ZN = 70.12 %.
Figure 13. I/O signals for Ziegler–Nichols tuned PID-R controller, in case of <raw> idmo, Φ ZN = 70.12 %.
Electronics 10 01101 g013
Figure 14. I/O signals for Ziegler–Nichols tuned PID-R controller, in case of <spline> idmo, Φ ZN = 73.12 %.
Figure 14. I/O signals for Ziegler–Nichols tuned PID-R controller, in case of <spline> idmo, Φ ZN = 73.12 %.
Electronics 10 01101 g014
Figure 15. I/O signals for optimal PID-R controllers; in the case of <raw> idmo, Φ o IFA = 83.90 %.
Figure 15. I/O signals for optimal PID-R controllers; in the case of <raw> idmo, Φ o IFA = 83.90 %.
Electronics 10 01101 g015
Figure 16. I/O signals for optimal PID-R controllers; in the case of <spline> idmo, Φ o IFA = 85.01 %.
Figure 16. I/O signals for optimal PID-R controllers; in the case of <spline> idmo, Φ o IFA = 85.01 %.
Electronics 10 01101 g016
Figure 17. I/O signals for optimal PID-N controllers; in the case of <raw> idmo, Φ o IFA = 83.84 %.
Figure 17. I/O signals for optimal PID-N controllers; in the case of <raw> idmo, Φ o IFA = 83.84 %.
Electronics 10 01101 g017
Figure 18. I/O signals for optimal PID-N controllers; in the case of <spline> idmo, Φ o IFA = 85.07 %.
Figure 18. I/O signals for optimal PID-N controllers; in the case of <spline> idmo, Φ o IFA = 85.07 %.
Electronics 10 01101 g018
Figure 19. Outputs for the optimal PID controllers and their identified step responses of order II.
Figure 19. Outputs for the optimal PID controllers and their identified step responses of order II.
Electronics 10 01101 g019
Figure 20. PID-ASTANK2 performance for a configuration of staircase references.
Figure 20. PID-ASTANK2 performance for a configuration of staircase references.
Electronics 10 01101 g020
Figure 21. PID-ASTANK2 performance for switched references of the previous figure.
Figure 21. PID-ASTANK2 performance for switched references of the previous figure.
Electronics 10 01101 g021
Figure 22. PID-ASTANK2 performance for constant perturbations applied on outputs.
Figure 22. PID-ASTANK2 performance for constant perturbations applied on outputs.
Electronics 10 01101 g022
Figure 23. Principle of robustness margin estimation for increasing noises variance.
Figure 23. Principle of robustness margin estimation for increasing noises variance.
Electronics 10 01101 g023
Figure 24. Fitness robustness surfaces depending on exogenous noise variances.
Figure 24. Fitness robustness surfaces depending on exogenous noise variances.
Electronics 10 01101 g024
Figure 25. PID-ASTANK2 performance at the margin of robustness against exogenous noises.
Figure 25. PID-ASTANK2 performance at the margin of robustness against exogenous noises.
Electronics 10 01101 g025
Figure 26. Principle of robustness margin estimation for increasing uncertainty power.
Figure 26. Principle of robustness margin estimation for increasing uncertainty power.
Electronics 10 01101 g026
Figure 27. Output signals behavior around the robustness margin.
Figure 27. Output signals behavior around the robustness margin.
Electronics 10 01101 g027
Figure 28. Estimating the robustness margin against the uncertainties of the MISO1 model.
Figure 28. Estimating the robustness margin against the uncertainties of the MISO1 model.
Electronics 10 01101 g028
Figure 29. Estimating the robustness margin against the uncertainties of the MISO2 model.
Figure 29. Estimating the robustness margin against the uncertainties of the MISO2 model.
Electronics 10 01101 g029
Figure 30. Estimating the robustness margin against uncertainties of the overall ASTANK2 model.
Figure 30. Estimating the robustness margin against uncertainties of the overall ASTANK2 model.
Electronics 10 01101 g030
Table 1. Structural indices of optimal MISO BJ models and estimated noise variances.
Table 1. Structural indices of optimal MISO BJ models and estimated noise variances.
ChannelOutput
Data Type
Optimal
n a , n b 1 , n b 2 , n c , n d
Noise Variance
( λ 2 )
1Raw(30,22,16,65,0)0.0067
1Spline Smoothed(3,21,47,89,0)0.006
2Raw(27,7,26,95,0)0.006
2Spline Smoothed(2,2,46,95,0)0.0063
Table 2. Configuring parameters of metaheuristics.
Table 2. Configuring parameters of metaheuristics.
AHCA—Exploration IFA—Exploitation
P K S M δ P e P K S I 0 λ ρ min ρ max
40 30 P 30301%3251003011.50.52
Table 3. Parameters of PID-R controllers tuned by the Ziegler–Nichols method.
Table 3. Parameters of PID-R controllers tuned by the Ziegler–Nichols method.
Identification
Model
Channel K u T u [ s ] K p T i [ s ] T d [ s ] Φ [ % ]
<raw>11.3851355.310.83106177.6644.4170.12
21.251940.830.7511420.415.10
<spline>11.23362557.090.74017528.547.1473.12
22.47967528.151.48780514.073.52
Table 4. Running performances of metaheuristics.
Table 4. Running performances of metaheuristics.
AHCA—ExplorationIFA—Exploitation
PIDIdentification
Model
k n s m n Φ Φ o [ % ] PIDIdentification
Model
k n s n Φ Φ o [ % ]
R<raw>64304565542180.03R<raw>963028,59583.90
<spline>61305143612783.08<spline>1002929,79985.01
N<raw>62304192498281.68N<raw>673019,86683.84
<spline>53304484532283.50<spline>663019,56585.07
Table 5. Parameters of optimal PID controllers found by means of IFA.
Table 5. Parameters of optimal PID controllers found by means of IFA.
PIDIdentification
Model
K p , 1 T i , 1   [ s ] T d , 1   [ s ] K p , 2 T i , 2   [ s ] T d , 2   [ s ]
R<raw>0.241350245.61508140.00016111.474065142.71840590.0005492
<spline>0.39718376.69583480.000020.619760528.98268910.0012607
N<raw>0.04060093.143564745.11711231.114081337.47056550.0013905
<spline>0.277844255.266222600.651865328.90447580.1017565
Table 6. Optimal PID controllers performance parameters related to second order step response.
Table 6. Optimal PID controllers performance parameters related to second order step response.
PIDIdentification
Model
Channel ζ ω
[rad/s]
τ
[s]
T RO [ % ] τ p [ % ] τ d [ s ] τ r [ s ] τ s [ s ] N t
R<raw>10.82435900.024346811.0349.821.030554238.9875.8195.32175.57165
20.60284310.0309242053.649.31346127.3345.9889.89172.81195
<spline>10.85064100.02677939.0343.900.620133232.1668.60192.84168.76165
20.69461520.0304711047.254.814988143.3248.78106.69157.10108
N<raw>10.82873480.025002211.0348.260.954089235.5574.23193.10183.62165
20.67246330.0338145043.985.759211125.5343.4992.23144.98192
<spline>10.85064100.02627489.0344.740.620133236.4569.75196.37171.83165
20.67879240.0305118048.285.480398140.2148.35103.41159.55194
Table 7. Robustness margins of PID controllers depending on output SNR.
Table 7. Robustness margins of PID controllers depending on output SNR.
PIDIdentification
Model
Marginal Fitness
[%]
Marginal SNR
[dB]
Optimal Fitness
[%]
SNR1
[dB]
SNR2
[dB]
R<raw>65.3725.9983.9040.3741.34
<spline>64.1225.9585.0140.8041.23
N<raw>66.4525.9883.8440.3441.46
<spline>64.0125.9685.0740.8041.25
Table 8. Parameters of robustness against model uncertainties.
Table 8. Parameters of robustness against model uncertainties.
PIDIdentification
Model
Uncertainties
Affected
Φ min
[%]
η max [ % ] Φ down [ % ] Φ up [ % ] ρ [ % ] μ [ % ]
R<raw>MISO174.5974.48752.8189.47
MISO270.515.57070.495.8496.98
MISO1 and MISO2702.2569.76701.0645.97
<spline>MISO1602.558.11600.742.03
MISO265.5164.7465.520.4514.68
MISO1 and MISO260157.5460.220.176.49
N<raw>MISO174.5874.0474.512.5487.21
MISO270.5970.4370.654.5193.5
MISO1 and MISO2683.567.7168.471.362.65
<spline>MISO160159.8560.71.0831
MISO266165.6466.260.124.22
MISO1 and MISO265164.5465.210.165.69
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Stefanoiu, D.; Culita, J. Optimal Identification and Metaheuristic PID Control of a Two-Tank System. Electronics 2021, 10, 1101. https://0-doi-org.brum.beds.ac.uk/10.3390/electronics10091101

AMA Style

Stefanoiu D, Culita J. Optimal Identification and Metaheuristic PID Control of a Two-Tank System. Electronics. 2021; 10(9):1101. https://0-doi-org.brum.beds.ac.uk/10.3390/electronics10091101

Chicago/Turabian Style

Stefanoiu, Dan, and Janetta Culita. 2021. "Optimal Identification and Metaheuristic PID Control of a Two-Tank System" Electronics 10, no. 9: 1101. https://0-doi-org.brum.beds.ac.uk/10.3390/electronics10091101

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