1 Introduction

In most of the process industries like refinery process, sugar cane, oil etc. liquid flow rate is one of the crucial factors which need to always control during the process to obtain the better quality and reduction in production cost [1, 2]. As the liquid flow rate in a process industry depends upon a number of parameters, the process can give the unexpected and inefficient output if settings of parameters are improper.

Most of the industrial process controls are multi-variable and to optimize a system performance through the classical method is unreliable time-consuming and costly. In classical optimization approach, when a response is measured with respect to the influence of a particular variable, then other variables are to be kept constant. So, interactiveness between the variables are absent here. Hence, there is always a chance of getting response, influenced by individual independent variables. The total number experimental trials should be increased increased that can help to overcome this disadvantage. But, it also increase the cost of the production and time requirement. Another alternative approach is computational optimization of the process i.e. mathematical modeling of the process to establish the relationship between input and output using different computational intelligence techniques. The model is based on experimental or available input–output data. Once the data are obtained, computational techniques are applied on the data to establish the model that can predict the outputs of the process with satisfactory accuracy. Normally, in a liquid flow control process, flow rate depends on several important factors like sensor output, pipe diameter, liquid conductivity, liquid viscosity etc. In this present investigation, mathematical models are developed and optimized (for above mentioned variables) computationally such that it can describe the liquid flow control process in efficient manner.

Conventionally, flow rate is calculated by using anemometer type flow sensor [3], ultrasonic flow sensor [4], thermal flow sensor [5] etc. Due to high measuring accuracy and very short response time, anemometer type thermal flow sensor has been widely used in aerospace, oil refinery, natural gas etc. for standard measurement. It has been challenge to improve the performance of flow sensor in the field of flow measurement when issues like pipe diameter and the other liquid properties changed. As input parameters estimation of a liquid flow rate system is a typical example of non-linear optimization problem, so an efficient optimization technique is required to optimize the model parameters such that experimental curve fits best with the experimental flow rate. The accuracy of the extracted input parameters depends on the selection of suitable optimization technique. A number of literature surveys are conducted on the different types of optimization techniques applied in flow rate control system.

Salaymeh et al. [5] proposed an optimized artificial neural network model to determine the velocity of the gas in a pipe for known experimental data inputs thermal flow sensor voltage and the fluid temperature. Bera et al. [6] have given a comparative study done between the matched pair transistors flow meter and platinum resistance temperature detector. The results showed a linear relationship between the sensor output and flow rate; whereas for the turbulent flow the relation was found to be nonlinear in nature. Bera et al. [7] investigated the characteristics of a semiconductor based Anemometer type flow meter from liquid flow rate. To eliminate the nonlinearity relation between the flow rate and sensor output a signal conditioning circuit along with the instrumentation amplifier is utilized. Santhosh et al. [8] proposed an optimized neural network model for ultrasonic sensor which was adaptive to the variations in pipe diameter, liquid density, and liquid temperature.

Dutta et al. [4] designed an intelligent fuzzy logic model for ultrasonic flow sensor to determine the flow rate known for experimental inputs namely pipe diameter, liquid density and temperature. This model not only produce a full scale linearity between sensor output and flow rate but the minimum root mean squared error (RMSE) adjusted by the model is up to 7.72%. Application of intelligent fuzzy logic controller is proposed by Dutta et al. [9] to predict the flow rate in anemometer flow sensor in liquid flow process system. They applied the different number and different nature of membership function to optimize the flow rate. From the experimental result analysis, it was seen that least RMSE is 7.98%. Dutta et al. [10] used artificial neural network (ANN) for prediction of liquid flow rate passing through the anemometer sensor in a liquid flow process. A feed forward neural network model was developed exploiting experimental measurements. The neural network model was trained and tested using MATLAB toolbox. The results predicted from ANN model was compared with experimental measurements. Investigation shows that the maximum RMSE is 2.94% for learngdm adaptive learning function and trainlm training function with a good correlation. Dutta et al. [11] proposed SVM and KNN algorithm to classify data and get prediction (find hidden patterns) for target. Here they used nominal data to classify in liquid flow process control system and discover the data pattern to predict future data sets.

Moreover, Dutta et al. [12] investigated a hybrid Genetic Algorithm-Neural network (GA-ANN) model. It was employed for the prediction and optimization of liquid parameter, Anemometer sensor output and pipe diameter. From the numerical results, it was observed that among the three different selection process, rank selected hybrid GA-ANN model is better than the other two selections Tournament and Roulette wheel with accuracy 98.42% of final solutions. Next, Dutta et al. [13] examined anemometer thermal sensor based process model for optimizing the flow rate. Results were in good agreement with the experimental results and can be applied to predict the performance of mass flow sensor. For the best ANFIS structure RMSE and MAE were calculated as 2.143 and 0.504% respectively. Next, Dutta et al. [14] also designed a model of liquid flow processes using ANN and optimized it using a flower pollination algorithm (FPA) to improve the accuracy and convergence speed. In the first phase, the NN model was trained by the dataset obtained from the experiments and model response was cross-verified with the experimental results and found to be satisfactory. In the second phase of work, minimum flow rate was found for the optimized conditions of sensor output voltages, pipe diameter and liquid conductivity. Accuracy after cross-validation and testing sub datasets was nearly 94.17% and 99.25% respectively. Simulation results showed satisfactory accuracy of the proposed technique. However, there is still scope of improving the results. Therefore, estimation of a highly accurate model for describing a liquid flow control process is still an open problem to us.

