1 Introduction

Over the last decade, numerous studies both experimentally and numerically have been performed to appraise the heat transfer properties and their role in energy systems, especially in microchannels [1, 2]. A microchannel had shown a good thermal performance with its large heat transfer surface to volume ratio. It is proven to be able to dissipate heat flux effectively from localized hot spots over a small surface area [3]. Boiling heat transfer in a microchannel is a subject discussed by various researchers studying energy models or processes in a heat exchanger. The results of various published research drew different conclusions on the characteristics of the heat transfer coefficient in microchannels [4]. However, most has reported that their biggest obstacles are to minimize pressure drop and maximize heat transfer throughout the process without the uncertainties of parameters [5, 6]. Thus, predicting the heat transfer coefficients or their parameters has been addressed to enhance the advantages of the two-phase heat transfer system in microchannels [6, 7].

Additionally, the usage of environmentally friendly refrigerants has been favored nowadays. Propane is an environmentally friendly refrigerant, where it is a natural refrigerant with zero ozone depletion potential (ODP) and global warming potential (GWP) that can reduce the risk of damaging the atmosphere [8]. This potential natural replacement is a promising long-term solution yet lacked reliable studies. Therefore, it is necessary to develop an appropriate method for preparing and predicting the heat transfer parameters. This study analyzed the data of boiling heat transfer coefficient with propane as the working fluid in a microchannel system. Parameters like heat transfer coefficient or temperature difference in two phases are usually a function of many independent groups, valid over a finite range of values. The relationship between these parameters and their relevance to heat transfer coefficients can be deduced using new optimization techniques. Besides, the difficulty in heat transfer systems that experience the drastic effect due to some parameters or coefficient changed may reduce the overall performance [9]. It could bring large errors or instability to the experiments besides the relatively high expenses of experimental procedure. This has motivated the current study to provide a promising technique which can be applied to predicting heat transfer parameters with the use of modeling based on an optimization method.

Modeling a heat transfer system has been shown to save time, lower the risk, and reduce the expenses of experiments by understanding the dynamic behavior of the heat transfer analysis. The construction of the dynamic model also has allowed the estimation of parameters and efficiency of prediction that are crucial for the system. Since this system is complex, an appropriate model can be established using a well-known modeling method of system identification (SI) technique. System identification is the estimation process in each mathematical model structure that is equivalent to the identified system based on the measured input–output data [10]. Using this method, the derivation approach can be avoided which is relevant for difficult and nonlinear systems. This method is well developed and widely used [11]. Tafarroj et al. [12] applied artificial neural network (ANN) modeling for a heat sink in a microchannel. His objective function was to predict the Nusselt number, and they obtained 0.3% relative error. Meanwhile, Felde et al. [13] demonstrated the determination of inverse heat transfer coefficient using particle swarm optimization (PSO) on the surfaces of a cylindrical workpiece. It was shown that implementation of PSO methods had provided less time consumed and produced an accurate estimation for inverse heat conduction problems. Similar work had been done by Vakili and Gadala [14] where three variations of the PSO method had been introduced and they showed that PSO could reduce the stability problems of the classical methods. Besides, Yassin et al. [15] explored application of binary PSO (BPSO) for modeling a heat exchanger system. Results showed a good model fit between actual and predicted data. These investigations have shown that system identification can and had been able to solve many heat transfer problems.

Evolutionary algorithm (EA) is a practical alternative for solving computationally complex and mathematically intractable problems. Due to its wide applications such as in identification of complex dynamical systems, remarkable attention has been given to EA during the recent era. Nature-inspired evolutionary algorithms have a powerful performance and are highly efficient in solving any types of global optimization problems. One algorithm from that class is particle swarm optimization (PSO) which is generally used as an intelligent optimizer to compute any dynamics problems. PSO that was introduced by Kennedy and Eberhart in 1995 has been successfully proven to solve any optimization problem [16]. PSO algorithm is widely used and rapidly developed for its easy implementation, is simple in concept yet computationally efficient, and has a higher convergence rate [17].

Recently, the use of PSO algorithm in diverse applications has been widely investigated by researchers to solve optimization problems. However, many have reported that PSO algorithm can easily suffer a premature convergence of the optimization problems as particles converge to one solution at an early stage [18, 19]. Since the introduction of PSO, many researchers have worked on adjustments and improvement to the basic PSO algorithm in various ways. Other applications other than heat transfer analysis are also considered to highlight the contribution of modified PSO in identification modelling.

