Optimisation of a Quasi-Steady Model of a Free-Piston Stirling Engine

: Energy from waste heat recovery is receiving considerable attention due to the demand for power systems that are less polluting. This has led to the investigation of external combustion engines such as the free-piston Stirling engine (FPSE) due to its ability to generate power from any source of heat and, especially, waste heat. However, there are still some limitations in the modelling, design and practical utilisation of this type of engine. Modelling of the FPSE has proved to be a difﬁcult task due to the lack of mechanical linkages in its conﬁguration, which poses problems for achieving stability. Also, a number of studies have been reported that attempt to optimise the output performance considering the characteristics of the engine conﬁguration. In this study the optimisation of the second-order quasi-steady model of the gamma-type FPSE is carried out using the genetic algorithm (GA) to maximise the performance in terms of power output, and considering the design parameters of components such as piston and displacer damper, geometry of heat exchangers, and regenerator porosity. This present study shows that the GA optimisation of the RE-1000 FPSE design parameters improved its performance from work done and output power of 33.2 J and 996 W, respectively, with thermal efﬁciency of 23%, to 44.2 J and 1326 W with thermal efﬁciency of 27%. the experimental shows good and The GA optimisation procedure the FPSE work and output power and with efﬁciency of 23%, and with efﬁciency of 27%. The second-order quasi-steady model the FPSE in this with GA code to The results the a new


Introduction
The increasing demand for renewable forms of energy less harmful to the environment has led to increased interest and research into various applications that can harness such energy, especially from waste heat. The free-piston Stirling engine (FPSE), which is an external combustion engine suitable for energy recovery application especially in combined heat and power systems, has many advantages such as a simple mechanical configuration and longevity, efficiency and thermal-to-electrical energy conversion. However, due to the lack of a rotating shaft in the FPSE, it is not easy to predict a regime for its stable operation, unlike the kinematic Stirling engines [1]. Different methods have been implemented to analyse the operational performance of the FPSE, such as the investigation using computational fluid dynamics (CFD) analysis [2,3]. However, these models could not describe the performance of the engine accurately due to the inability to define the spring stiffness and damping factors that determine the motions of the piston and displacer during engine operation.
Other numerical models have been developed to analyse the FPSE using different techniques, such as the motion control mechanism [4] and linear control method [5]. For adequate and satisfactory prediction of the performance of Stirling and free-piston Stirling engines, advanced and precise numerical models are required (second-order models [6][7][8][9][10]) for this purpose. The second-order models are employed based on the ability to predict the relationship between the thermodynamics

Principle of FPSE Operation
External combustion engines such as the FPSEs operate on a closed regenerative cycle with the aid of the piston and displacer's movement integrated into dampers and springs. The engine operates on a typical Stirling cycle, but unlike Stirling engines there is no linkage between the displacer and piston. For the FPSE the major components that facilitate the operation are: piston, displacer, dampers, springs and heat exchangers. The work spaces are where most of the work is being carried out as a result of the pressure exerted on the working gas. Here, the temperature and volume of the gas in the work spaces change over time in a repeated cycle, with the help of the heat exchangers surrounding the work spaces which aid heat transfer within the working gas during the oscillatory motion between the work spaces.
A description of the engine dynamics of the FPSE is essential as it is necessary to know the types of forces acting on the piston and displacer. Figure 1 shows the schematic diagram of the engine. There exist three forces acting on the displacer and piston due to their relative displacements, velocities and accelerations. These forces contribute to the description of the work done in the expansion and compression spaces as they act on the working gas, which is assumed to be an ideal gas. The force acting in the work spaces exerted by the pressure build-up in the working gas is the linear spring force on the piston and displacer, corresponding to their respective displacement, while the linear damping force on the piston and displacer is proportional to their relative velocity.
Energies 2018, 11, x FOR PEER REVIEW 3 of 17 simulation of the developed model to confirm the optimised results including the applicability and relevance of the GA to the design of energy systems.