For a liquid flow control process, the relationship between output (i.e. liquid flow rate) with the input variables (i.e. sensor output voltage, pipe diameter, liquid conductivity, liquid viscosity etc.) are assumed to be non-linear in nature [1]. Several nonlinear models [15] like regression analysis, response surface methods, analysis of variance (ANOVA) [16] etc. are very popular where polynomial, logistic, quadratic, exponential, logarithmic, power etc. equations can be used to represent behavior of a system [17]. During numerical extraction method, an efficient optimization technique is required to optimize the model parameters such that experimental output fits best with the simulated output. Therefore, accurate modeling of liquid flow control process is a typical example of nonlinear optimization problem where we need to identify optimal values of the model parameters. The accuracy of the extracted parameters depends on the selection of suitable optimization technique.

Metaheuristic [18, 19] is one of the most popular subclass optimization techniques where optimization processes are typically inspired by physical phenomena, animals’ behaviors or evolutionary concepts. Most popular and efficient subclass of metaheuristics is the Swarm Intelligence (SI) based methods. These algorithms mostly mimic the social behavior of swarms, herds, flocks, or schools of insects and animals in nature where the search agents navigate using the simulated collective and social intelligence of creatures [20]. Simplicity, flexibility, derivation-free mechanism and local optima avoidance capability are the main reasons behind popularity of metaheuristics. These characteristics make metaheuristics greatly appropriate for real-life optimization problems. Most popular SI based metaheuristics are as follows: Particle swarm optimization (PSO) [21], Bat Algorithm (BA) [22], Cuckoo Search (CS) [23], Flower Pollination Algorithm (FPA) [24], Firefly Algorithm (FA) [25], Ant Colony Optimization (ACO) [26], Artificial Bee Colony (ABC) [27] etc. However, No Free Lunch theorem [28] stated that no single metaheuristics is suitable for solving all kinds of optimization problems. Therefore, proposing new metaheuristics or modification of existing one (with better convergence speed, better accuracy, lesser computational time, lesser number of parameters to be tuned, better exploration and exploitation capability) is still very fascinating field of study to the computer science researchers to solve a real-life optimization problem like modeling of liquid flow control process.

Elephant swarm water search algorithm (ESWSA) [29,30,31] was recently proposed metaheuristic which was inspired by water resource search strategy of intelligent and social elephant swarm during drought. The metaheuristic was very simple in nature. As there were only a few parameters needed to be set in ESWSA, the metaheuristic can be applied easily and less concentration can be given to the parameters tuning. So far, ESWSA was applied on many problems in different disciplines successfully, such as three-bar truss design problem [30], spring design problem [30], reverse engineering of gene regulatory network [29] and modeling of welding process [31].

The main objective of this work is to propose or develop some efficient optimization techniques such that we can model (computationally) the liquid flow control process accurately and reliably. In this study, three different improved versions of original ESWSA metaheuristic have been proposed (by introducing the varying Switching Probability along with iteration and Lévy based global search). These improved versions of ESWSA are tested against the problem of modeling of liquid flow control process. Here, response surface methods (RSM) and analysis of variance (ANOVA) are used as the mathematical models for modeling of liquid flow control process. The details of the ANOVA and RSM based are discussed in next section. The models parameters are needed to be optimized using improved versions of ESWSA. The rest of this paper is organized as follows. Section 2 describes the problem formulation of this research work for modeling of liquid flow control process. In this section, the experimental setup of liquid flow control is described in order to obtain the experimental data. Different nonlinear mathematical models for liquid flow control process are also elaborated here. Next, the proposed improved versions of ESWSA metaheuristic are discussed in methodology section. In Sect. 4, simulated results, discussions and comparisons are given. Advantages and disadvantages of these improved versions of ESWSA are also discussed. Finally, Sect. 5 concludes this paper followed by the references.

2 Problem formulation

In this section, present research problem has been elaborated. Initially, laboratory experimentation on liquid flow control process is described from where experimental dataset has been obtained. This experimental dataset has been used as training data for the computational optimization of nonlinear models for the liquid flow control process using suitable metaheuristics. Next, two popular nonlinear model have been discussed in brief those are used in this present investigation. Metaheuristics are needed to be used for parametric optimization of these models.

2.1 Experimentation in laboratory

Initially experimentation on liquid flow control process has been performed on laboratory to generate the experimental data. Liquid Flow and Level Measurement and Control Unit has been used for this purpose which is shown in Fig. 1. This unit (Model No. WFT-20-I) consists of pump, water reservoir, flow rate indicator, control valve, water tank and Anemometer type flow sensor.

Fig. 1
figure 1

Liquid flow and level measurement and control unit

The experimental set up for the liquid flow control process is given in Table 1 where different machine or tools and their corresponding specification or descriptions are shown.

Table 1 Experimental Setup for liquid flow control process

In the present investigation, the liquid velocities measured are in the range of 0–600 lpm. Flow sensor voltages are calibrated against liquid flow a velocity which is determined by a special mass flow control unit. Overall temperature variation of the liquid is typically less than ± 0.5 °C from the room temperature during the course of the entire experiment. The purpose of water flow control process is to keep the water flow in the tube at a desired rate and track the reference trajectory. Here, water is considered as the experimental liquid to check the non-linearity of the cylindrical tank. Reservoir tank collects the water which is pumped to the cylindrical tank through a PVC pipe. DC motor is connected in reservoir to drive the system. The rate of change of the water flow is measured in Rota-meter indicator or anemometer type flow sensor. A nonlinear electrical signal is achieved across the non-contact type liquid flow sensor connected at the end of the PVC pipe. Transistor based flow sensor is used where four transistors connected in a diametrical plane of the PVC pipe to form a bridge type full wave rectifier. Change in water flow affects the output of the sensor signal. Water from the sensor falls into the cylindrical tank, which is again connected to the main water reservoir through a pipe so that cyclic process is formed. Pneumatic control valve allows water flow into the tube from the tank and causes flow rate change in the tube. The operation is repeated throughout the control process till the water flow rate in the tube is set to reference. A reference trajectory or flow rate is first set to be followed by the system. From the above experimental procedure, different water flow rate are obtained with respect to the variation of sensor output voltage under the different combination of pipe diameter.