Chen et al. [20]. had implemented a hybrid algorithm between PSO and genetic algorithm (GA) technique (HPSO-GA) for identification of energy demand in a greenhouse. Their identification included parameters such as inertias and heat transfer constants. It was concluded that HPSO-GA was superior to each GA and PSO alone, had a fast convergence process, and avoided premature convergence on the parameter estimation. Additionally, Xing and Pan [11] applied an improved PSO based on a Gauss function for system identification as compared to the basic and binary PSO. It was found that improved PSO provided better results. Recently, Muyao et al. [21]. studied an ameliorated PSO (APSO) to solve the Bouc-Wen model parameter identification problem of a piezoelectric actuator. APSO introduced nonlinear dynamic acceleration coefficients and modified particle position update approach in its methodology. Identified Bouc-Wen model was experimentally verified and showed its fast convergence to a steady state.

PSO is a global, stochastic optimization technique inspired by social behavior of bird flocking and fish schooling [22]. The main strength of PSO is it has only a few parameters to be adjusted which promotes easy implementation with a higher rate of convergence [23]. Some studies on heat transfer using the PSO method have been carried out by some researchers [24,25,26]. Although many different methodologies have been applied in the basic PSO algorithm, there is still a limited amount of research that proposed a modified PSO as an optimization tool, especially in the field of heat transfer analysis in a microchannel. Thus, this research introduced a new methodology of PSO algorithm known as particle swarm optimization with discoverer (PSOd) to improve the optimization parameters for modeling the two-phase heat transfer analysis in a microchannel using system identification (SI). Firstly, series of experiments on two-phase heat transfer in a microchannel had been completed in a test rig with data on the temperature difference and mass flow rate collected. Next, PSOd identification was carried out using the input–output data acquired experimentally. The validity of the obtained model was investigated using input/output mapping, smallest mean square error (MSE), and correlation tests. Performance assessment of PSOd was then compared with the basic PSO.

2 Two-phase heat transfer in microchannel system

In this work, an experimental rig for two-phase heat transfer in a microchannel system was set up as illustrated in Fig. 1 [5]. The main observation was on the test section heated by an electrical heater. The test section was a horizontal tube with a diameter of 500 µm and length of 0.5 m. The propane temperature flowing in the test section was measured by attaching K-type thermocouples at the top and bottom of the test section, as shown in Fig. 1. There were five temperature measurement locations at the test section. Measured temperature difference (dT) along the channels was calculated and recorded as the input for modelling. Moreover, inserted thermocouples and pressure transmitters were installed at the inlet and outlet of the test section. A condensing unit was used to condense the evaporated propane. After the condensation process, the liquid refrigerant was pumped by a magnetic pump. A cooling bath was placed after the magnetic pump to maintain the working fluid in a liquid phase condition. A Coriolis flowmeter was used for measuring the flow rate of the refrigerant and taken as the output data for modelling. Before the propane entered the test section, it was flowed in a preheater to adjust the inlet temperature of the working fluid. There were sight glasses at the inlet and outlet of the test section for observation of the phase of the propane. The uncertainties of temperature, heat from the heater, and mass flow of working fluid are ± 0.42 °C, ± 0.05 W, and ± 0.05%, respectively.

Fig. 1
figure 1

Experimental setup [5]

3 System Identification (SI) using Particle Swarm Optimization with discoverer (PSOd)

Increasing demand from industries for the application of heat transfer technology in microchannels, especially in the electronic field, has increased due to their benefits. However, to control the effect of heat transfer when parameters are varied is difficult. Thus, the construction of the appropriate model for efficient parameters prediction is crucial. In this study, modeling of the two-phase flow of a propane system was conducted using a model structure of autoregressive with exogenous variables (ARX). Meanwhile, the optimization approach included the basic PSO and improved PSO, namely the particle swarm optimization with discoverer (PSOd). Basic relation of system identification can be expressed as in Fig. 2.

Fig. 2
figure 2

System identification relationship

In this modeling, the experimental input was extracted from the measured temperature difference (dT) along the tube in the microchannel system, which is obtained from the results of experimental measurements. Meanwhile, the experimental output was recorded from the mass flow rate readings from the Coriolis meter. For the heat transfer system model, dT was the system input, u(t), fed into the system; the mass flow rate was the measured output, ym(t); and the estimated output generated was y(t). Prior to that, an appropriate order and parameters for the model were essential to be determined that best fit the relation between inputs and outputs. The most basic relationship of an ARX model structure is given by the following [10]:

$${y}_{m}\left(t\right)=\frac{B\left({z}^{-1}\right)}{A\left({z}^{-1}\right)}u\left(t\right)+\frac{\xi \left(t\right)}{A\left({z}^{-1}\right)}$$
(1)

where

$$A\left({z}^{-1}\right)=1+{a}_{1}{z}^{-1}+\dots +{a}_{n}{z}^{-1}$$
$$B\left({z}^{-1}\right)={\mathrm{b}}_{0}+{b}_{1}{z}^{-1}+\cdots +{b}_{n}{z}^{-\left(n-1\right)}$$

z−1 is a backshift operator, n is the order of the model, and white noise, \(\xi \left(t\right)\)= 0, and [a1,…,an,b1,…,bn] are model parameters that need to be optimized. Polynomials of A(z−1) and B(z−1) consist of model parameters that need to be optimized too and can be expressed as in a transfer function form, H(z−1), as follows:

$$H\left({z}^{-1}\right)=\frac{B\left({z}^{-1}\right)}{A\left({z}^{-1}\right)} = \frac{{b}_{0}+{b}_{1}{z}^{-1}+..+{b}_{n}{z}^{-(n-1)}}{1+{a}_{1}{z}^{-1}+...+{a}_{n}{z}^{-n}}$$
(2)

The accuracy of the predicted output is measured in terms of the mean squared error, MSE, which is defined by the following:

$$MSE = \frac{1}{S}{\sum }_{i=1}^{S}{\left(\left|{y}_{m}\left(i\right)-y\left(i\right)\right|\right)}^{2}$$
(3)

where S is the number of samples. Equation (3) is the objective function to be minimized, optimizing the parameters in Eq. (2). The generated optimized parameters were later used to update the system model. This process was repeated until the maximum iteration number was reached or a minimization criterion was achieved. In this study, validation tests were carried out based on input/output mapping, mean squared error (MSE), and correlation tests.

PSO was initialized with the population called swarm of random particles, “fly” in the d-dimensional search space of an optimization problem. Every particle is updated with the two “best” values at each iteration. The first one is the best position a particle has visited so far, called pbest (Pid). Secondly, the best position obtained so far by any particle in the swarm is called a global best or gbest (Pgd). Both best positions are memorized, and then, the particle is accelerated towards those two best values by updating the particle position and velocity using the following set of equations [22]:

$$\begin{array}{c}{v}_{id}(t) = w{v}_{id}(t-1) \\ +{C}_{1}.rand.({P}_{gd}-{x}_{id}(t-1))\\ +{C}_{2}.rand.({P}_{gd}-{x}_{id}(t-1))\end{array}$$
(4)
$${x}_{id}(t)={x}_{id}(t-1)+{v}_{id}(t)$$
(5)

vid(t) and xid(t) are the current velocity and position vector for i-th particles at time t respectively. There are two acceleration coefficients, usually C1 = C2 = 2 as suggested in the literature [22], and rand is the random number between 0 and 1. w is the inertia that serves as memory of the previous direction, preventing the particle from drastically changing direction. A high value of inertia promotes global exploration and exploitation which is preferable at the early part of optimization. Meanwhile, a low value of inertia leads to a local search during the latter part when the algorithm converges to the optimal solution. A balance between the global and local search are preferable and thus linearly decreasing w during the search process over time which can be expressed as follows:

$$w(t)={w}_{start }- \frac{({w}_{start}- {w}_{end})}{{T}_{max}}.t$$
(6)

Tmax is the maximum number of time steps the swarm is allowed to search. wstart and wend are the start and end point of inertia weight, respectively, defined as linearly decreasing from 0.9 to 0.25.

Although PSO has been proven to solve many optimization problems, many have reported that the swarm in PSO might undergo diversity loss as iteration proceeds. Some particles may become passive and lose their global and local search capability in the next iteration and only “fly” within a quite small area. This leads to a premature convergence of the optimization problems [20]. In the worst situation where the particle is flying in a small area with its position and pbest close to gbest, and almost zero velocities at the latter stage, the swarm is said to be in stationary, and no possibility of evolution is expected [27].

PSOd is proposed to solve the problem of getting stuck to a local minimum while maintaining the main strength of the basic PSO, thus improving the overall performance of the algorithm. Inspired by the behavior of scout bees in the artificial bees colony (ABC) algorithm, similar behavior is injected into the PSO algorithm, namely as PSO with discoverer (PSOd). For sustainable development, a discoverer was introduced to satisfy the requirements that take the swarm away from the equilibrium state and avoid a premature convergence. The discovery searching of a particle can be illustrated as in Fig. 3.

Fig. 3
figure 3