Principle of FPSE Operation
External combustion engines such as the FPSEs operate on a closed regenerative cycle with the aid of the piston and displacer's movement integrated into dampers and springs. The engine operates on a typical Stirling cycle, but unlike Stirling engines there is no linkage between the displacer and piston. For the FPSE the major components that facilitate the operation are: piston, displacer, dampers, springs and heat exchangers. The work spaces are where most of the work is being carried out as a result of the pressure exerted on the working gas. Here, the temperature and volume of the gas in the work spaces change over time in a repeated cycle, with the help of the heat exchangers surrounding the work spaces which aid heat transfer within the working gas during the oscillatory motion between the work spaces.
A description of the engine dynamics of the FPSE is essential as it is necessary to know the types of forces acting on the piston and displacer. Figure 1 shows the schematic diagram of the engine. There exist three forces acting on the displacer and piston due to their relative displacements, velocities and accelerations. These forces contribute to the description of the work done in the expansion and compression spaces as they act on the working gas, which is assumed to be an ideal gas. The force acting in the work spaces exerted by the pressure build-up in the working gas is the linear spring force on the piston and displacer, corresponding to their respective displacement, while the linear damping force on the piston and displacer is proportional to their relative velocity.

Methodology
Numerical simulation of the FPSE requires accurate and careful calculation of the dynamic and thermodynamic features of the engine parameters, including the algorithm, to provide an effective solution and description of the output performance. In this study, MATLAB is employed to solve the motion equations of the piston displacer and the thermodynamic equations that describe the engine's operation. The problem posed by the damping and spring stiffness on the stability of the engine is solved by calculation of these parameters at every iteration in the cycle and the convergence criterion was defined so as to achieve steady operation and calculate the output power. The regenerator, being a critical component of the FPSE as it determines the thermal efficiency, requires a careful approach in order to study and observe its performance; as a result it was divided

Methodology
Numerical simulation of the FPSE requires accurate and careful calculation of the dynamic and thermodynamic features of the engine parameters, including the algorithm, to provide an effective solution and description of the output performance. In this study, MATLAB is employed to solve the motion equations of the piston displacer and the thermodynamic equations that describe the engine's operation. The problem posed by the damping and spring stiffness on the stability of the engine is solved by calculation of these parameters at every iteration in the cycle and the convergence criterion was defined so as to achieve steady operation and calculate the output power. The regenerator, being a critical component of the FPSE as it determines the thermal efficiency, requires a careful approach in order to study and observe its performance; as a result it was divided into 10 parts to observe the behavioural characteristics and their influence on and by the heater and cooler, including the overall effect on the engine performance. Also, the regenerator matrix is divided into 10 parts so as to ensure optimal heat balance capacity and minimise flow losses, as the efficiency of the regenerator material is highly dependent on its thermal capacity. The computation is carried out in 1000 timesteps over 10 complete cycles; the output performance is determined and results are plotted. The solution to the difficulty of obtaining stable operation of the FPSE is obtained by calculating the damping coefficient of every iteration at a defined increment for every cycle and a criterion is defined for termination of the algorithm so as to converge and calculate the output power and efficiency of the FPSE, when the values of the expansion and compression space temperature at the beginning of the cycle are the same at the end of the cycle. Figure 2 shows the calculation scheme of the engine used for modelling the temperature profile from the expansion space through the heat exchangers and into the compression space. into 10 parts to observe the behavioural characteristics and their influence on and by the heater and cooler, including the overall effect on the engine performance. Also, the regenerator matrix is divided into 10 parts so as to ensure optimal heat balance capacity and minimise flow losses, as the efficiency of the regenerator material is highly dependent on its thermal capacity. The computation is carried out in 1000 timesteps over 10 complete cycles; the output performance is determined and results are plotted. The solution to the difficulty of obtaining stable operation of the FPSE is obtained by calculating the damping coefficient of every iteration at a defined increment for every cycle and a criterion is defined for termination of the algorithm so as to converge and calculate the output power and efficiency of the FPSE, when the values of the expansion and compression space temperature at the beginning of the cycle are the same at the end of the cycle. Figure 2 shows the calculation scheme of the engine used for modelling the temperature profile from the expansion space through the heat exchangers and into the compression space.