For this work, total 36 sample data has been observed. The data consist of two inputs or independent variables i.e. sensor output voltage and pipe diameter. During the experimentation, three different set of pipe diameter i.e. 20 mm, 25 mm and 30 mm are considered. For each of the cases of diameter, 12 different flow rate are observed as experimental output data for 12 different sensor output voltage. The liquid viscosity and conductivity are assumed to be constant as overall temperature variation of the liquid was typically less than ± 0.5 °C from room temperature during the course of the entire experiment. The experimental data are shown in Table 2. This dataset can be used as the training dataset during computational optimization.

Table 2 Experimental dataset for liquid flow control process

2.2 Theoretical background: mathematical description of the problem

Due to nonlinear characteristics of the semiconductor based Anemometer flow sensor, variation of sensor output voltage has been observed with the change in liquid flow rate [32]. Moreover, sensor output voltage also depends on the pipe diameter (partially depends upon the density and conductivity of liquid which are ignored in this work for their less significance). So, it is very difficult to recalibrate the conventional controller circuit each time if change in pipe diameter and the process is also very time consuming.

To overcome such type of drawbacks (i.e. manual recalibration), some mathematical models for liquid flow control process are needed to developed using some computational intelligence tools. These mathematical models are based on nonlinear relationship between liquid flow rate, sensor voltage and pipe diameter. These models will help to find out the optimal operating condition and to predict the flow rate under particular condition (i.e. for different values of pipe diameter and sensor voltage) without recalibration. In this work, we have considered two widely popular nonlinear models namely response surface methodology (RSM) [33, 34] and analysis of variance (ANOVA) [35] to describe the relationship between variables of liquid flow control process.

RSM [31] is a statistical model, generally used for empirical model building and analyzing a problem. The most extensive applications of RSM are in the particular situations where several input variables potentially influence performance or response of the process. In RSM, higher order polynomial equation is used to describe the relationships amongst variables. The second order models are flexible and can take on wide variety of functional forms. Therefore, in this present problem of RSM based modeling, the liquid flow rate (\(F\)) can be expressed in term of sensor output (E), pipe diameter (D) using RSM based model as follows:

$$F = \beta_{0} + \beta_{1} \cdot E + \beta_{2} \cdot D + \beta_{11} \cdot E^{2} + \beta_{22} \cdot D^{2} + \beta_{12} \cdot E \cdot D$$
(1)

where \(\beta_{0}\), \(\beta_{1}\), \(\beta_{2}\), \(\beta_{11}\), \(\beta_{22}\) and \(\beta_{12}\) are the regression coefficients. Values of the coefficients are needed to be estimated using some computational intelligence techniques from the experimental dataset.

ANOVA [35] is used to test for significant differences among sample without assuming any parametric relationships. In ANOVA, the relationship between the variables can be expressed in term of nonlinear power equations. In this present case, the liquid flow rate (F) can be expressed in term of sensor output (E), pipe diameter (D) using ANOVA based model as follows:

$$F = \mu_{1} \cdot E^{{\mu_{2}}} \cdot D^{{\mu_{3}}}$$
(2)

where \(\mu_{1}\), \(\mu_{2}\) and \(\mu_{3}\) are the coefficients for this ANOVA based model. These values are needed to be estimated using some computational intelligence techniques from the experimental dataset.

2.3 Theoretical background: optimization of the mathematical model

Finding out the accurate values of coefficients of nonlinear model (i.e. Eqs. 1 and 2) of liquid flow rate is essentially a nonlinear optimization process. Normally, metaheuristics can be used for this type of optimization such that calculated characteristic of liquid flow control process fit with the experimental one. The estimation task aims to seek the most optimal values of the model parameters so that the difference between measured and simulated flow rate is minimized. In this work, root mean square of the error (RMSE) is used for this purpose which is shown in Eq. (3). This RMSE is the objective function for the metaheuristic which is needed to be minimized.

$$RMSE\left(X \right) = \sqrt {\frac{1}{N}\mathop \sum \limits_{i = 1}^{N} f\left({E_{i}, D_{i}, X} \right)^{2}}$$
(3)

where N is the number of the experimental data, X is the set of the estimated parameters.

For RSM based modeling, the error function \(f\left({E_{i}, D_{i}, X} \right)\) and set of parameters X can be written as

$$f\left({E_{i}, D_{i}, X} \right) = \beta_{0} + \beta_{1} \cdot E + \beta_{2} \cdot D + \beta_{11} \cdot E^{2} + \beta_{22} \cdot D^{2} + \beta_{12} \cdot E \cdot D - F$$
(4)
$$X = \{\beta_{0}, \beta_{1, } \beta_{2}, \beta_{11}, \beta_{22}, \beta_{12} \}$$
(5)

For ANOVA based modeling, the error function \(f\left({E_{i}, D_{i}, X} \right)\) and set of parameters X can be expressed as

$$f\left({E_{i}, D_{i}, X} \right) = \mu_{1} \cdot E^{{\mu_{2}}} \cdot D^{{\mu_{3}}} - F$$
(6)
$$X = \left\{{\mu_{1}, \mu_{2}, \mu_{3}} \right\}$$
(7)

F is the experimental data.