Passive particle become discoverer

Furthermore, diversity of the swarm can be enhanced since the discoverer can explore new potential positions, and thus, passive particles can be replaced. The discoverer was constructed in the algorithm under a situation where the particles fitness values have been maintained for a certain limit of iterations to avoid loss of good particles. After a limit has been reached, a particle will be given their personal best position and a new velocity to explore a new potential search space as in Eq. (4). The discoverer position was replaced by their pbest value to allow the discovery of a more promising region so that the searching will not become chaotic and random but associated with a random velocity to avoid stagnation state at zero velocity. The pseudo code of PSOd is depicted as in Fig. 4.

Fig. 4
figure 4

Pseudocode of PSOd

Figure 5 shows the flowchart of the PSOd with the methodology of discoverer as highlighted.

Fig. 5
figure 5

Flowchart of PSOd

4 Results and discussion

It is crucial to identify a satisfactory and accurate model of the microchannel heat transfer system so that the best parameters estimation can be achieved to prevent a performance drop or drastic change during a heat transfer analysis. To date, experimental data on the heat transfer of propane in a microchannel is still scarce due to the large amount investment necessary: cost, time, and effort. Consequently, the performance of PSOd in modeling the heat transfer in a microchannel system as shown in Fig. 1 was studied in comparison with the standard PSO.

The input–output data that was collected was not large but varied in power input supply, thus contributing to many data sets. The SI was performed for each set of data. For each input power supply, the total number of data collected was less than 100. Only 20% of the total data was used for training, while the rest was used for testing. The ratio of training data to the testing data was small because within that training range, crucial behavior of the system was successfully captured. Acquired input–output data was then fed into a system identification (SI) method.

With the new modification of the standard PSO algorithm, PSOd is expected to improve the performance of global optimization. The model performance was observed in input/output mapping, the value of MSE, convergence of parameters, and correlation tests. Both PSO and PSOd are stochastic search methods where the solutions produced by the algorithms may vary each time. It is important to select the right model order in the identification process. Therefore, simulations were carried out by varying the number of particles, number of iterations, and orders until the smallest MSE value was recorded. It was started by varying the number of particles in order of 2. Then, the tuning is initialized by setting the number of iterations to 50 and varying the number of particles from 50 to 150. After the best number of particles is achieved, PSO and PSOd modeling was observed with increment of iterations from 50 to 200. Next, maintaining the best number of particles and iterations, model order was varied until satisfactory results were obtained. Figure 6 recorded the best results that achieved minimum MSE value for each of the dataset.

Fig. 6
figure 6

Minimum MSE values of PSOd and PSO for each dataset

From Fig. 6, it is noted that at all the dataset of varying input power supply, PSOd is able to capture the lowest MSE value as compared to the standard PSO. This situation becomes obvious at input 14.2 Watt where a very large difference of MSE value is obtained between PSOd and PSO. The ability of the discoverer to discover a new potential area position and prevent particles from a stagnant state may cause this situation to happen. It can be concluded that the absolute minimum MSE that is best recorded by both PSOd and PSO is at 31.4 W. Table 1 shows comparative results between PSOd and PSO modeling in achieving minimum MSE.

Table 1 Comparative assessment

From Table 1, both models achieved the best results with an order of 2. The smaller MSE is obtained by PSOd modeling with 6.2629 × 10−11. Superiority of the PSOd can be seen with the lesser number of particles needed which is 100 with a faster iteration number compared to PSO to converge to the best MSE value. This fast convergence of PSOd may be due to a wider exploration and promising potential area of discoverer to reach the global optimum. Discoverers shared their best information within particles and were often quick to identify good solutions, thus contributing to better fitness with less iteration.

Next, from the best model obtained, the parameter convergence of PSOd and PSO was investigated as in Fig. 7 to observe the effect of discoverer on diversity of swarm in heat transfer modeling.

Fig. 7
figure 7

Parameter convergence a in PSO, b in PSOd, c discoverer convergence in PSOd

When a particle becomes a discoverer, its new position will be replaced with its own pbest position in history as can be seen in Fig. 7c where the new explorations are not too random and fluctuated but still away from being trapped. This is to avoid the searching becoming random searching and thus loss of potential position. From Fig. 7a, it is noted that the model parameter of PSO has already converged at an early stage. There is a high possibility of premature convergence, and the evolution of particles almost stagnated at equilibrium state. Meanwhile, the advantages of the discoverer can be seen in parameter convergence of PSOd as shown in Fig. 7b and c. As particles start moving towards an optimum solution, passive particles will become discovered to avoid stagnation state and add diversity to the swarm. As in Fig. 7b, model parameters have an active path and only converge after 100th iterations. Discoverers prevent particles from being stuck on local minima because gbest will be updated if an acceptable solution is present on the moving trajectory of the discoverer. However, if the discoverer’s position does not contribute to the better fitness, gbest value of the entire swarm is maintained, and particles are within the locality of the best position as illustrated in Fig. 7c.