Assumptions of the Mathematical Model
To model the FPSE certain assumptions are required to represent the algorithm and also govern the performance characteristics of the engine parameters: 1) The mass of the working gas in the chambers of the FPSE is constant.
2) The working gas in the engine is an ideal gas. Helium is selected for this simulation.
3) The thermal losses are derived using the superposition principle. 4) The temperature of the working gas in the work spaces and heat exchangers changes with time over a complete cycle. 5) The buffer pressure is equal to the average of the dynamic pressure in the compression space during oscillation of the piston. 6) The operation of the engine is in a steady-state condition. The temperature of the expansion and compression space at the beginning of the cycle should be equal to the value at the end of the cycle to satisfy this criterion.
The equations and boundary conditions used for the modelling have been previously derived by the author, as reported in [11]. The motions of the displacer and piston are determined in order to predict their amplitudes, velocities and acceleration, and they are derived with respect to the masses of the displacer and piston, the damping force, spring force, surface area and pressure of the working gas. Equation (1) is used to determine the motion of the displacer: where represents the mass of the displacer; is the spring stiffness of the displacer; is the damping load of the displacer; and is the cross-sectional area of the displacer. The motion of the piston is defined as a result of the damping force, spring force, area of piston, bounce space pressure and the pressure of the working gas, according to Equation (2):

Assumptions of the Mathematical Model
To model the FPSE certain assumptions are required to represent the algorithm and also govern the performance characteristics of the engine parameters: (1) The mass of the working gas in the chambers of the FPSE is constant.
(2) The working gas in the engine is an ideal gas. Helium is selected for this simulation. The equations and boundary conditions used for the modelling have been previously derived by the author, as reported in [11]. The motions of the displacer and piston are determined in order to predict their amplitudes, velocities and acceleration, and they are derived with respect to the masses of the displacer and piston, the damping force, spring force, surface area and pressure of the working gas. Equation (1) is used to determine the motion of the displacer: where m d represents the mass of the displacer; K d is the spring stiffness of the displacer; C d is the damping load of the displacer; and A d is the cross-sectional area of the displacer. The motion of the piston is defined as a result of the damping force, spring force, area of piston, bounce space pressure and the pressure of the working gas, according to Equation (2): where m p represents the mass of the piston; K p is the spring stiffness of the piston; C p is the damping load of the piston; A p is the cross-sectional area of the piston; and P b is the bounce space pressure in the piston compartment. From the ideal gas equation, the equation for pressure in the engine for closed-cycle operation is defined (Equation (3)) [31]: Boundary conditions for the conditional temperatures are determined with these constraints: Using the engine's geometry, the positions of the piston and displacer, x p and x d , with the expansion and compression volumes, V e and V c , can be derived from the following equations: The gas temperature derivatives in the expansion and compression spaces are: The temperatue of the working gas across the boundary between the heater and the expansion space is determined in Equations (10) and (11): If: . If: .
The temperature of the mass flow from the tenth part of the regenerator to the heater is described as follows: If: . .
where . m r10h represents the mass flow rate from the tenth part of the regenerator to the heater (kgs −1 ), T r10h the temperature of the mass flow rate from the tenth part of the regenerator to the heater, and T rh the temperature of the tenth part of the regenerator space to the heater.
The temperature of the working gas in the regenerator is obtained with Equation (14): T r(i) and T r(i+1) represent the working gas temperature of the (i) and (i + 1) parts of the regenerator space, where i is the number of regenerator parts, from one to ten.
The conditions for mass flow rate from the cooler to the first part of the regenerator are obtained as follows: . m kr1 > 0, T kr1 = T k (15) . m kr1 ≤ 0, T kr1 = T rk (16) where . m kr1 represents the mass flow from the cooler to the first part of the regenerator (kgs −1 ); T kr1 is the temperature from the cooler to the first part of the regenerator; T k is the temperature of the cooler space; and T rk is the temperature between the first part of the regenerator and the cooler.
For the compression space to the cooler, the conditions for mass flow rate are given as follows: If: . .
where . m ck represents the mass flow rate from the compression space to the cooler; T ck is the temperature from the compression space to the cooler; T c is the temperature of the compression space; . m he represents mass flow rate from heater to expansion space (kgs −1 ); T he is the temperature of the mass flow from the heater to the expansion space; T h is the temperature of the heater; and T e is the temperature of the expansion space.
The equation used to determine the heat loss from conduction in the heat exchanger is given as: where k is the thermal conductivity; A is the cross-sectional area; and l is the length. T 1 and T 2 are used to determine the temperature difference between the heat exchangers. The transfer of heat from the first part of the regenerator to the tenth part due to heat conduction in relation to the environment is defined as external conduction heat loss. It also accounts for the heat transfer from the part of the regenerator with a higher temperature to the part with a lower temperature. This is defined only for the regenerator: where A f s is the free surface area, ε is the effectiveness of the regenerator, and T m and T r are used to determine the temperature of the regenerator matrix and the regenerator part, respectively. The work done (W) in the cycle is determined with Equation (21): Hence, the power output (P) is derived as a function of work done and frequency:

Numerical Simulation Procedure
The initial positions of the displacer and piston are defined including the temperatures of the expansion and compression spaces. The equations that define the motions of the piston and displacer are reduced to four first order differential equations. The Runge Kutta (rk4) method is then applied to obtain their solutions simultaneously. The functionality of rk4 is utilised and is applicable to this study based on its efficiency and ability to coordinate different numbers with functional evaluations and high computing accuracy. The experimental data are obtained from the operational parameters of the RE-1000 FPSE and used as inputs for the numerical simulation of the quasi steady model of the engine. The design parameters of the heat exchangers and the operational parameters of the RE-1000 FPSE are presented in Table 1.  [11,31].

Engine Data Value
Mean pressure (MPa) 7. The simulation is then computed over 10 cycles in 1000 timesteps until the steady-state criterion is satisfied. The criterion is satisfied when the value of the expansion and compression spaces at the beginning of the cycle are the same at the end of the cycle. Thereafter, the work done, power and efficiency are determined. For stable operation of the FPSE, a methodical approach is applied to the algorithm taking into consideration the damping load of the piston and displacer. Their values are computed in each cycle for every iteration at a specific increment, then tested against the criterion for convergence for calculating power and efficiency and, finally, they are determined at the moment when the temperature of the work spaces at the start of a cycle equals the value at the end of the cycle. The initial temperatures of the working gas volume in the work spaces and heat exchangers were defined prior to the simulation, while the linear interpolation method was used to determine the temperatures of the heat exchangers.

Optimisation Procedure Using the Genetic Algorithm
The GA is an exhaustive search method for obtaining solutions to optimisation problems (both constrained and unconstrained) with the aid of a natural selection process similar to biological evolution. It has been employed for optimisation for different purposes. The GA has certain advantages over other optimisation methods, for example: the procedure requires no derivative information; it can utilise both unconstrained and constrained variables; large variables can be used; and the objective function can be in the form of an analytical function or numerical and experimental data [30]. The binary GA is the most employed, where the encoding process is characterised by changing the variables to bit numbers and being retuned with the decoding technique. If the binary GA is comprised of a considerable number of variables, substantial computing time will be required for the encoding and decoding techniques. In this study, the continuous real value GA is applied where variables are expressed as single floating point numbers in order to prevent quantitative limitations and reduce computing time [30]. The GA provides repeated solutions to individuals by modifying their population in order to produce a new population of improved individuals. It employs a stochastic operator to obtain a global optimum solution for a particular problem using an initial random population [32]. The initial population is formed by a random set of individuals. The individuals or chromosomes consist of different parameters. Chromosome evaluation in the initial population generated is very important in the GA, as this defines the fitness function, while the fitness value is determined by the objective function. The objective function is the indicated power of the FPSE, which is taken to be the chromosome value and it is obtained using the developed second order quasi steady model. For reproduction, the parents are selected by application of the natural selection process to produce the next generation. Thereafter, the newly generated offspring are produced by the recombination of crossover and mutation procedures. The fitness of the new population generated is then evaluated. Numerous generations are then produced from this algorithm pending the satisfaction of the termination condition given in the convergence criterion. The GA procedure and expressions are listed in Table 2.