Obviously, smaller value of the objective function gives better solution which corresponds to superior set of estimated coefficients of RSM and ANOVA based model. The main objective of this work is to develop an efficient metaheuristic such that we can predict the liquid flow rate more accurately (by estimating the optimal or best set of values for the model parameters). In this research work, we have used basic elephant swarm water search algorithm (ESWSA) optimization technique [30] and its three improved versions of ESWSA for optimization or modeling of liquid flow control problem.

3 Proposed methodology

Before elaborating the proposed methodology, basic ESWSA metaheuristic is elaborated initially. Then, the proposed improved versions of ESWSA are elaborated later accordingly.

3.1 Basic elephant swarm water search algorithm (ESWSA)

Elephant swarm water search algorithm (ESWSA) optimization technique was proposed by Mandal et al. [30]. It was typically inspired by the intelligent and social behavior of social elephants. This algorithm was mainly based on the water search strategy of elephant swarm during drought with the help of different communication techniques. For simplicity, following four simplified and idealized rules were used to develop ESWSA.

  1. 1.

    During drought, elephants are used to move from one place to another in search of water in several groups (known as elephant swarm). For an optimization problem, each elephant swarm is analogous to a solution of the corresponding problem. Each elephant group is recognized by its particular velocity and position.

  2. 2.

    The leader is responsible to communicate with the other swarm about the quantity and quality of the water resource which is found during search. For a maximization problem, the fitness value is directly proportional to the quantity and quality of the water resource.

  3. 3.

    Each elephant group memorizes the best location of water source which was discovered by own group itself (known as local best solution). They also remember best location of water source discovered by all groups (known as global best solution) so far. Elephant group moves (i.e. velocity and position of each elephant group are updated gradually) from one point to next location based on these memories.

  4. 4.

    Search of water in nearby and far area (local and global search) is controlled by a probabilistic constant called Switching Probability p ∈ [0, 1]. The leader of the elephant group takes probabilistic decision to switch between local search and global search.

Suppose, for d-dimensional optimization problem, the position of i-th elephant group of a swarm (consist of N number of elephant group) at t-th iteration is given as \(X_{i,d}^{t} = \left({x_{i1},x_{i2}, \ldots,x_{id}} \right)\) and the corresponding velocity is represented by \(V_{i,d}^{t} = \left({v_{i1},v_{i2}, \ldots,v_{id}} \right)\). Locally best solution by i-th elephant group at current iteration is given as \(P_{best,i,d}^{t} = \left({P_{i1},P_{i2}, \ldots,P_{id}} \right)\) and global best solution is denoted by \(G_{best,d}^{t} = \left({G_{1},G_{2}, \ldots,G_{d}} \right)\). Initially, the elephant group are randomly placed throughout the search space i.e. position and velocity are randomly initialized. These values served as the initial population of the metaheuristic. As iteration proceeds, the velocities of the elephants groups are updated according to following equations depending on the switching probability \(\left(p \right)\)

$$V_{i,d}^{t + 1} = V_{i,d}^{t} *\omega^{t} +\epsilon \odot \left({G_{best,d}^{t} - X_{i,d}^{t}} \right)\quad {\text{if}}\quad rand > p\;\;\left[{\text{for}}\;{\text{global}}\;{\text{search}} \right]$$
(8)
$$V_{i,d}^{t + 1} = V_{i,d}^{t} *\omega^{t} + \epsilon \odot \left({P_{best,i,d}^{t} - X_{i,d}^{t}} \right)\quad {\text{if}}\quad rand \le p\quad \left[{\text{for}}\;{\text{local}}\;{\text{search}} \right]$$
(9)

where \(\epsilon\) is a d-dimensional array of random values within [0, 1]. \(\odot\) denotes element wise multiplication and \(rand\) is a random value that generated during the iteration. \(\omega^{t}\) is the inertia weight at current iteration to balance between exploration and exploitation. It changes according to the following equation:

$$\omega^{t} = \omega_{max} - \left\{{\frac{{\omega_{max} - \omega_{min}}}{{t_{max}}}} \right\} \times t$$
(10)

where \(t_{max}, \omega_{max}, \omega_{min}\) denote the values of maximum iteration number, upper boundary and lower boundary of the inertia weight respectively. Values of \(\omega_{max}\) and \(\omega_{min}\) are set to 0.6 and 0.4 respectively [30]. The next position of an elephant group is modified according to following equation:

$$X_{i,d}^{t + 1} = V_{i,d}^{t + 1} + X_{i,d}^{t}$$
(11)

After completion of all iteration, the elephant groups gradually update their position and will reach to the best water resource position which is found by all swarm. The best position denotes the best solution for the optimization problem. It has been found from literature [30] that p = 0.6 give superior performance for ESWSA. So, we have also used this value for our present problem.

In next subsections, we shall discuss about the proposed three improved versions of ESWSA.

3.2 Modified elephant swarm water search algorithm (MESWSA)

In case of basic ESWSA, the value of switching probability is fixed and constant. Selection of value of p is an important task as it helps to balance between local and global search. Depending on the value of p, results may vary and the metaheuristic may stick into local optima.

Therefore, in case of Modified ESWSA, we have slightly modified the basic ESWSA optimization technique. Here, instead of using a fixed value of p, the value of p has been gradually decreasing from \(p_{max}\) (i.e. 1 for this study) to \(p_{min}\) (i.e. 0 or this study) along with iteration number according to following formula.

$$p\left(t \right) = p_{max} - \left({\frac{{p_{max} - p_{min}}}{{t_{max}}}} \right)*t$$
(12)

where \(t_{max}\) is maximum iteration number and t is the current iteration number. Such type of pre-assignment of switching probability along with iteration helps to achieve a suitable balance between local and global search. Moreover, we need not to worry about the selection of value of p. It also helps to minimize the chance of sticking at local optima for the metaheuristics can be reduced. So, the velocities of elephant swarm are updated according to the following modified equations for MESWSA:

$$V_{i,d}^{t + 1} = V_{i,d}^{t} *\omega^{t} + \epsilon \odot \left({G_{best,d}^{t} - X_{i,d}^{t}} \right)\quad {\text{if}}\quad rand > p\left(t \right)\quad \left[{{\text{for}}\;{\text{global}}\;{\text{search}}} \right]$$
(13)
$$V_{i,d}^{t + 1} = V_{i,d}^{t} *\omega^{t} +\epsilon \odot \left({P_{best,i,d}^{t} - X_{i,d}^{t}} \right)\quad {\text{if}}\quad rand \le p\left(t \right) \left[{{\text{for}}\;{\text{local}}\quad {\text{search}}} \right]$$
(14)

3.3 Lévy based elephant swarm water search algorithm (LESWSA)

In case of Lévy based elephant swarm water search algorithm (LESWSA), as iteration proceeds, the velocity and position of the elephants (for the global search) are updated according to Lévy flight distribution [36] rather than simple randomization. Lévy flight is defined as a random movement done by the birds with a step value of distributed probability. In fact, studies show that Lévy walk is far more efficient than simple random-walk exploration [37]. So, global search or exploration is performed more efficiently for LESWSA. Lévy flights essentially provide a random walk while their random steps are drawn from a Lévy distribution as follows

$$L\acute{e}vy (\lambda )\sim\frac{{\lambda {\Gamma}\left(\lambda \right)Sin \left({\frac{\pi \lambda}{2}} \right)}}{\pi} \frac{1}{{s^{1 + \lambda}}}$$
(15)

Here \({\Gamma}\left(\lambda \right)\) is the standard gamma function, and this distribution is valid for large steps s > 0. In all our simulations below, we have used \(\lambda\) = 1.5 [38]. In case of LESWSA, the velocity of elephant swarm is updated according to the following Lévy flight based equations depending on the switching probability p.

$$V_{i,d}^{t + 1} = V_{i,d}^{t} *\omega^{t} + Levy \left({1,d} \right) \odot \left({G_{best,d}^{t} - X_{i,d}^{t}} \right)\quad {\text{if}}\quad rand > p\,\left[{{\text{for}}\;{\text{global}}\;{\text{search}}} \right]$$
(16)
$$V_{i,d}^{t + 1} = V_{i,d}^{t} *\omega^{t} + \epsilon\odot \left({P_{best,i,d}^{t} - X_{i,d}^{t}} \right) \quad {\text{if}}\quad rand \le p\,\,\left[{{\text{for}}\;{\text{local}}\;{\text{search}}} \right]$$
(17)

\(Levy \left({1,d} \right)\) generates a \(d\)-dimensional distribution. Moreover, value of switching probability is constant i.e. \(p\) = 0.6 is used for LESWSA.

3.4 Lévy based modified elephant swarm water search algorithm (LMESWSA)

In case of Lévy based modified elephant swarm water search algorithm (LMESWSA), characteristics of both MESWSA and LESWSA are utilized to observe further improvements in results. Here, switching probability varies along with iterations (decrease from 1 to 0) and velocities (for global search) are also updated according to Lévy distribution. Therefore, in case of LMESWSA, the velocities of elephant swarm are updated according to the following equations.

$$V_{i,d}^{t + 1} = V_{i,d}^{t} *\omega^{t} + Levy \left({1,d} \right) \odot \left({G_{best,d}^{t} - X_{i,d}^{t}} \right)\quad {\text{if}}\quad rand > p\left(t \right)\,\,\left[{{\text{for}}\;{\text{global}}\;{\text{search}}} \right]$$
(18)
$$V_{i,d}^{t + 1} = V_{i,d}^{t} *\omega^{t} + \epsilon \odot \left({P_{best,i,d}^{t} - X_{i,d}^{t}} \right)\quad {\text{if}}\quad rand \le p\left(t \right)\;\;\left[{{\text{for}}\;{\text{local}}\;{\text{search}}} \right]$$
(19)

The pseudo code of ESWSA or their improved versions is shown below.

figure a

It is worth to mention that for ESWSA and LESWSA \(p(t)\) is constant (i.e. 0.6) throughout iteration. For MESWSA and LMESWSA, the value of \(p(t)\) is changed according to the Eq. (12). For ESWSA, MESWSA, LESWSA and LMESWSA, the global search is followed according to Eqs. (8), (13), (16) and (18) respectively. On the other hand, for ESWSA, MESWSA, LESWSA and LMESWSA, the local search is followed according to Eqs. (9), (14), (17) and (19) respectively.

3.5 Methodology

To verify the performances of proposed improved versions of elephant swarm water search algorithm (i.e. MESWSA, LESWSA and LMESWSA), the algorithms are tested against parameters or coefficients estimation problems for modeling of liquid flow control process. Here, these three algorithms are tested against both cases of RSM or ANOVA based model as described earlier Sect. 2.2. The experimental dataset has been obtained from the laboratory experimentation as mentioned in earlier Sect. 2.1. The dataset consists of 36 data points of sensor output voltage (E), pipe diameter (D) and liquid flow rate (F). This experimental dataset has been used as training dataset for the parametric optimization of RSM and ANOVA based model of liquid flow control process such that difference between experimental and predicted value is minimized. Objective functions for these two cases are RMSE which are already discussed in earlier Sect. 2.3. After optimization, best set of coefficients can be obtained so that RMSE is minimized.

4 Results and discussion

In this section, the numerical simulation results for modeling of liquid flow control process problem using improved versions of ESWSA have been elaborated. In addition, comparisons among the performance of the proposed algorithms and statistical analysis of the evaluated results have been carried out.

