Introduction

Optimization problems can be found in almost all engineering fields. Thus, the development of optimization techniques is very essential for engineering applications. Most traditional optimization methods require information about the gradient, and therefore they cannot be used to solve non-differentiable functions. Furthermore, such methods usually suffer from falling into the local optimum when solving complex optimization problems with many local optima. However, many real-world engineering optimization problems are very complex, and their target functions usually have multiple local optimums. The disadvantages of traditional optimization methods have led researchers to develop better optimization methods for solving real engineering optimization problems, thus developing heuristic optimization methods [1].

Lately, many metaheuristics algorithms have been successfully applied to solve a wide range of optimization problems [2,3,4,5]. The advantage of using these algorithms for solving complex problems is that they get optimal solutions even for problems of large dimensions in a short time [6]. A growing interest has been observed in metaheuristic methods over the last 2 decades. Authors in [6] gave the search result of the number of related studies for the metaheuristics on google scholar website (in May 2019). The algorithms are: Genetic Algorithms (GA), Particle Swarm Optimization (PSO), Tabu Search (TS), Genetic Programming (GP), Differential Evolution (DE), Ant Colony Optimization (ACO), Simulated Annealing (SA), Artificial Bee Colony (ABC), Greedy Randomized Adaptive Search Procedure (GRASP), Variable Neighbourhood Search (VNS), Firefly Algorithm (FA), Cuckoo Search (CS), Harmony Search (HS), Scatter Search (SS), Social Spider Optimization (SSO), Bacterial Foraging (BFO), Bat Algorithm (BA), Gravitational Search Algorithm (GSA) and Biogeography-based Optimization (BBO). GA and PSO have the largest numbers 1,270,000 and 263,000 related papers respectively.

Currently metaheuristic methods are successfully used to solve many problems of engineering optimization, such as multi-robot path planning, un-manned aerial vehicles navigation, the opinion leader detection in online social network, the identification of influential users in social network; the deployment of unmanned aerial vehicles, the data collection system of Internet of Things, the localization in wireless sensor network localization. In this article, we will consider the application of a metaheuristic algorithm, namely, the gravitational search algorithm, to solve the inverse problem of chemical kinetics in application to heterogeneous catalysis. In recent years, some metaheuristic optimization algorithms, such as Particle Swarm Optimization [7], Genetic Algorithms [8, 9], have been applied to solve chemical kinetics problems. However, there is still no persistent conclusion to select a certain algorithm to solve inverse problems of chemical kinetics.

This research is aimed at investigating the effectiveness of metaheuristic algorithms in solving inverse kinetic problems. This work is devoted to the implementation of a gravitational search algorithm for finding the kinetic parameters of an important industrial chemical process. GSA is one of the powerful metaheuristic algorithms currently available that is utilized to solve numerous applications of optimization problems. Furthermore, researchers have proposed a large diversity of methods to improve GSA, such as using enhanced operators, hybridization of GSA with other heuristic algorithms, and parameter adaptation and control schemes for GSA. Despite the fact that GSA appeared recently, it is already widely used. The literature search showed that there is no work on applying the gravitational search algorithm to chemical kinetics problems now, which indicates the relevance of the research.

Mathematical model

The process under study is propane pre-reforming into methane-rich gas over Ni catalyst, which is an industrially important chemical process [10]. Pre-reforming of propane was studied over industrial nickel–chromium catalyst at pressure of 1 and 5 bar, low steam to carbon molar ratio of 1, in the temperature range of 220–380 °C and at flow rates of 4000 and 12,000 h−1. The experimental data on propane pre-reforming was acquired from our previous work [11]. The reaction scheme consists of two reactions: propane steam conversion and CO2 methanation [12]:

$${\text{C}}_{{3}} {\text{H}}_{{8}} + {\text{6H}}_{{2}} {\text{O}} \to {1}0{\text{H}}_{{2}} + {\text{3CO}}_{{2}}$$
(1)
$${\text{CO}}_{{2}} + {\text{4H}}_{{2}} \rightleftarrows {\text{CH}}_{{4}} + {\text{2H}}_{{2}} {\text{O}}$$
(2)