Definition of Variables and Objective Function
The engine design parameters used as variables and the objective function for optimisation are determined. The parameters selected are defined as chromosomes such as: length of heater, regenerator and cooler, porosity of regenerator matrix, and the damping coefficient of displacer and piston. The heat exchangers require a careful selection of the design parameter as their functionality has an immense effect on the output performance of the FPSE. The chromosome used in the GA optimisation is represented as a function of the indicated power, which is the objective function: where P i is indicated power; L h , L r and L k are the lengths of heater, regenerator, and cooler, respectively; C p is damping coefficient of piston; C d is damping coefficient of displacer; and Poros is regenerator porosity. For the initial population, the design parameters are selected at random and generate a matrix formation of different chromosomes, where Pop num is the number of chromosomes and Var num is the number of variables (Table 2). An appropriate selection of population size is required using the GA due to its considerable effect on the convergence speed of the optimisation solution. On the one hand, small population size may result in the solution converging quickly and achieving a poor solution, while on the other hand, too large a population size may result in excessive time for convergence of the solution. From 30 to 100 chromosomes are recommended when using the GA [33]; therefore, a population of 30 per generation (Pop num ) is selected in this study based on the nature of the problem and its applicability for the design and development of the FPSE. To evaluate the indicated power defined as the chromosome value by the fitness function, the value for each generation is determined and ranked in the value map by the fitness value function given in Table 2, where max value is the maximum value of the chromosome and value is the value of the chromosome. The selection procedure to determine the best chromosomes in order to produce a new generation is a very important process in the GA. The fitness value is arranged in descending order. The formula is given in Table 2, where N sc is the number of survival chromosomes and S rate is the selection rate of 0.5. The weight ranking technique is the procedure used for selecting the fittest chromosome from the ranking order randomly and pairing selection of the parents for the reproduction operation [34].
The constraints for the lower and upper boundaries for each variable used as design parameters are listed in Table 3.  The constraints of the boundaries are selected in order to check the convergence of the optimisation procedure and achieve the best fitness function so as to maximise the objective function.

Procedure for Mating
Mating is the process where the reproduction operator employs parents to generate new offspring for the next generation. To accomplish this, the operator performs a random selection of the design parameters to produce new chromosomes from different sides of the crossover point between two parents.

Procedure for Mutation
The objective of the optimisation procedure is the global solution; however, the derived solution might be the localised minimum or maximum if there exists a rapid convergence. Therefore, the procedure of mutation is employed as a second operator in the process of reproduction to prevent the optimisation problem resulting in a local solution. There is a need for selection of the mutation rate; although it reduces the convergence speed, it ensures a global solution is achieved [32]. A mutation rate of 0.2 is selected in the optimisation process in this study. This mutation rate is chosen so as to achieve a global solution of the objective function.

Convergence Check
Convergence is utilised to ensure the termination criterion of a numerical simulation is achieved. In this study, 200 is used as the maximum number of generations to achieve algorithm convergence. Selection of the number of generations is a critical point in the GA as this has a considerable effect on the convergence of the procedure as well as ensuring a reasonable computing time for the solution to converge. The indicated power is the objective and for the last 20 generations, the fixed negligible/small differences in the indicated power are used as a termination criterion for the computation prior to reaching the maximum number of generations. At this point, in case no convergence is achieved, the fitness selection process produces a new generation by forming a population of chromosomes. To avoid quantitative limitations and reduce computing time, the continuous or real value GA optimisation code, where variables are expressed as single floating-point numbers, was modified and used in this study [34].
The flow chart of the GA procedure to determine optimal design parameters of the quasi-steady model of the FPSE is presented in Figure 3. To optimise the performance of the FPSE, the algorithm of the numerical simulation is coupled to the GA code where the objective is to maximise the indicated power of the engine. The selected optimal design parameters generated are then used as input in the numerical simulation for verification of the optimised result from the GA. Energies 2018, 11, x FOR PEER REVIEW 10 of 17