For all cases, initial population and maximum iteration number are set to 100 and 5000 respectively. For RSM based model, search space is restricted to six i.e. we have considered six dimensional function optimization problem to search optimal values of the coefficients \(\{\beta_{0}, \beta_{1, } \beta_{2}, \beta_{11}, \beta_{22}, \beta_{12} \}\). For ANOVA based model, the search space is limited to three i.e. we have considered 3 dimensional function optimization problem in search of optimal values of coefficients \(\{\mu_{1}, \mu_{2}, \mu_{3} \}\). The search range has been set to [− 75, 75] for all coefficients of both types of modeling.

All the techniques are simulated using Matlab 2013b in a computer with 2 GB RAM, Dual Core processor and Windows7 operating System. Due to stochastic nature of metaheuristics, different output may be obtained depending on different random initialization. Therefore, each algorithm is executed for 20 times for each case and the statistical analysis has been carried out from the obtained results. During these numerical simulations, we have tested and compared the efficiency of the proposed algorithms on the basis of some criterions such fitness test, reliability test, computational efficiency test, convergence test and accuracy test which are described in following subsections one by one. At the end, overall performance has been discussed.

4.1 Fitness test

Final fitness value of an optimization algorithm is the most important criterion to prove its efficiency. Here, three important criterions are considered for fitness test namely worst (maximum) fitness, best (minimum) fitness and mean (average) fitness values which are calculated after 20 times program execution. If a metaheuristic give smaller values of maximum, minimum and mean of fitness, we can tell that the metaheuristic has superior performances. In this work, the fitness is calculated from the RMSE (as final output) of the algorithms. Using previously mentioned parameters settings, we have optimized each of the models i.e. RSM and ANOVA based model of liquid flow control process. Comparative studies based on these criterions are shown in Table 3 where best values are shown in bold and italic letters.

Table 3 Comparative study based on maximum, minimum and mean of fitness

From following Table 3, it can be seen that ESWSA can reach best fitness value (minimum RMSE i.e. 1.0200E−05) for RSM based modeling (which are shown in bold letters); whereas ESWSA and MESWSA algorithms are able to reach each best fitness value (minimum RMSE i.e. 3.1266E−05) for ANOVA based modeling. For worst fitness, LESWSA is able to achieve lowest worst fitness value for RSM based modeling; whereas MESWSA is able to achieve to smallest value of worst fitness i.e. maximum RMSE for ANOVA based modeling. Mean RMSE is found by the LESWSA which is the best result for RSM based modeling. On the other hand, MESWSA has superior performance in term of mean of RMSE for ANOVA based modeling.

It is interesting to observe that minimum RMSE for RSM based modeling of liquid flow process (obtained by all algorithms) is far better than minimum RMSE for ANOVA based modeling. It indicates that RSM based modeling performs much better than ANOVA based modeling in this present investigation as RSM based modeling offers lower value of training error (i.e. RMSE). RSM based model fits better for liquid flow control process modeling.

4.2 Reliability test

It is always expected that a metaheuristic must able to reach nearer to the global optimal point as close as possible in every single run. It indicates that the output of the metaheuristic must be reliable for every single run [29, 30]. But, due to random initialization and stochastic nature of the metaheuristic, the final output of the optimization process may differ in different run. However, the variation in the output should be minimal. Therefore, in this subsection, we have tested the reliability of proposed algorithms on the basis of some statistical parameters namely median, standard deviation and success rate. Comparisons amongst themselves have been also shown.

Central tendency of the sample or population is measured by median [39]. The standard deviation denotes variability or consistency of the data. Thus, a more reliable algorithm should have less value of standard deviation in the output. On the other hand, a simulation or program run is called successful if the best-found or minimum fitness value is lesser than threshold fitness. This threshold value is decided by some trial and error method and it is problem specific. Therefore, the success rate of a metaheuristic is defined as the ratio of the number of successful runs to the total number of runs. Thus, a larger success rate implies a more reliable optimization technique. In our present problem, a program run is considered to be successful if best-found fitness value or RMSE goes below 1 × 10−4 for modeling of liquid flow control process. Table 4 shows the comparative study based on median, standard deviation and success rate.

Table 4 Comparative study based on median, standard deviation and success rate

It can be clearly shown that LMESWSA get smallest values of median (i.e. 4.5950E−05) for RSM based model; whereas ESWSA and MESWSA are able to reach smallest values of median (i.e. 3.1266E−05) for ANOVA based model. It is interesting to note that the lowest value of median for ANOVA based model is superior than RSM based model.

LESWSA has least standard deviation in the output for RSM based model; whereas MESWSA has lowest standard deviation for ANOVA based model. However, standard deviations for ANOVA based modeling are better than RSM based model i.e. less fluctuation in result are observed for ANOVA based model or the results are more stable for ANOVA. The reason behind it is that metaheuristic search in lower dimensional space for ANOVA based model (3 dimensional search space) compare to the RSM based model (6 dimensional search space). Therefore, RSM based model has greater chance of sticking at local optima.

LMESWSA is able to achieve highest success rate i.e. 90% for RSM based modeling. On the hand, all algorithms are 100% successful for ANOVA based modeling i.e. the resultant fitness always goes below the threshold for all runs. It is also interesting to note that the success rate has been increased for ANOVA based modeling compared to the RSM based modeling. It is due to the same fact that higher dimensional search is required for RSM based modeling of liquid flow control process.

4.3 Computational efficiency test

