Implementation of artiﬁcial neural-networks to model the performance parameters of Stirling engine

– The Stirling engine is deﬁned as a simple form of external-combustion engine which employs a compressible working ﬂuid. From a theoretical point of view the Stirling engine can be very eﬀective at Carnot eﬃciency to convert heat into mechanical work. It is an environmental friendly heat engine which could reduce CO 2 emission through combustion process. Performance of Stirling engine changes via changing several variables and the aforementioned variables should be optimized to accomplish maximum performance of Stirling engine. Among all the variables representing the performance of Stirling engine, output power and shaft torque are most common for illustrating the performance of Stirling engines. In this research predicting two aforementioned variables with high accuracy and ﬂexibility is investigated. To gain this goal, a predictive and easy-to-use tool is developed based on the concept of the artiﬁcial neural network (ANN) to predict output power and shaft torque of the Stirling engine. Furthermore, precise data samples from previous researches are employed to construct this easy-to-use model. Based on the outputs obtained from an easy-to-use model developed in this research, ANN model could help experts in designing of Stirling engine with low degree of uncertainty.


Introduction
The Stirling engine, is a high potential heat engine for power generation with a high thermal efficiency approximately equal to the Carnot's efficiency when it is ideal with no loss in an isothermal process.However the a Corresponding author: mohammadhosein.ahmadi@gmail.comisothermal process requires infinite time which leads to approaching the power to zero.In the Stirling cycle which is a closed regenerative cycle, the movement of working fluid such as air, hydrogen, helium, nitrogen etc. between hot and cold spaces produces work by expansions and compression processes.The Stirling engine is an external combustion engine, which can be powered by various heat sources such as biomass, solar, nuclear, convectional fuel, etc, even waste heat from an upstream cycle [1][2][3].
The Stirling engine has high potential efficiency, flexible fuel choice, low nitrogen oxides production, minimal vibration, high reliability and highest specific work output for any closed regenerative cycle in comparison to conventional internal combustion engines [4].Therefore, development and improvement of Stirling engine performance as a suitable power generator are the focus of researchers these days.Prodesser [5] constructed a Stirling engine which is being fed with biomass fuel to generate electric power.It can obtain 3.2 kW electric powers in pressure of 33 bars.Sripakagorn and Srikam [6] constructed a beta-type Stirling engine which worked at a moderate temperature sort which obtained 95.4 W of power in condition of 773 K and 7 bar.Karabulut et al. [7] built a Stirling engine which can obtain 183 W of power and works with helium in 4 bars of pressure.Cheng and Yu [8] investigated a numerical model for a beta-type Stirling engine which could identify affecting geometrical characters such as Non-isothermal influences, the effectiveness of the regenerative channel, etc. Chen and colleagues [9] proposed a numerical model for a c-type Stirling engine which could be able to estimate some geometrical and process characters.The regeneration effectiveness influenced the efficiency and engine speed influenced the engine power the most.Formosa and Despesse [10] designed an approach to study heat exchangers regenerator flaws and efficiency.Ahmadi et al. [11][12][13][14][15][16][17][18][19][20] developed an intelligent approach to estimate the power of the solar Stirling heat engine by implementation of the evolutionary algorithm.Due to time and cost of experimental studies, different methods such as finite elements models, genetic algorithms, ANN fuzzy logic, and the Taguchi methods have been selected recently, with the purpose of reducing time and cost of the experimental investigations.The most common of above mentioned methods is ANN.ANN has a wide range of application in various technical areas such as control, signal processing, and optimization and specifically in engineering applications [21].
ANN has been established, based on the working principles of human brain.This method has the ability of learning via samples and can unravel nonlinear problems, even problems which cannot be solved mathematically.Literature review of ANN models shows that, no ANN predictive tool is proposed for predicting performance of the Stirling engine up to now.For performance estimation of other type of thermal engines, different investigations are done [22,23].
An ANN approach is designed to estimate parameters of a diesel engine by Yusuf and colleagues [24].Ghobadian and colleagues [25] evaluated an ANN approach to predict the performance of a four-stroke, two-cylinder diesel engine.That engine has been fuelled with waste cooking oil biodiesel, and worked at various speeds.Performance values predicted by the ANN approach, were contrasted with experimental values.Results show that, R 2 values for the engine torque, specific fuel consumption, carbon monoxide (CO) and Hydrocarbon (HC) emissions were equal to 0.9487, 0.999, 0.929 and 0.999, correspondingly.
Cay et al. [26] designed an ANN model to control a number of a methanol engine operation process parameters.The model accuracy was satisfactory.Golcu and colleagues [27] proposed ANN models to analyse economy of fuel and result of intake time.
Sayin and colleagues [28] studied modeling of a gasoline engine via ANN to estimate the brake-thermal efficiency, brake-specific fuel consumption, exhaust emissions and exhaust gas temperature of the engine.The aforementioned ANN approach was constructed by employing experimental data for training and testing; moreover, for optimizing weight and bias of the ANN approach a standard back-propagation (BP) approach was employed.The predictive model predicted the exhaust emissions engine performance, and exhaust gas temperature relatively good, with mean relative errors in the range of 1.41-6.66%R 2 in the range of 0.983-0.996,and insignificant mean squared error (MSE).
Atashkari and colleagues [29] employed evolutionary algorithms to evaluate engine torque and fuel consumption of a spark-ignition engine for the first time.As it is reviewed, application of the ANN has a very extensive range.More details are provided in References .Kalogirou [34] presented a review of ANNs related to renewable energy systems applications such as solar water heating systems, wind speed and solar radiation prediction.Kalogirou [34] proposed a model to determine global radiation in locations with no straight measurement, solar irradiance, daily insolation and global solar irradiation.
The objective of this research is to propose an easyto-use approach based on ANN method to predict Torque and power by considering temperature of heat source, rotation speed, fuel, pressure as input variables.Furthermore, experimental data samples for the Philips M102C engine [35,36] are employed to test, validate and train the predictive ANN model.