Validation
The developed quasi-steady model is investigated with the parameters of the RE-1000 FPSE obtained from Urieli and Berchowitz [31]. The results obtained show good agreement with the experimental data in terms of amplitude ratio, phase angle and output power. Validation of the developed model was conducted previously and the percentage error in the output power prediction, phase angle and amplitude ratio prediction was 0.4%, 4.7% and 36%, respectively [18].
The output results from the numerical simulation describing the performance of the FPSE are presented in this section. The input parameters used are those of the RE-1000 Sunpower FPSE listed in Table 1, while the values of the heater and cooler temperatures are set as 814.3 K and 322.8 K, respectively, including a maximum pressure of 7.1 MPa and helium as the working fluid. The pressures and volumes are shown in Table 4. The variation of pressure is between 7.25 MPa and 6.75 MPa including volumes (expansion and compression) between 0.3x10 −4 (m ) and 0.5x10 −4 (m ). From this, the indicated cyclic work done and output power is 33.2 J and 996 W, respectively, with thermal efficiency of 23%.

Validation
The developed quasi-steady model is investigated with the parameters of the RE-1000 FPSE obtained from Urieli and Berchowitz [31]. The results obtained show good agreement with the experimental data in terms of amplitude ratio, phase angle and output power. Validation of the developed model was conducted previously and the percentage error in the output power prediction, phase angle and amplitude ratio prediction was 0.4%, 4.7% and 36%, respectively [18].
The output results from the numerical simulation describing the performance of the FPSE are presented in this section. The input parameters used are those of the RE-1000 Sunpower FPSE listed in Table 1, while the values of the heater and cooler temperatures are set as 814.3 K and 322.8 K, respectively, including a maximum pressure of 7.1 MPa and helium as the working fluid. The pressures and volumes are shown in Table 4. The variation of pressure is between 7.25 MPa and 6.75 MPa including volumes (expansion and compression) between 0.3 × 10 −4 (m 3 ) and 0.5 × 10 −4 (m 3 ). From this, the indicated cyclic work done and output power is 33.2 J and 996 W, respectively, with thermal efficiency of 23%. The bounce space pressure in the piston compartment is shown in Table 4. The maximum pressure is 7.01 MPa and minimum pressure is 6.99 MPa; the average is equal to the mean working pressure in the engine as it satisfies the assumptions made in the model development. The variation in velocity of the displacer and piston is also shown, where it can be observed that the displacer and piston have maximum velocities of 1.29 ms −1 and 1.36 ms −1 and minimum velocities of −1.30 ms −1 and −1.33 ms −1 , respectively.
The mass flow rate in the heat exchangers is shown in Table 5. It is worth noting the flow of the working gas and its movement from the work spaces to the heat exchangers and vice versa as the gas is being acted upon by the forces from the oscillatory movement of the piston and displacer. The flow of gas from the compression space to the cooler shows the highest flow rate of 0.029 kgs −1 , due to the increase in the compression space pressure, P c , as the working gas is acted upon by forces from the piston and displacer. Next, the mass flow rate of the working gas at 0.023 kgs −1 from the cooler to the first part of the regenerator shows the reduction in the flow of gas from the cooler to the first part of the regenerator due to the reduction in pressure and temperature of the working gas. The mass flow rate is also observed from the first to the second part of the regenerator with a flow rate of 0.022 kgs −1 ; the flow rate is not too different from the flow rate between the cooler to the first part of the regenerator, although this depicts a transition in the flow of the working gas between the chambers. The tenth part of the regenerator to the heater has a mass flow rate of 0.015 kgs −1 which shows a gradual reduction in the flow of the working gas as it approaches the expansion space, while the heater to the expansion space exhibits a mass flow rate of 0.002 kgs −1 . Nevertheless, it is worth considering the flow of working gas volume in the work spaces and heat exchangers as this can give a clearer understanding of the transfer of working gas within the chambers during engine operation.