Besides the previous tests, the computational time is also another major factor for evaluating the efficiency of a metaheuristic. For this purpose, we have observed average execution time taken by each algorithm for each of case of liquid flow control process which in turn denotes the computational efficiency of the algorithm. Table 5 shows a comparative study based on average execution time. It has been observed that LMESWSA required least computational time for RSM based modeling. In case of ANOVA based modeling, computational efficiency is also best for LMESWSA. It is fascinating to observe that ANOVA based modeling required more computational time than RSM based model though the dimension of search space is larger for RSM based model of liquid flow control process. It is due to the fact that RSM used polynomial equation for modeling whereas ANOVA used nonlinear power function for the modeling which require more time for calculation.

Table 5 Comparative study based on computational time

4.4 Convergence test

The above mentioned result and comparisons cannot completely illustrate the efficiency of the proposed optimization techniques. Therefore, a convergence test has been conducted on liquid flow control process modeling and where we observed the change of best-found fitness values along with the iteration number. For this purpose, we have chosen the output (i.e. fitness value) corresponding to the run where we found minimum or best fitness (RMSE) amongst all 20 times run and observe the fitness value at each iteration index. Then, we plot them for all algorithms for RSM and ANOVA based modeling. These are shown in following Figs. 2 and 3 respectively. In the figures, fitness values are shown up to 500 iterations only for better clarity and understanding.

Fig. 2
figure 2

Convergence speed for RSM based modeling of liquid flow control process

Fig. 3
figure 3

Convergence speed for ANOVA based modeling of liquid flow control process

It can be observed that LESWSA converges faster compare to the other optimization techniques for RSM based modeling. For the cases of ANOVA based modeling of liquid flow control process, ESWSA has much better performance. On the other hand, MESWSA is comparatively slower to be found.

4.5 Accuracy test

Next, the accuracy test has been conducted to observe prediction capability (liquid flow rate) under different experimental conditions (i.e. sensor output voltage and pipe diameter). Two indexes namely Individual Absolute Error (\(IAE\)) and Relative Error (\(RE\)) are considered to indicate the error values between the experimental and the simulated data. \(IAE\) and \(RE\) are defined according to Eqs. (20) and (21).

$$IAE = \left| {F_{measured} - F_{calculated}} \right|$$
(20)
$$RE = \frac{{F_{measured} - F_{calculated}}}{{F_{measured}}}$$
(21)