Besides, it is revealed that with the addition of the new pseudocode in PSOd algorithm to reflect the discoverer work, the execution time of the algorithm during optimization is not extended as shown in Fig. 8. It proves that complex searching of discoverer to find the potential area position does not affect the computational effort and thus lagging the computing execution time.

Fig. 8
figure 8

Average execution time

Thus, the best model of heat transfer analysis in a microchannel system has successfully been identified by PSOd algorithm that describes the dynamic of the system. The advantages of the discoverer have increased the diversity of the swarm, prevent particles from being trapped at a local minimum, promisingly find quality optimal solutions, and thus enhance the performance of the PSOd to outperform their standard counterparts. This obtained PSOd best model needs to be validated by input–output mapping and correlation tests to determine the effectiveness of the developed model. Figure 9 shows the convergence profile of PSOd in achieving a minimum MSE value. The model parameters optimized by PSOd can be represented in a transfer function form as in Eq. (2) as follows:

Fig. 9
figure 9

PSOd algorithm convergence

$${H}_{1}(s) =\frac{{-0.225s}^{2}-119.8s+348.1}{{s}^{3}+23.75{s}^{2}+1168 + 5299}$$
(7)

Figure 10 shows the simulated mass flow rate of best PSOd modeling against the actual mass flow rate measured. It is noted that the output response almost matched one another where the PSOd modeling tried to find the best line between a drastic change that occurred in the actual output of the two-phase microchannel system. The error of output between actual and PSOd prediction is shown in Fig. 11 based on the difference between the measured and estimated data. It is noted that at the beginning, there is a sudden difference in error due to the adjustment of the algorithm to learn the dynamic of the system during the training data. However, after 20% of the data was trained, PSOd modeling adjusted to match the output response closely and reduced the error. A correlation test was then used to validate the developed model as shown in Fig. 12. Figure 12a shows the autocorrelation to represent the similarity between an input and its lagged data in time domain, and Fig. 12b is a cross correlation to track the movements of input sets over time and its ability to match up with each other. From Fig. 12, it was found that both correlations are within 95% confidence interval which indicates a satisfactory correlation and acceptable model fit of identification. This concludes that PSOd has been successful in preventing the particles from being trapped in a local minimum and performed well in acquiring promisingly a good quality global minimum fitness value. PSOd has outperformed its standard PSO in terms of faster convergence in achieving the objective function, consistent in every heuristic dataset, and easy implementation. It has performed well in modeling the two-phase heat transfer analysis in a microchannel system which gives the best representation of the physical system with a minimum MSE value and a good correlation test indicating an effective PSOd model. This representation of an identified model will provide a good platform to be used in parameter prediction before adapting to the actual experiment. The outcomes obtained in this study show savings expected with prior prediction of the mass flow rate with changes in the temperature differences measured. This encourages continuous efforts in experimental analysis of potential new refrigerants in our move towards a more sustainable environment.

Fig. 10
figure 10

PSOd modeling and actual output

Fig. 11
figure 11

Error of the output

Fig. 12
figure 12

Correlation tests of PSOd modeling a autocorrelation, b cross correlation

5 Conclusion

In this study, a new tuning optimization technique namely the PSOd strategy has been utilized to identify a two-phase microchannel heat transfer system behavior, expected mass flow rate with variations in the temperature difference across an experimental test rig. PSOd performance was compared to the standard PSO algorithm. Validation tests were carried out through input–output mapping, MSE, and correlation tests. For the system identification (SI), acquired experimental input/output was fed into the algorithms, and the error between the actual and estimated output was minimized to achieve a good model of the system behavior. Results showed that the modelled output almost matches the measured data with a 95% confidence level attained. It is noted that the PSOd modeling technique has outperformed its standard algorithm. The SI with PSOd has successfully modelled the experimental rig with the temperature difference across the test section as the input and the mass flow rate as the output. The model with PSOd can provide useful expectations of experimental outputs before the experiments are done. Consequently, much time and effort can be saved with the predicted behavior of the two-phase flow in a microchannel. The outcomes shown in this study also point towards possible better multiple input–output predictions of experimental parameters.