Optimisation Result
According to the optimisation procedure, the solution of the objective could be achieved with the selected constrained range (upper and lower limits) of design parameters in Table 3 by using an adequate global search method; hence, the consideration of the GA to optimise the design parameters of the FPSE so as to maximise the power output. Figure 4 shows the variation in the indicated power of the engine over the stipulated number of generations. The termination criterion was achieved at the 180th generation; however, the indicated power increased significantly from the first few generations.
Application of the GA to optimise the FPSE is of vital value, as can be observed from Figure 4, where power output was optimised within the range of the selected design parameters in Table 3 and the convergence of the objective function was achieved after 180 generations with a maximum power of 1326 W. Finally, the optimal parameters were determined as listed in Table 6. The objective function of the GA optimisation of the second-order quasi-steady FPSE model selected is the indicated power with helium as the working gas, including the maximum pressure of 70 MPa and operating frequency of 30 Hz selected for the engine conditions in the numerical simulation.  To achieve this, the population of 30 was selected with mutation and selection rate of 0.2 and 0.5, respectively. The objective function was achieved with the optimal values of six parameters at the 180 th generation. From Table 6, it can be observed that the length of the heater increased considerably while the length of the regenerator and cooler were reduced. This is suitable for the real engine as the heater could provide a more sufficient heating surface area and optimise heat transfer to the working fluid, while the regenerator improves the thermal efficiency and the cooler reduces the thermal losses in the engine from the newly selected geometry design. However, as a result of the reduction in the length of the cooler and regenerator, and porosity of the regenerator matrix, there is a 33% increase in the value of the indicated power from the new design parameters obtained from the GA algorithm. The new design parameters were used as input in the simulation of the quasi-steady model of the FPSE and the indicated output power generated corresponds to the 1326 W obtained from the GA.
In order to verify the outputs from the optimisation procedure, a parametric check of the selected engine design parameters was carried out (Figures 5-7) to show the sensitivity of the indicated output power to the selected design parameters. It can be observed in Figure 5a,b that the power output rises to a maximum with the increase in displacer and piston damping and reduces drastically thereafter. This is a result of the excess additional load added to the piston and displacer masses which causes increased dead volume followed by the rapid reduction in the output power. In Figure 6a,b, the increase in the length of the heater and cooler results in an increase of the power output followed by a rapid reduction, due to the dead volume and frictional losses in both. Similar patterns are observed in Figure 7a,b, where the power rises to a maximum with the increase in the length of the regenerator and porosity, then reduces drastically afterwards. This is a result of the increased heat transfer area and dead volume, which are proportional to the frictional and thermal losses in the regenerator chamber. Similar findings were reported in [27] where the GA was used to optimise a low-temperature Stirling engine. To achieve this, the population of 30 was selected with mutation and selection rate of 0.2 and 0.5, respectively. The objective function was achieved with the optimal values of six parameters at the 180th generation. From Table 6, it can be observed that the length of the heater increased considerably while the length of the regenerator and cooler were reduced. This is suitable for the real engine as the heater could provide a more sufficient heating surface area and optimise heat transfer to the working fluid, while the regenerator improves the thermal efficiency and the cooler reduces the thermal losses in the engine from the newly selected geometry design. However, as a result of the reduction in the length of the cooler and regenerator, and porosity of the regenerator matrix, there is a 33% increase in the value of the indicated power from the new design parameters obtained from the GA algorithm. The new design parameters were used as input in the simulation of the quasi-steady model of the FPSE and the indicated output power generated corresponds to the 1326 W obtained from the GA.
In order to verify the outputs from the optimisation procedure, a parametric check of the selected engine design parameters was carried out (Figures 5-7) to show the sensitivity of the indicated output power to the selected design parameters. It can be observed in Figure 5a,b that the power output rises to a maximum with the increase in displacer and piston damping and reduces drastically thereafter. This is a result of the excess additional load added to the piston and displacer masses which causes increased dead volume followed by the rapid reduction in the output power. In Figure 6a,b, the increase in the length of the heater and cooler results in an increase of the power output followed by a rapid reduction, due to the dead volume and frictional losses in both. Similar patterns are observed in Figure 7a,b, where the power rises to a maximum with the increase in the length of the regenerator and porosity, then reduces drastically afterwards. This is a result of the increased heat transfer area and dead volume, which are proportional to the frictional and thermal losses in the regenerator chamber. Similar findings were reported in [27] where the GA was used to optimise a low-temperature Stirling engine. From the outputs generated, this shows that GA application is a good precision tool for determining the optimal value of the FPSE's design parameters; however, it is difficult to locate the exact point at which the maximum power could be achieved. To clarify this, the pressure-to-volume diagram and the work done in the expansion and compression spaces, indicating the optimised output performance of the newly selected design parameters, are shown in Figure 8a,b, which illustrate the pressure-to-volume diagram and the work done in the compression and expansion spaces, including the total work done. It can be observed that the pressure variation is between 7.47 MPa and 6.0 MPa with volumes of expansion and compression spaces between 0.000174 m 3 and 0.000206 m 3 . The cyclic work done, shown in Figure 8b, indicates an increase in total work done (W T ) to 44.2 J, resulting in output power of 1326 W with thermal efficiency of 27%. Unlike this study where the major design parameters of the heat exchangers are considered, including the damping of the piston and displacer in order to maximise the power output of the engine, the GA application was applied to minimise the objective function of the FPSE with selected parameters such as the masses and stiffnesses of the piston and displacer, including the cross-sectional area of the displacer, as was reported in [29]. It can be observed that the prediction of the GA algorithm on the engine performance is sufficiently close and the accuracy was confirmed with the newly selected parameters used as inputs, the results of which are shown in the P-V diagram in Figure 8a. Hence, the applicability of the GA for optimisation has proved to be an effective tool and can be utilised for design purposes to improve the output performance of the FPSE. From the outputs generated, this shows that GA application is a good precision tool for determining the optimal value of the FPSE's design parameters; however, it is difficult to locate the exact point at which the maximum power could be achieved. To clarify this, the pressure-to-volume diagram and the work done in the expansion and compression spaces, indicating the optimised output performance of the newly selected design parameters, are shown in Figures 8a,b, which illustrate the pressure-to-volume diagram and the work done in the compression and expansion spaces, including the total work done. It can be observed that the pressure variation is between 7.47 MPa and 6.0 MPa with volumes of expansion and compression spaces between 0.000174 m 3 and 0.000206 m 3 . The cyclic work done, shown in Figure 8b, indicates an increase in total work done (WT) to 44.2 J, resulting in output power of 1326 W with thermal efficiency of 27%. Unlike this study where the major design parameters of the heat exchangers are considered, including the damping of the piston and displacer in order to maximise the power output of the engine, the GA application was applied to minimise the objective function of the FPSE with selected parameters such as the masses and stiffnesses of the piston and displacer, including the cross-sectional area of the displacer, as was reported in [29]. It can be observed that the prediction of the GA algorithm on the engine performance is sufficiently close and the accuracy was confirmed with the newly selected parameters used as inputs, the results of which are shown in the P-V diagram in Figure 8a. Hence, the applicability of the GA for optimisation has proved to be an effective tool and can be utilised for