Moreover, total absolute error \(TAE\) (can be defined as:

$$TAE = \mathop \sum \limits_{i = 1}^{n} IAE_{i}$$
(22)

where n is the number of measurements in the experimental dataset, \(F_{measured}\) is the experimental value of liquid flow rate and \(F_{calculated}\) s the estimated value of liquid flow rate for a pipe diameter and sensor output voltage. However, to calculate or estimate the values of liquid flow rate of liquid flow control process at different experimental conditions, the best output case of metaheuristics has been considered where output i.e. \(RMSE\) is found to be smallest among all different runs.

Tables 6 and 7 describe the different best optimal parameters values for RSM and ANOVA based modeling of liquid flow control process respectively. Using these parameters, values of liquid flow rate of the liquid flow and level measurement and control unit can be estimated for different cases or conditions. Table 8 describes a comparative study based on total absolute error. From Table 8, it can be clearly seen that ESWSA has the best performances in term of total absolute error for RSM based modeling, whereas ESWSA and MESWSA have superior performances for ANOVA based modeling. However, total absolute error for RSM based modeling (using all metaheuristics) is much lower than ANOVA based model. It signifies that the RSM based method can predict the values of liquid flow rate more accurately for all cases compare to the ANOVA based model.

Table 6 Estimated optimal parameters for RSM based modeling of liquid flow control process
Table 7 Estimated optimal parameters for ANOVA based modeling of liquid flow control process
Table 8 Comparative study based on total absolute error

Figures 4 and 5 show the relative errors versus different liquid flow rate measurement instances for RSM and ANOVA based modeling respectively. It can be clearly seen that the RSM based model has less relative error compare to the ANOVA based model. MESWSA and LESWSA show less relative error using RSM based model. In case of ANOVA based modeling, the relative error for ESWSA, MESWSA, LESWSA and LMESWSA are almost same. Therefore, the graphs are overlapped with each other in Fig. 5.

Fig. 4
figure 4

Relative errors for RSM based modeling of liquid flow control process

Fig. 5
figure 5

Relative errors for ANOVA based modeling of liquid flow control process

4.6 Overall efficiency test

Now, we summarize the performances of all algorithms based on above mentioned statistical criterions (which are minimum RMSE, maximum RMSE, mean RMSE, median RMSE, standard deviation of RMSE, success rate, computational time, convergence speed, absolute error and relative error) and compare among themselves. Therefore, we have assigned a performance score against each algorithm for each of the criterions. The value of this score is calculated as the ratio of number of cases (functions) where an algorithm achieves best result (criterion) to the total number of cases (i.e. RSM and ANOVA based modeling of liquid flow control process). Table 9 shows the comparative study based on these scores to evaluate overall efficiency of the proposed algorithms. The maximum score obtained by any algorithm for each of the performance criterions is highlighted in bold letter.

Table 9 Comparative study based on performance score of different performance criterions

It can be clearly noticed from following table that MESWSA performed best or better than others metaheuristics for all criterions except convergence speed and computational time. ESWSA is better for finding the best fitness. Another important observation is observed that MESWSA is better for ANOVA modeling, whereas LESWSA is very much suitable for the RSM based modeling of liquid flow control process. Moreover, LMESWSA is found to be best efficient algorithm with respect to success rate and computational time. On the other hand, LESWSA has better stability in output.

In summary, all the proposed algorithms have satisfactory performance for the modeling of liquid flow control process. However, some of them performed slightly better at few performance criterion and others are also performed better for others criterions. Overall, MESWSA achieved highest performance score (i.e. 9) which indicate that it is most efficient and suitable optimization technique among the improved version of ESWSA.

Now, overall efficiency is defined as the ratio of total performance score with number of performance criterion multiplied number of used models (Table 10).

Table 10 Comparative study based on performance score of different performance criterions
$$Overall\, Efficiency = \frac{Total\, Performance\, Score}{Number\, of\, performance\, criterion \times Number \,of\, model\, used} \times 100\%$$
(23)

It is clear that MESWSA has highest efficiency (i.e. 45%) and is most suitable technique for modeling of liquid flow control process.

4.7 Validation of the proposed methodology

However, to validate the proposed methodology for modeling of liquid flow control process two types of validation have been considered. First one is ‘cross validation’ where optimal models are applied against training or initial experimental data. Second one is ‘test new case’ where optimized models are applied against new set of input data which are not used during the training or optimization.

For cross validation, the liquid flow rate are calculated using best output or optimal model parameters (where RMSE or fitness is smallest amongst all program run) for all algorithms for both RSM and ANOVA based model. For cross validation, the data is the experimental data that obtained from the laboratory (shown in Table 2). Figures 6 and 7 shows of the experimental data and estimated liquid flow rate of liquid flow control process for RSM and ANOVA based model respectively using all proposed algorithms. It can be observed that the proposed MESWSA methodology can predict the liquid flow rate with greater accuracy or satisfactorily for the cases of RSM based model. LESWSA has significantly more deviation for RSM based model. On the other hand, all proposed improved versions of ESWSA perform same way for the prediction of liquid flow rate using ANOVA base modeling. It can be clearly seen that RSM based modeling has superior prediction capability compare to the ANOVA based model. Moreover, the prediction capability helps to validate the efficiency of the proposed algorithms. In case of Fig. 7, estimated liquid flow rate using ANOVA based model for ESWSA, MESWSA, LESWSA and LMESWSA are almost same. Therefore, the graphs are overlapped with each other in Fig. 7.

Fig. 6
figure 6

Comparisons of the characteristics of the experimental data and estimated liquid flow rate using RSM based model

Fig. 7
figure 7

Comparisons of the characteristics of the experimental data and estimated liquid flow rate using ANOVA based model

For testing new cases, we have observed a single experimental output (liquid flow rate) for each case of one 20 mm, 25 mm and 30 mm pipe diameter. During these experimentation the sensor output voltage were 0.221 V, 0.222 V and 0.232 V respectively. Next, optimal RSM and ANOVA based model (for all algorithms) were applied against these dataset to observe how the algorithm perform against new data which were not used during training. Tables 11 and 12 show the output results (liquid flow rate) for testing new cases for RSM and ANOVA based modeling respectively. It has been observed that RSM based model predict the liquid flow rate better than ANOVA based model for 1st experiment. On the other hand, ANOVA performed better for last two new cases. Moreover, it can be clearly seen that MESWSA has the superior capability in predicting the liquid flow rate for unknown cases. This statement exactly matches with the overall efficiency test where MESWSA is found to be most efficient algorithms over others.

Table 11 Output results for testing new cases for RSM based modeling
Table 12 Output results for testing new cases for ANOVA based modeling

5 Conclusions

Modeling of liquid flow control in a process industry is an interesting task for the researchers. Generally, liquid flow rate of Liquid Flow and Level Measurement and Control Unit depends on voltage output of sensor (Anemometer), diameter of the pipe, liquid viscosity and liquid conductivity etc. Initially, 36 number of measurements (i.e. liquid flow rate) have been observed from laboratory at different experimental conditions (i.e. for different values of pipe diameter and sensor voltage) In this study, our aim is to model the liquid flow control process so that we can find a relationship between liquid flow rate, pipe diameter and sensor voltage output (by keeping the liquid viscosity and conductivity at constant level). For this modeling purpose, we have used response surface methodology (RSM) and analysis of variance (ANOVA) as nonlinear models to establish the relationship between variables of liquid flow control process.

Now, finding out the suitable values of the parameters of RSM and ANOVA based model is essentially a nonlinear optimization problem. We need to find out the optimal values of the coefficient or parameters of the models using some suitable metaheuristic so that estimated liquid flow rate fit best with the experimental results. For this purpose, we have proposed three different improved version of elephant swarm water search algorithm (ESWSA) and observed their efficiency for the modeling of liquid flow control process. In cases of MESWSA, we have varied the Switching Probability along with iteration from 1 to 0. For LESWSA, global search is dominated according to the Lévy flight. On the other hand, LMESWSA utilized the characteristic of both varying Switching Probability and Lévy flight.

Numerical simulations are performed and the statistical analysis of the results is also given. All the results indicate that the performances of the proposed MESWSA outperformed the others for the most of the cases of modeling for liquid flow control process. But one of the major disadvantages of MESWSA is its slow convergence speed. On the other hand, ESWSA is better for finding the best fitness and LESWSA has better stability in output. Moreover, LMESWSA is found to be best efficient algorithm with respect to success rate and computational time. However, all algorithms can predict the liquid flow rate with satisfactory accuracy.

It is also found that RSM based model fits better than the ANOVA based model to characterize the liquid flow control process as \(RMSE\), \(TAE\) and \(RE\) are less for RSM based model. Moreover, average computational time for RSM based model is also lesser than ANOVA based model. However, due to requirement of higher dimensional search for RSM based model, the stability and success rate is slightly inferior than ANOVA based model. It has been found that MESWSA is better for ANOVA modeling, whereas LESWSA is very much suitable for the RSM based modeling

More detailed and accurate modeling of the liquid flow control process (including liquid viscosity and conductivity as the input variable) is the future aspect of this work. Moreover, further tunings of the metaheuristics are necessary to achieve more efficiency, accuracy, convergence speed, stability and success rate.