It was shown [11] that the Langmuir–Hinshelwood (LH) model correctly describes the experimental data and can be used to simulate the process of propane pre-reforming and predict propane conversion under given reaction conditions. So the reaction rates (1)–(2) are expressed according to the LH model:

$$W_{ref} = \frac{{k_{ref}^{0} \cdot \exp \left( { - \frac{{E_{ref} }}{RT}} \right) \cdot C_{{{\text{C3H8}}}} }}{{\left( {1 + B \cdot C_{{{\text{C3H8}}}} } \right)^{m} }};$$
$$W_{met} = k_{met}^{0} \cdot \exp \left( { - \frac{{E_{met} }}{RT}} \right) \cdot C_{{{\text{H2}}}} \cdot \left[ {1 - \frac{{P_{{{\text{CH4}}}} P_{{{\text{H2O}}}}^{2} }}{{K_{eq} P_{{{\text{CO2}}}} P_{{{\text{H2}}}}^{4} }}} \right],$$

Here Wref and Wmet are the reaction rates; Eref and Emet are the observed activation energies, J/mol; k0ref and k0met are the pre-exponential multipliers; B is the constant parameter, T is the temperature, K; R is the universal gas constant, J⋅(K·mol). The “ref” and “met” indexes refer to pre-reforming and methanation reactions, respectively. CC3H8 and CH2 are concentrations of propane and hydrogen, mol/m3; m is order of the denominator, which varied from 0 to 2; Keq is the equilibrium constant of CO2 methanation; PCH4, PH2O, PCO2, PH2 are partial pressures of the corresponding substances, bar. The mathematical model is a system of equations of material balance:

$$\left\{ {\begin{array}{*{20}l} {G\frac{{dy_{i} }}{dl} = \left( {\nu_{i}^{ref} W_{ref} + \nu_{i}^{met} W_{met} } \right)m_{i} } \hfill \\ {0 \le l \le L,\quad i \in \left\{ {{\text{C}}_{{3}} {\text{H}}_{{8}} {\text{,CH}}_{{4}} {\text{,H}}_{{2}} {\text{O,H}}_{{2}} {\text{,CO}}_{{2}} } \right\}} \hfill \\ {l = 0,\quad y_{i} = y_{i0} ,} \hfill \\ \end{array} } \right.$$
(3)

Here G is a mass flow of the mixture, kg/(m2 s); yi is a mass fraction of the i-th component; νi is a stoichiometric coefficient of the i-th component; mi is a molar mass of the i-th component, kg/mol; l is coordinate along the catalytic layer, m; L is a length of the catalytic layer, m. The length of the catalytic layer is 0.008 m. The mathematical model of chemical kinetics problems is a system of differential equations that describes the variations in substance concentrations over time according to the rates of reaction stages. The system of differential equations is a Cauchy problem containing the initial data [13,14,15]. The numerical solving of such a system of equations is a direct problem of chemical kinetics. Determining the kinetic parameters of reaction stages by comparing calculated values of substance concentrations and experimental results is an inverse problem of chemical kinetics. The mathematical problem is to minimize the functional of the deviation between calculated and experimental values. The functional of minimizations determined as the sum of absolute deviations between calculated and experimental concentrations:

$$F = \sum\limits_{i = 1}^{M} {\sum\limits_{j = 1}^{N} {\left| {x_{ij}^{calc} - x_{ij}^{\exp } } \right|} } \to \min ,$$
(4)

Here xijcalc and xijexp are calculated and experimental values of component concentrations; M is the number of measuring points; N is the number of substances involved in the reaction.

The framework of proposed algorithm

In this section, the algorithms used in this paper are briefly introduced. We consider Gravitational search algorithm for solving the inverse problems of chemical kinetics. GSA has been recently developed and found to be comparatively efficient. This algorithm is nature inspired and population-based. A brief description of the algorithm and pseudocode will be given.

Gravitational search algorithm (GSA)

GSA was proposed by Rashedi et al. [16]. In this algorithm, search agents are objects, and the best ones have a large mass. Objects are attracted to each other by the force of gravity. Agents with a large mass attract lighter ones. Each object represents a solution to the problem and has its own position, inertial mass, passive and active gravitational masses. The heaviest agent is the current best solution, and other agents are attracted by this agent. The GSA applies Newtonian laws of gravity and motion. Each object attracts each other, and the gravitational force between two objects is proportional to the product of their masses and inversely proportional to the distance between them, R. That is in an environment with N objects the position of object i is equal to:

$$X_{i} = X_{i}^{1} ,\; \ldots \;X_{i}^{d} ,\; \ldots ,\;X_{i}^{n} ,\quad for\;i = 1,2,\; \ldots ,\;N,$$

Here Xid is the position of object i in the dth dimension. The force applied to object “i” from agent “j” at time t is:

$$F_{ij}^{d} \left( t \right) = G\left( t \right)\frac{{M_{pt} \left( t \right)M_{aj} \left( t \right)}}{{R_{aj} \left( t \right) + \varepsilon }}\left( {X_{j}^{d} \left( t \right) - X_{i}^{d} \left( t \right)} \right),$$

Here Maj is the gravitational mass applied to agent j, Mpi is the passive gravitational mass applied to agent i, G(t) is gravitational at time t, ε is a small constant, and Rij(t) is the Euclidian distance between objects i (i = 1, 2, …, N) and j (j = 1, 2, …, N):

$$R_{ij} \left( t \right) = \left\| {X_{i} \left( t \right),X_{j} \left( t \right)} \right\|_{2} .$$

The total force that is applied to object i in d is a random sum of dth components of the forces from other objects:

$$F_{i}^{d} \left( t \right) = \sum\limits_{j = 1,j \ne i}^{N} {rand_{j} F_{ij}^{d} \left( t \right)} ,$$

Here randj is a number in [0,1]. The acceleration of the object i at time t, and in direction dth, aid(t) is given as:

$$a_{i}^{d} \left( t \right) = \frac{{F_{ij}^{d} \left( t \right)}}{{M_{ii}^{d} \left( t \right)}},$$

Here Mii is the inertial mass of object i. The new velocity of an object is a fraction of its current velocity and its acceleration. Its position and velocity are calculates as follows:

$$\begin{aligned} v_{i}^{d} \left( {t + 1} \right) & = rand_{i} v_{i}^{d} \left( t \right) + a_{i}^{d} \left( t \right), \\ x_{i}^{d} \left( {t + 1} \right) & = x_{i}^{d} \left( t \right) + v_{i}^{d} \left( {t + 1} \right), \\ \end{aligned}$$

Here randi is a uniform variable in [0,1]. The constant, G, is initialized and reduced with time to control the accuracy of the search:

$$G\left( t \right) = G\left( {G_{0} ,t} \right).$$
(5)

The gravitational and inertial masses are updated by the equations given below:

$$M_{ai} = M_{pi} = M_{ii} = M_{i} ;\quad i = 1,\;2,\; \ldots ,\;N;$$
$$m_{i} \left( t \right) = \frac{{fit_{i} \left( t \right) - worst\left( t \right)}}{best\left( t \right) - worst\left( t \right)},\quad M_{i} \left( t \right) = \frac{{m_{i} \left( t \right)}}{{\sum\nolimits_{j = 1}^{N} {m_{j} \left( t \right)} }},$$

Here fiti(t) represents the fitness value of the agent i at time t, and, worst(t) and best(t) are defined as follows (for a minimization problem):

$$best\left( t \right) = \mathop {\min }\limits_{{j \in \left\{ {1, \ldots ,N} \right\}}} fit\left( t \right),\quad worst\left( t \right) = \mathop {\max }\limits_{{j \in \left\{ {1, \ldots ,N} \right\}}} fit\left( t \right).$$

The GSA pseudocode is shown in Table S1 (Supplementary Information) [6]. We developed a program in the Python 3 programming language, based on the code repository available at the link https://github.com/himanshuRepo/Gravitational-Search-Algorithm (open access).

Comparison of GSA with state-of-the-art algorithms

To evaluate the proposed GSA, five benchmark functions were used. All test functions have been listed in Table 1, where D indicates dimension of the function (D = 30), Range is the boundary of the function’s search space and Opt is the global minimum. F1–F3 are unimodal functions, whereas F4–F5 are multimodal functions.

Table 1 Benchmark functions

To compare the optimization performance among different algorithms, we used the next quality indicators—mean value and standard deviation. The smaller the mean value is, the stronger the global optimization ability of the algorithm is; the smaller the standard deviation is, the more stability the algorithm is. Table 2 shows the obtained results. In this table, \(\bar{x}\) and s indicate “mean value” and “standard deviation” respectively. Best results are highlighted in bold. Mean value and standard deviation are calculated as follows:

$$\overline{x} = \frac{1}{n}\sum\limits_{i = 1}^{D} {x_{i} } ,\quad s = \sqrt {\frac{1}{n - 1}\sum\limits_{i = 1}^{D} {\left( {x_{i} - \overline{x}} \right)^{2} } } .$$
Table 2 The experimental results for five benchmark functions obtained by six metaheuristic algorithms

We compared the performance between GSA and five state-of-the-art algorithms: Cuckoo Search (CS), Grey Wolf Optimizer (GWO), Whale Optimization Algorithm (WOA), Particle Swarm Optimization (PSO) and Salp Swarm Algorithm (SSA) [1]. The statistical results obtained by six algorithms have been shown in Table 2. Despite the gravitational search algorithm did not show the best results, it appeared to be acceptable for our further work.

The following expression was used as a function of Eq. 5:

$$G = G_{0} \exp \left( { - \frac{\alpha t}{z}} \right),$$
(6)

Here z is the number of iterations.

The parameters used in the GSA algorithm are as follows: population size = [100, 200], α = 30, G0 = 250. The convergence curves of the best objective functions value for benchmark functions F1–F5 are shown in Fig. 1. This figure proves that GSA can attain the best parameters in < 250 iterations.

Fig. 1
figure 1

The convergence curves for benchmark functions F1F5, shown in Table 1. Dependence of the best objective function value on the number of iterations. The algorithm parameters are as follows: the population size is 100, α = 30, G0 = 250

After testing the algorithm on benchmark functions, the GSA was applied to solve a real problem, namely, the inverse problem for the process of propane pre-reforming into methane-rich gas over Ni catalyst (Fig. 2).

Fig. 2
figure 2

Temperature dependences of the output concentrations of propane C3H8, methane CH4, hydrogen H2 and CO2 in the process of propane pre-reforming. Experimental conditions: 220–380 °C, GHSV 4000 h−1, 1 bar pressure, reaction mixture: 25 V% C3H8, 75 V% H2O. Concentrations of the gas components on the figure are given on the dry basis. Points are experimental concentrations (“exp”-index), lines are simulated concentrations (“calc”-index)

Simulation results

GSA for solving the inverse problem of chemical kinetics

In this section, the values of Eref, Emet, kref, kmet, B and m, included in the expression of reaction rates Wref and Wmet, were optimized. When solving the inverse problem, the values of Eref, Emet, k0ref, k0met varied, while the value of B varied from 0 to 5, and m—from 0 to 2. The values obtained are shown in Table 3 in comparison with our previous work [11], in which we used a genetic algorithm (GA). The parameters of GSA were configured as follows: α = 30, G0 = 250, the population size was 1400. The value of the functional F has become slightly smaller in comparison with the genetic algorithm; the kinetic parameters have approximately the same order when solved by these two algorithms. Fig. 3 shows a comparison of rate coefficients that were achieved in this optimization and what were used in the earlier work [11] on an Arrhenius plot. The dependences of rate constant kref of the reaction 1 obtained by the GSA and GA algorithms are almost identical, while the dependences for the rate constant kmet of the reaction 2 are slightly different. This suggests that the kinetic parameters included in the Wmet equation have a low sensitivity to the solution of this problem.

Table 3 The values Eref, Emet, kref, kmet, B and n obtained as a result of solving the inverse problem
Fig. 3
figure 3

Comparison of the rate constants of stages (1) and (2) obtained by the GA [11] and GSA algorithms on an Arrhenius plot

The obtained optimal values were used to solve the direct problem of chemical kinetics (Eq. 3). Fig. 4 shows the results of calculations for experiments on propane pre-reforming. The model correctly describes the available experimental data.

Fig. 4
figure 4

Bars show the dependence of sum of absolute deviations between calculated and experimental concentrations (F in Eq. 4) on the population size. The line demonstrates the time spent on the calculation

Parameter setting and sensitivity analysis

The sensitivity of some parameters of GS was experimentally investigated. A set of about 100 test problems (see Figs. 4, 5, 6) is utilized to study the sensitivity of parameters of GA. Each computational experiment was performed three times, the plots show the average value. The sensitivities of three important parameters such as population size, G0 and α were studied. In the case of population size, 15 different values of population size in GSA, i.e. population size equal to 100, 200, …, 1500 are considered in this analysis. Values of G0 and α were fixed (G0 = 250, α = 30) and only the value of population size was modified in every simulation. The outcomes of functional F (see Eq. 4) and the time spent on the calculation are shown in Fig. 4. It is obvious that with increasing population size, the computational time increases. This is because the number of objects in the GSA environment increases and each object requires solving a system of ordinary differential equations (Eq. 3). However, Fig. 4 shows that when the population size is above 1400, the value of the functional F increases, therefore population size = [200; 1400] is recommended in this work.

Fig. 5
figure 5

Experimental results of GSA with varying the parameter G0 from 20 to 280. Bars show the dependence of sum of absolute deviations between calculated and experimental concentrations (F in Eq. 4) on the parameter G0. The line demonstrates the time spent on the calculation

Fig. 6
figure 6

Experimental results of GSA with varying α from 10 to 50. Bars show the dependence of sum of absolute deviations between calculated and experimental concentrations (F in Eq. 4) on the parameter α. The line demonstrates the time spent on the calculation

For G0, fifteen different values were considered, i.e. G0 = 10, 20, 40, …, 280 to analyze the sensitivity of G0 in the performance of the GSA. The other parameters were configured as follows: α = 30, the population size is 100. The results are shown in Fig. 5. We have not found an explicit dependence of the value of the functional F and the calculation time on the value of the parameter G0. The nature of the dependence of F on G0 is not linear, so it can be concluded that the performance of GSA is not highly sensitive to value of G0. We suggest using the G0 parameter value of no more than 260.

We also investigated the effect of the parameter α in Eq. 6 on the convergence of the algorithm. The algorithm was run with variation of the parameter α in the range from 10 to 50 with a step of 10. The other parameters were configured as follows: G0 = 250, the population size is 100 to speed up calculations, the number of iterations of the algorithm was 200. Fig. 6 shows the values of the functional F for different values of parameter α (bar chart) and the time spent on the calculation (line). The figure shows that for this problem, the optimal values of α are from 10 to 40, at which the minimum value of the functional F will be obtained in a relatively short time.

Conclusions

This paper shows that the gravitational search algorithm can be successfully applied to solve inverse problems of chemical kinetics. To show that the algorithm works, the algorithm has been tested on five benchmark functions, and the algorithm has shown good performance. After that, the gravitational search algorithm was used to find the kinetic parameters of the pre-reforming process. The obtained values of kinetic parameters coincide with those found in previous studies. Moreover, for this chemical process, we analyzed the sensitivity of the algorithm parameters to the problem solution. The ranges of algorithm parameter values that are most suitable for this task were found. The advantages of the algorithm include the following: ease of implementation, the ability to solve problems not only local, but also global optimization, what are the problems of chemical kinetics, as well as fast convergence of the algorithm. In the future, it is planned to apply this algorithm for kinetic modeling of other chemical processes.