Conclusions
A novel framework for the design and optimisation of the FPSE using second-order quasi-steady modelling and the GA was developed and implemented in this study. The design variables employed for the optimisation of the FPSE based on output power are features of the heat exchangers, such as length and diameter including the regenerator porosity. The piston and displacer damping coefficients are included as they present difficulty in achieving the stable operation of the FPSE. Although application of the GA to the developed model using the operating conditions of the RE-1000 FPSE requires significant computing time to converge, the new set of design parameters generated produced quite a noticeable increment in the output power and efficiency of the engine. The quasi-steady model developed in this study, considering the thermal losses, control volumes, characteristic of the working gas and the engine's geometry, gives an improved description of the working process. The control volumes of the engine divided into 14 parts, including the regenerator parts and matrix divided into 10, indicated the temperature variation between the working gas and the chamber walls of the heat exchangers and work spaces for accurate description. Validation of the developed model with the experimental output shows good agreement in terms of output power and amplitude ratio of the piston and displacer. The GA optimisation procedure improved the performance of the FPSE from work done and output power of 33.2 J and 996 W, respectively, with thermal efficiency of 23%, to 44.2 J and 1326 W, respectively, with thermal efficiency of 27%. The second-order quasi-steady model of the FPSE developed in this study is coupled with the GA optimisation code to maximise the objective function. The output results from the optimisation solution produced a new set of design parameters for the engine, which when used in the developed model resulted in a measurable improvement in performance. Hence, this method can be employed by manufacturers for designing optimised FPSE performance.