Artificial neural network
ANN is proposed to perform automatically skills such as remembering, learning, inference and deciding, without receipt any assistance of a logic programming procedure [37,38].The brain mainly learns from practice.Some problems that are beyond the scope of present computers can be solved by small energy-efficient packages.Brain modeling undertakes less technical way for developing machine solutions.Moreover, this new method also gives a more graceful degradation during system overload in comparison with traditional counterparts [39].
ANN employs parallel operations of processing elements namely "neurons".The design of these elements has been stimulated using the biological neural systems [40,41].A neural network can be trained to perform a specific function by regulating the values of weights between elements.Generally, neural networks are trained, and output parameters corresponding to a certain obtained input.The output of the network and the target are compared, and until achieving the desired output, the training or adjustment of weight values is maintained.
ANNs basically has input, hidden and output layers.The input layer consists of input data set.Input layer neurons rearrange and then transmit data from input layer world to the hidden layer.The data in the input layer do not process as the data in the other layers.Numerical amount of connections between the neurons are called weights.Output of the hidden layer is produced by summation and activation functions (Fig. 1).The summation function calculates the net input of the neuron.Equation (1) shows the weighted sum of input to the ith element (NET i ) :

Input Layer
Hidden Layer

Output Layer
Fig. 1.Schematic of the artificial neural network structure.
where i and j are processing components, n stands for the number of processing component in the preceding layer, wij represents the weight of the connections between ith and jth processing components, wbi denotes the weight of the biases between layers and xj stands for the target of the jth processing component.
The activation function delivers a curvy match between the input and target layers.Furthermore, it processes the net neurons input to determine the neurons output [42].The selection of the proper activation function considerably influences the network performance.There are several numbers of activation functions, such as step activation function, threshold function, hyperbolic tangent function and sigmoid function.
The category of activation function changes with the type of to be designed ANN.A logistic sigmoid function is extensively employed for the transfer function [43,44].Equation (2) presents the logistic transfer function of the ANN approach.This transfer function receipts the input which may fluctuate between +∞ and -∞ and squeezes the target into the span of 0 to 1 [45].The target of the ANN is generated by treating data from the hidden layer and projecting them to the output in the output layer.
It has been investigated many types of training algorithms that have been applied by previous studies such as, Gradient descent, Levenberg-Marquardt (LM), Quasi-Newton, back propagation, etc. [46,47].According to the various artificial neural network approaches on challenging issues of petroleum and chemical engineering that have been proposed by Ahmadi and colleagues, the best trailing algorithm is Levenberg-Marquardt (LM).Owing to this fact, the training algorithm has been set on Levenberg-Marquardt (LM) approach.
In Equation (3) the target value, o j is the outcome of the ANN model.The parameter t j stands for the estimated target from the ANN approach for an assumed input while o j represents the desired target (i.e.measured data) from the similar input that has been generated by the setup.The R 2 value varies between 0 and +1.R 2 values near to +1 represents a robust positive linear correlation, while R 2 values near to 0 represents very weak correlation [47,48].This value can be determined according to the below formula [49]: The network is trained by optimization and updating the weights for each node; until the output gets, as close as possible to the real target.The MSE of the network is given as [49][50][51][52][53][54][55][56][57][58][59]: In which m stands for the number of target nodes, G represents the number of training data, o j (k) stands for the estimated target, and t j (k) denotes the real target.Average absolute relative deviation is obtained by [54,55,57,58,60,61]:

Results and discussion
Before grappling with details of the gained results of the proposed intelligent based model which called "Artificial Neural Network (ANN)", sensitivity analysis of the addressed model versus number of hidden neurons should be demonstrated.Figure 2 demonstrates the effects of the number of hidden neurons in hidden layer of the developed network approach on the correlation coefficient (R 2 ) of the developed approach for the torque.As clear be seen from Figure 2, the maximum correlation coefficient (R 2 ) is gained when "hidden neurons = 10" while the minimum correlation coefficient (R 2 ) occurred when "hidden neurons = 1".Also, Figure 3 illustrates the effects of the number of hidden neurons on the cost function which is mean square error (MSE) of the proposed ANN model for torque.As demonstrated in Figure 3, the minimum value of MSE occurred when "hidden neurons = 10" while maximum value of MSE is obtained when "hidden neurons = 1" in the ANN model.
Figure 4 demonstrates the sensitivity of average absolute relative deviation (AARD%) of the outcome results of the suggested neural network approach for torque.As exhibited through Figure 4, Minimum %AARD is gained when "neurons = 10" and maximum %AARD is obtained when "neurons = 1".To wrap up the statistical analysis,  Table 1 demonstrates the sensitivity analysis of the suggested ANN approach outcomes versus statistical indexes.Figures 5 and 6 show the results predicted via the ANN approach vs. measured values of the torque for Stirling heat engine (Philips M102C engine).Same as previous figures, Figure 5 illustrates the output results of suggested ANN model for Stirling engine torque versus corresponding experimental torque data.As previously mentioned that falling on the diagonal line in regression plot leads to high precision of the implemented model.As depicted in Figure 5, outcomes of ANN model between 0.   ones, although deviation from corresponding values between 0.3 and 1.5 is not negligible.Obviously the outcomes of ANN approach in Figure 6 for 1.5 to 3.7 are compacted near zero error line which means that error of the ANN approach in this span is insignificant.Furthermore, several noisy points which lower than 1.5 are observed in the aforementioned figure.
As can be seen from Figure 7  Stirling engine versus the relevant data index employed in this research.
Figure 8 demonstrates the effects of the number of hidden neurons in hidden layer of the developed network approach on the correlation coefficient (R 2 ) of the developed approach for the outcome power.As clear be seen from Figure 8, the maximum correlation coefficient (R 2 ) is gained when "hidden neurons = 10" while the minimum correlation coefficient (R 2 ) occurred in 5 hidden neurons.
Also, Figure 9 illustrates the effects of the number of hidden neurons on the cost function which is mean squared error (MSE) of the proposed neural network model for outcome power.As demonstrated in Figure 9, the minimum value of MSE occurred when "hidden neurons = 10" while maximum value of MSE is obtained when "hidden neurons = 5" in the neural network model.
Finally, Figure 10 demonstrates the sensitivity of average absolute relative deviation (AARD%) of the outcome results of the suggested neural network approach for power.As exhibited through Figure 10   plot leads to high precision of the implemented model.As depicted in Figure 11, outcomes of ANN model between 100 W and 400 W have low deviation from experimental ones, although deviation from corresponding values between 400 W and 500 W is not negligible.Obviously the outcomes of ANN approach in the Figure 12 for 150 W to 500 W are compacted near zero error line which means that error of the ANN approach in this span is insignificant.Despite the previous fact, four or five noisy points which lower than 150 W are observed in the abovementioned figure.
As can be seen from Figure 13 the outcomes of the evolved neural network model track the real output power of the Stirling engine versus the relevant data index employed in this research.

Conclusions
It is worth bearing in mind that no material about intelligent modeling of Stirling heat engine reported in previous attentions.In this paper, a novel predictive approach is developed to figure out output power and shaft torque of the Stirling engine.The predictive model is built via artificial neural network (ANN) method to estimate the aforementioned targets in cheap, fast and high precise way.Moreover, experimental data with high level of certainty is employed to build and validate the aforementioned intelligent predictive model.Furthermore, a sensitivity analysis is employed to specify the most effective ANN topology.To assess this goal, various statistical performance indexes are employed such as mean squared error (MSE), coefficient of determination (R 2 ) and average absolute relative deviation (AARD%).Integrity, flexibility and capability of the ANN model developed in this paper are systematically examined based on the statistical performance criteria calculated for the ANN outcomes.By taking all the aforementioned results into account, the predictive model proposed in this paper may help the mechanical engineers to design more efficient Stirling heat engine with high level of precision, accuracy and reliability when the experimental required data points are unavailable.

Fig. 4 .
Fig. 4. Sensitivity of %AARD versus corresponding number of hidden neurons for torque determination.

Fig. 5 .
Fig. 5. Regression plot of the outputs of developed model versus relevant experimental torque data.

Fig. 6 .
Fig. 6.Variation of relative error against corresponding experimental torque values.

Fig. 7 .Fig. 8 .
Fig. 7. Comparison between experimental torque and outcomes of the artificial neural network approach.

Fig. 9 .Fig. 10 .
Fig. 9. Sensitivity of the mean square error (MSE) versus number of hidden neurons for power determination.

Fig. 11 .Fig. 12 .
Fig. 11.Regression plot of the outputs of developed model versus relevant experimental power data.

Fig. 13 .
Fig. 13.Comparison between experimental power and outcomes of the artificial neural network approach.

Table 1 .
Summary of sensitivity analysis for network model versus number of hidden neurons for torque determination.

Table 2 .
Summary of sensitivity analysis for network model versus number of hidden neurons for power determination.Figures 11 and 12show the results predicted via the ANN approach vs. measured values of the power for Stirling heat engine (Philips M102C engine).Same as previous figures, Figure11illustrates the output results of the ANN model suggested for Stirling engine power versus corresponding experimental power data.As previously mentioned that falling on the diagonal line in regression