Next Article in Journal
Lie Symmetry Analysis, Conservation Laws, Power Series Solutions, and Convergence Analysis of Time Fractional Generalized Drinfeld-Sokolov Systems
Next Article in Special Issue
Shock Structure and Relaxation in the Multi-Component Mixture of Euler Fluids
Previous Article in Journal
Hermite Cubic Spline Collocation Method for Nonlinear Fractional Differential Equations with Variable-Order
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Cyclic Control Optimization Algorithm for Stirling Engines

Institute of Physics, Chemnitz University of Technology, 09107 Chemnitz, Germany
*
Author to whom correspondence should be addressed.
Symmetry 2021, 13(5), 873; https://doi.org/10.3390/sym13050873
Submission received: 15 April 2021 / Revised: 7 May 2021 / Accepted: 9 May 2021 / Published: 13 May 2021
(This article belongs to the Special Issue Mathematical Aspects in Non-equilibrium Thermodynamics)

Abstract

:
The ideal Stirling cycle describes a specific way to operate an equilibrium Stirling engine. This cycle consists of two isothermal and two isochoric strokes. For non-equilibrium Stirling engines, which may feature various irreversibilities and whose dynamics is characterized by a set of coupled ordinary differential equations, a control strategy that is based on the ideal cycle will not necessarily yield the best performance—for example, it will not generally lead to maximum power. In this paper, we present a method to optimize the engine’s piston paths for different objectives; in particular, power and efficiency. Here, the focus is on an indirect iterative gradient algorithm that we use to solve the cyclic optimal control problem. The cyclic optimal control problem leads to a Hamiltonian system that features a symmetry between its state and costate subproblems. The symmetry manifests itself in the existence of mutually related attractive and repulsive limit cycles. Our algorithm exploits these limit cycles to solve the state and costate problems with periodic boundary conditions. A description of the algorithm is provided and it is explained how the control can be embedded in the system dynamics. Moreover, the optimization results obtained for an exemplary Stirling engine model are discussed. For this Stirling engine model, a comparison of the optimized piston paths against harmonic piston paths shows significant gains in both power and efficiency. At the maximum power point, the relative power gain due to the power-optimal control is ca. 28%, whereas the relative efficiency gain due to the efficiency-optimal control at the maximum efficiency point is ca. 10%.

1. Introduction

Stirling engines are closed-cycle regenerative heat engines that harness a temperature difference between two external heat baths. At the cost of taking entropy from the hot heat bath and disposing it to the cold heat bath, they generate mechanical work. This means that Stirling engines are very flexible regarding the possible technical representations of those two heat baths. Therefore, they can be applied in various scenarios. Some current example applications are power generation from burnable industrial waste gases [1], domestic combined heat and power generation [2], electro-thermal energy storage systems for renewable energies as an alternative to lithium-ion batteries [3], and low-maintenance power generation in remote regions with harsh climatic conditions [4], among others. If properly designed, Stirling engines can achieve high efficiency, durability, low-maintenance, and low-noise operation. Hence, they are considered to be one good candidate technology for enhancing the sustainability of power systems.
One certain ideal representation of the thermodynamic cycle performed in Stirling engines is commonly referred to as the ideal Stirling cycle. It consists of four distinct strokes (processes) that an enclosed working gas cyclically performs:
  • Isothermal compression at T ExL
  • Isochoric regenerative heating to T ExH
  • Isothermal expansion at T ExH
  • Isochoric regenerative cooling to T ExL
where T ExH and T ExL are the temperatures of the hot and cold heat bath, respectively. If those four ideal processes are repeated in the prescribed order, the cycle represents an ideal heat engine, operating with Carnot efficiency η C = 1 T ExL / T ExH . In the two regenerative processes 4 and 2, heat needs to be stored and provided at a range of temperatures. The combined process is called regeneration, and is accomplished with help of a multi-temperature heat storage, referred to as a regenerator.
In real Stirling engines, the working gas is typically contained in two working spaces. One of them, the hot working space, is in thermal contact with the hot heat bath. The other one, the cold working space, is in thermal contact with the cold heat bath. The two working spaces’ volumes can be changed by moving pistons. As a result of those pistons’ movements, the working spaces exchange working gas through the regenerator, which is often implemented as a porous metal structure.
In contrast to the ideal Stirling cycle, in real Stirling engines, the four above-described strokes can typically not be clearly distinguished. This is due to several reasons. First of all, the engine’s piston movements (piston paths) usually do not exactly reproduce the two isochoric strokes. Moreover, the regenerator, as well as the hot and cold working spaces, have non-zero dead volumes. The most important reason, however, is connected to the fact that real engines are supposed to produce a finite amount of work in finite time, which is in contrast to the assumptions of equilibrium thermodynamics, and thus to the ideal Stirling cycle. Consequently, in real Stirling engines, various inevitable loss phenomena occur, for example, finite heat transfer between the working gas and the external heat baths or the regenerator matrix, pressure drop across the regenerator, and heat leaks through the engine’s internal components.
Correspondingly, real Stirling engines are non-equilibrium devices. Hence, piston paths aiming to emulate the ideal Stirling cycle’s four strokes would not necessarily yield best performance. The question of what piston paths yield best performance, for example, optimal net power, constitutes a cyclic optimal control problem.
In this paper we present an algorithm that can be used to solve such cyclic optimal control problems. It is an indirect iterative gradient algorithm and based on Optimal Control Theory. The algorithm starts with prescribing initial control functions determining the piston paths. These control functions are then gradually modified over the course of the iterations so as to gradually improve an objective and approach the optimal control. To determine the gradual shifts in every iteration, not only does the system of ordinary differential equations, describing the thermodynamics of the Stirling engine, need to be solved, but also a conjugate system of differential equations. For the efficient practical feasibility of this task, low numerical effort of the utilized thermodynamic model is crucial. In detailed models of Stirling engines, significant numerical effort is usually connected to the description of the regenerator. Therefore, here we will apply a Stirling engine model with a reduced-order endoreversible regenerator model that provides a proper tradeoff between accuracy and numerical effort for optimal control problems.
As indicated above, the core discrepancy between the ideal Stirling cycle and a real Stirling engine is that, in the former, all processes are quasi-static, and hence reversible, whereas the latter is required to produce a finite amount of work in finite time. Therefore, real Stirling engines are non-equilibrium devices that could by no means achieve the performance measures of the ideal cycle, such as Carnot efficiency. A non-equilibrium thermodynamics field that studies how constraints on time and rate influence the performance of such devices is Finite-Time Thermodynamics (FTT) [5,6]. FTT typically approaches this and related questions with variational principles and global—rather than local—descriptions of the irreversible systems considered [5].
Endoreversible Thermodynamics [7,8,9,10,11] can be regarded as a subfield of FTT that intends to provide a toolbox of model building blocks from which an FTT model can be constructed in a comprehensible way. The emphasis is placed on including the main loss phenomena, while keeping the model structure clear and minimizing mathematical complexity and numerical effort. The basic approach is to decompose the considered thermodynamic system into a network of reversible subsystems that are connected with each other through (ir)reversible interactions. That is, in its endoreversible representation, the original system’s irreversibilities are captured by the interactions, whereas for the reversible subsystems the known relations from equilibrium thermodynamics hold.
In the past, various endoreversible systems have been subject to investigations involving control optimizations. In particular, for heat engines, the piston trajectories can be optimized for objectives, such as power or efficiency. For example, such studies have been carried out for engines with Diesel [11,12,13,14] and Otto [15,16,17] cycles, light-driven engines [18,19,20], and Stirling engines [21,22,23].
The optimization approach used in the current study to optimize the Stirling engine differs from [21,22,23] in that a cyclic version of Optimal Control Theory is applied. Beyond Endoreversible Thermodynamics, this has been done by Craun and Bamieh [24] for an ideal beta-Stirling engine model with an actively controlled displacer. In [24], the heat transfer between the heat baths and the working gas was infinitely fast and regeneration was perfect. The pressure drop across the regenerator was thermodynamically neglected, but considered in terms of mechanical losses. As opposed to this, in the current study, an alpha-Stirling engine model with finite heat transfer between the heat baths and the working gas, an external heat leak, gas leakages and friction of the piston rings, and an irreversible regenerator is considered. Compared to the endoreversible regenerator models used in [22,23], the EEn-regenerator model [25] used in this study features a significantly higher degree of detail.

2. Stirling Engine Model

In this paper, our focus is on a cyclic control optimization algorithm that can be applied to various Stirling engine models, or models of other cyclically operating systems. Nevertheless, we here briefly introduce a Stirling engine model [25] that we will use to demonstrate the algorithm’s usage. In particular, we will present optimization results for this model in Section 5.
We consider an alpha-type Stirling engine as schematized in Figure 1, where the heat transfer between the external heat baths and the working gas is realized through the cylinders.
For the sake of simplicity, we assume a constant finite heat transfer coefficient. Further irreversibilities result from an external heat leak between the heat baths, gas leakage of the piston rings, friction of the pistons, pressure drop across the regenerator, and thermal mixing at the interfaces of the regenerator and the working spaces.
The regenerator is described with the reduced-order endoreversible EEn-regenerator model, developed in [25]. Essentially, this is based on the assumptions that the spatial temperature distribution inside the regenerator is linear and that the temperature difference between the gas and matrix is small. Aside from external irreversibilities that automatically occur due to thermal mixing in the regenerator’s interactions with the working spaces, internal irreversibilities can be included via entropy source terms in the EEn-regenerator model. In the current study, the irreversibility due to the pressure drop across the regenerator is accounted for by such an entropy source term.
The Stirling engine performance measures that are to be optimized in this study are power and efficiency. The power, or net power output, is defined as
P = W τ ,
with the fixed cycle time τ and the net cycle work
W = 0 τ p H V ˙ H + p L V ˙ L γ V ˙ H 2 + V ˙ L 2 d t ,
where V i and p i are the volume and pressure of the working spaces i   H , L and γ is the friction coefficient of the pistons. Then, the efficiency is
η = 0 τ p H V ˙ H + p L V ˙ L γ V ˙ H 2 + V ˙ L 2 d t 0 τ I H , ExH + K Ex T ExH T ExL d t ,
where I H , ExH is the instantaneous heat flux to the hot working space and K Ex  ( T ExH T ExL ) corresponds to an external heat leak. We here use the same transfer laws and parameter values as in [25], for example, the heat bath temperatures are defined as T ExH = 500  K and T ExL = 300  K. Solely for the heat conductance of the external heat leak, we chose a different parameter value: K Ex = 5  W/K.
This Stirling engine model has ten state variables, which are the working spaces’ volumes  V i , temperatures  T i , and particle numbers  n i with i {H,L}, the energies E R . h and E R . l of the hot and cold halves of the regenerator matrix as well as the particle number n R . d and temperature T R . d of the gas inside the regenerator dead space.
The state variables of this Stirling engine model can be arranged in a state vector x and the state dynamics can be expressed in terms of x ˙ = f ( x , u ) . Here, f ( x , u ) is a vector-valued function that depends on the state vector x and a control vector u . In our Stirling engine model we define the control vector u in terms of an explicitly time-dependent, τ -periodic control function u ( t ) , which has the entries u H ( t ) and u L ( t ) . Each of those two sub-functions determines the dynamics of one working volume, as indicated in Figure 1. An essential requirement that we raise is that the state dynamics x ˙ = f ( x , u ( t ) ) features a limit cycle with regard to all state variables, which will be necessary for the applicability of the optimization algorithm. Therefore, care must be taken regarding the embedding of the control in the system dynamics, which will be explained in Section 4.

3. Cyclic Optimal Control Problem

Optimal Control Theory provides a framework for the dynamic (or indirect) optimization of dynamical systems, such as the above-described Stirling engine model. The type of optimal control problem considered in this work can be formulated as: find an unconstrained, smooth, τ -periodic control function u ( t ) that maximizes the objective functional
J = 0 τ ζ ( x , u ( t ) ) d t
subject to the constraint
x ˙ = f ( x , u ( t ) )
for a fixed period τ . Here, x is the state vector of the system. The dynamics of the system is determined by the ordinary differential Equation (5) and is influenced by the vector-valued, explicitly time-dependent, τ -periodic control function u ( t ) .
For the formulation of necessary conditions of optimality, a Hamilton function H is defined as [26,27]
H ( x , u , λ ) : = ζ ( x , u ) + λ T f ( x , u )
with an adjoint vector λ , which varies over time and will henceforth also be called a costate vector. As we will see later, there exists an interesting symmetry between the dynamics of the state vector x and the costate vector λ . The first order necessary conditions for the control u with the optimal value are [26,27]
x ˙ = λ H ( x , u , λ ) ,
λ ˙ = x H ( x , u , λ ) ,
0 = u H ( x , u , λ ) ,
combined with the respective transversality conditions that specify the boundary conditions for the state and costate dynamics from Equations (7) and (8), respectively. In the case of the optimal cyclic regime, as valid for the stationary operational state of a cyclically operating engine, these boundary conditions are [27]
x | τ = x | 0 ,
λ | τ = λ | 0 .
The notation x | t refers to the value of x at time t, while it does not indicate explicit time dependence. These boundary conditions do not render the problem overdetermined, since the initial and final values are not quantified, but only required to be equal.
In this way, the global dynamic optimization problem from Equation (4) with the constraint Equation (5) is turned into the continuous set of local (static) optimization problems from Equation (9) with the constraints Equations (7) and (8). This means that H ( x , u , λ ) must be locally maximized for all t   0 , τ with respect to u . For the optimal solution x , u , λ of the considered kind of cyclic optimization problem, without explicit time dependence of ζ ( x , u ) , the temporal value of the Hamilton function H will then be constant [26,27].

3.1. Maximum Power

In the case of the optimization being performed for the objective functional, which is the cycle-averaged net power output P, as defined in Equation (1), the definition of the path target function ζ ( x , u ) for Equations (4) and (6) is straightforward:
ζ W ( x , u ) : = p H V ˙ H + p L V ˙ L γ V ˙ H 2 + V ˙ L 2 ,
which is simply the instantaneous power output. Since the optimization is performed for fixed cycle time τ , maximum power corresponds to maximum work. Hence, a prefactor of 1 / τ can be disregarded here.

3.2. Maximum Efficiency

In the case of the optimization being performed for the objective of efficiency η , as defined in Equation (3), the definition of ζ ( x , u ) is slightly more involved. This is because the definition of the efficiency corresponds to a ratio of two functionals (integrals) which need to be separately evaluated before calculating their ratio. This can be seen in Equation (3) and is in contrast to the structure of Equation (4). In order to resolve this discrepancy, we investigate how variations in the cycle work W and the heat Q H : = 0 τ I H , ExH + K Ex T ExH T ExL d t translate to the first variation of the efficiency:
δ η = δ W Q H = η W δ W + η Q H δ Q H = 1 Q H δ W W Q H 2 δ Q H .
This means that the problem of optimizing the efficiency can be morphed into an equivalent optimization problem of the weighted sum λ W W + λ QH Q H with the weights being defined according to the partial derivatives:
λ W = η / W = 1 / Q H and λ QH = η / Q H = W / Q H 2 .
Within these weights, W and Q H are the results obtained for a specific prescribed τ -periodic control function u ( t ) for which, at a given time t, the values of the control and state vectors are u u ( t ) and x x ( t ) . Here, x ( t ) is the periodic solution of the state dynamics for u ( t ) . Based on this, we can now define the path target function for maximizing the efficiency:
ζ η ( x , u ) : = W Q H τ + 1 Q H ζ W ( x , u ) W Q H 2 I H , ExH ( x , u ) .
Here, W and Q H are again the results obtained for a  τ -periodic control function u ( t ) with the above-described closeness requirements for the instantaneous values of x and u . In a strict sense, the path target function ζ η ( x , u ) is therefore also a functional of u ( t ) and x ( t ) , that is: ζ η ( x , u ) = ζ η [ x ( · ) , u ( · ) ] ( x , u ) because W = W [ x ( · ) , u ( · ) ] and Q H = Q H [ x ( · ) , u ( · ) ] . If the closeness requirement of x and u , regarding u ( t ) is valid for all t, the second and third terms in Equation (15) will (approximately) cancel upon integration from 0 to τ . Therefore, the first term was added here to ensure that 0 τ ζ η ( x , u ) d t does actually represent η . This first term does, in fact, not influence the optimization problem from Equation (7) to Equation (11), since it does not depend on the instantaneous values of x and  u .

3.3. Penalty Function

The cyclic optimal control problem introduced so far does not contain inequality constraints for the state x or the control u . However, we can introduce inequality constraints for x and u by means of a penalty function. In particular, we will use such a penalty function to introduce lower and upper bounds for the Stirling engine’s working volumes:
ζ penalty ( x , u ) : = v 0 e v 1 V H , min V H V H , sw + e v 1 V H V H , max V H , sw + e v 1 V L , min V L V L , sw + e v 1 V L V L , max V L , sw
where the working volumes V i are contained in x , v 0 = 1  W and v 1 = 500 are penalty factors, V i , sw = V i , max V i , min refers to the admissible swept volumes and V i , max and V i , min are the maximum and minimum admissible working volumes with i   H , L .
Accordingly, in the case of optimizing the Stirling engine’s piston paths for maximum power, the overall path target function is defined as
ζ ( x , u ) : = ζ W ( x , u ) + ζ penalty ( x , u ) ,
whereas in case of the optimization for maximum efficiency, it is defined as
ζ ( x , u ) : = ζ η ( x , u ) + ζ penalty ( x , u ) .

4. Optimization Algorithm

The indirect iterative gradient method described in the following was inspired by a contribution of Craun and Bamieh [24,28], who solved an optimal control problem of a modified beta-Stirling engine using an ideal thermodynamic model, namely the Schmidt model. Similar methods have earlier been used, for example, by Horn and Lin [29], Kowler and Kadlec [30], as well as Noorden et al. [31] for other applications. The method presented in this paper differs from the aforementioned ones in the means by which the periodic solutions of the state and costate equations are obtained. A pseudocode representation of the cyclic control optimization algorithm is shown in Algorithm 1.
Algorithm 1 Cyclic optimal control algorithm.
1:
//############ Basic functions of the control problem ############
2:
define f ( x , u ) {                           // RHS of state dynamics
3:
   return temporal rate of state vector;
4:
} ;
5:
define ζ ( x , u , a ¯ ) {                        // Path cost function, a ¯ may contain W and Q H
6:
   return path cost value;
7:
} ;
8:
define H ( x , u , λ , a ¯ ) {                   // Hamilton function
9:
   return ζ ( x , u , a ¯ ) + λ T f ( x , u ) ;
10:
} ;
11:
define x app H ( x , u , λ , a ¯ ) {            // Approximation of RHS of costate dynamics
12:
   declare ε = small number ;
13:
   declare e ^ m = unit vector of m th state component ;
14:
   return m e ^ m H ( x + ε e ^ m , u , λ , a ¯ ) H ( x , u , λ , a ¯ ) / ε ;
15:
} ;
16:
define u app H ( x , u , λ , a ¯ ) {            // Approximation of control gradient function
17:
   declare ε = small number ;
18:
   declare e ^ m = unit vector of m th control component ;
19:
   return m e ^ m H ( x , u + ε e ^ m , λ , a ¯ ) H ( x , u ε e ^ m , λ , a ¯ ) / 2 ε ;
20:
} ;
21:
//########## Declare control, state, and costate functions ###########
22:
declare τ = cycle time ;                // Define cycle time
23:
declare u ( t ) with t   0 , τ ;          // Control vector function
24:
declare x ( t ) with t   0 , τ ;          // State vector function
25:
declare λ ( t ) with t   0 , τ ;          // Costate vector function
26:
initialize u ( t ) with smooth guess of optimal control vector function;
27:
initialize x ( 0 ) with arbitrary admissible values;
28:
initialize λ ( 0 ) = 0 ;
29:
//############ Iterative optimization of the control #############
30:
for n = 0 ; n < large number ; n = n + 1 {
31:
   while( ε >  small number){                                    // Solve state dynamics
32:
      for( t = 0 ; t < τ ; t + = Δ t )   {   x ( t + Δ t ) = x ( t ) + f ( x ( t ) , u ( t ) ) Δ t ;   }  
33:
       ε = | | x ( τ ) x ( 0 ) | | ;
34:
       x ( 0 ) = x ( τ ) ;
35:
    }
36:
   declare a ( t ) = some_function( x ( t ) , u ( t ) ) for t   0 , τ ; // Auxiliary vector function
37:
   declare a ¯ = cycle average of a ( t ) for t   0 , τ ;          // Auxiliary vector cycle average
38:
   while( ε >  small number){                                     // Solve costate dynamics
39:
       λ ( τ ) = λ ( 0 ) ;
40:
      for( t = τ ; t > 0 ; t = Δ t )   {   λ ( t Δ t ) = λ ( t ) x app H ( x ( t ) , u ( t ) , λ ( t ) , a ¯ ) Δ t ;   }  
41:
       ε = | | λ ( τ ) λ ( 0 ) | | ;
42:
    }
43:
   declare s ( t ) = u app H ( x ( t ) , u ( t ) , λ ( t ) ) for t   0 , τ ;    // Define search direction
44:
   smooth s ( t ) in the periodic domain t   0 , τ ;           // Smooth search direction
45:
   declare Λ = small number ;                                    // Step-size factor
46:
   update u ( t ) = u ( t ) + Λ s ( t ) for t   0 , τ ;                 // Shift control
47:
   smooth u ( t ) in the periodic domain t   0 , τ ;           // Smooth control
48:
    }
In the first section, between lines 1 and 20, the basic function definitions are made. First, the right-hand side (RHS) of the state dynamics is defined as a vector function f ( x , u ) . Afterwards, the path cost function ζ ( x , u , a ¯ ) that is to be maximized in terms of the objective functional from Equation (4) is defined. Here, the argument a ¯ may, for example, contain the cycle work W and heat Q H , as required in Equation (15). Then, based on the definition of the Hamilton function H ( x , u , λ , a ¯ ) from lines 8 to 10, the right-hand side of the costate dynamics x app H ( x , u , λ , a ¯ ) is defined in terms of an approximation:
H ( x , u , λ , a ¯ ) x m H ( x + ε e ^ m , u , λ , a ¯ ) H ( x , u , λ , a ¯ ) ε
where x m is the mth state component, e ^ m is the corresponding unit vector and ε is a sufficiently small difference. For simple systems, it is reasonable to derive this right-hand side in terms of algebraic expressions. However, for involved systems it can be much more practical to do this by numerical partial differentiation as, for example, according to Equation (19). Note that for systems with discontinuous dynamics additional care must be taken here in order to make sure that the derivatives are properly approximated in the vicinity of the discontinuity. Similarly to x app H ( x , u , λ , a ¯ ) , the vector u app H ( x , u , λ , a ¯ ) of partial derivatives of the Hamilton function with respect to the control is defined from lines 16 to 20. Here, the following approximation is used:
H ( x , u , λ , a ¯ ) u m H ( x , u + ε e ^ m , λ , a ¯ ) H ( x , u ε e ^ m , λ , a ¯ ) 2 ε
where u m is the mth control component, e ^ m is the corresponding unit vector and ε is, again, a sufficiently small difference.
In the second section between lines 21 and 28, the most relevant variables are declared and initialized. These are the control vector function u ( t ) , the state vector function x ( t ) , and the costate vector function λ ( t ) . They are defined in the time domain 0 , τ and may be implemented as vectors of arrays, where the array lengths correspond to the number of time steps per period. That means that the values of u , x , and λ are saved at every time step in the periodic domain. The control vector function u ( t ) is initialized with a smooth τ -periodic guess of the optimal control. Moreover, x ( 0 ) is set to arbitrary but physically admissible values, whereas λ ( 0 ) is set to 0 .
The iterative control optimization itself is described in the third section between lines 29 and 48. This starts at iteration n = 0 with the initial guess of the smooth τ -periodic control function u ( 0 ) ( t ) , and the previously defined state and costate initial values x ( 0 ) ( 0 ) and λ ( 0 ) ( 0 ) , respectively. Here, the bracketed superscript identifies the iteration n of the for-loop from lines 30 to 48. Since the control is predefined, the state and costate problem can be solved separately. The steps to obtain the subsequent iteration u ( n + 1 ) ( t ) , according to Algorithm 1, can be summarized in simplified terms:
0.
If n = 0 , set x ( 0 ) ( 0 ) to arbitrary physically admissible values and λ ( 0 ) ( 0 ) : = 0 . Otherwise, set x ( n ) ( 0 ) : = x ( n 1 ) ( τ ) and λ ( n ) ( 0 ) : = λ ( n 1 ) ( τ ) .
1.
For given u ( n ) ( t ) : Solve
x ˙ ( n ) ( t ) = f ( x ( n ) ( t ) , u ( n ) ( t ) )
by temporal forward integration in the periodic domain until the cyclic equilibrium is reached. Save auxiliary quantities, such as the cycle work W and the heat Q H in a ¯ ( n ) . (Algorithm 1, lines 31 to 37: example with Euler method.)
2.
For given u ( n ) ( t ) , x ( n ) ( t ) , a ¯ ( n ) : Solve
λ ˙ ( n ) ( t ) = x H ( x ( n ) ( t ) , u ( n ) ( t ) , λ ( n ) ( t ) , a ¯ ( n ) )
by temporal backward integration in the periodic domain until the cyclic equilibrium is reached. (Algorithm 1, lines 38 to 42: example with Euler method.)
3.
Calculate the search direction (See Algorithm 1, line 43.)
s ( n ) ( t ) : = u H ( x ( n ) ( t ) , u ( n ) ( t ) , λ ( n ) ( t ) ) .
4.
Calculate the next control vector function
u ( n + 1 ) ( t ) : = u ( n ) ( t ) + Λ s ( n ) ( t )
with a sufficiently small positive step-size factor Λ . (Algorithm 1, line 46.)
These five steps are repeated for increasing n until u ( n ) ( t ) has converged to the optimal control. This can, for example, be checked with the below indicators which should both approach a numerical zero:
C ( n ) : = 0 τ u H ( x ( n ) ( t ) , u ( n ) ( t ) , λ ( n ) ( t ) ) 2 d t ,
C H ( n ) : = max t H ( x ( n ) ( t ) , u ( n ) ( t ) , λ ( n ) ( t ) ) min t H ( x ( n ) ( t ) , u ( n ) ( t ) , λ ( n ) ( t ) ) .

4.1. Exploiting Limit Cycles

The dynamic systems considered here are required to posses a limit cycle. This means that, given a proper periodic control function, the systems feature a closed state trajectory x ( t ) in the state space, which is attractive. Here, the subscript refers to this limit cycle. If the state dynamics is integrated forward in time starting from t = 0 with a proper initial value x | 0 in the vicinity of x ( 0 ) , then x | t x ( t ) for t . This is a property of many dissipative systems, and it is directly made use of in the first step (Algorithm 1, lines 31 to 35) for finding the periodic solution of the state vector.
Numerical studies of optimal control problems carried out in the context of this work show an interesting type of symmetry in that the costate dynamics then features a limit cycle, too, for prescribed u ( t ) and x | t : = x ( t ) . However, the respective closed trajectory λ ( t ) is repulsive when the costate dynamics is considered forward in time, and becomes attractive in the reversed time direction: λ | t λ ( t ) for t .Such a relation is not surprising, as the overall Hamiltonian system is conservative and the expansive costate dynamics compensates for the contractive state dynamics. Therefore, in the second step (Algorithm 1, line 38 to 42), the temporal direction of integration is reversed to obtain the periodic solution of the costate vector.
The correspondingly enhanced stability of the costate problem under temporal backward integration can also be exploited without directly making use of the limit-cycle property for obtaining the periodic solution, but for solving boundary value problems, for example, see [26,31].

4.2. Proper Embedding of the Control

Note that the way in which the control is embedded in the system’s state dynamics, can influence the existence of these limit cycles in the state and costate problems. In the Stirling engine optimization problem, considered in this paper, our goal is to optimize the piston paths. Hence, we chose to structure the system dynamics in such a way that the control function determines the temporal evolution of the working space volumes V i with i H , L . A rather obvious choice for embedding the control u i ( t ) would be:
V i ˙ = u i ( t ) .
For an explicitly time-dependent, τ -periodic control u i ( t ) that has an average value 0 τ u i ( t ) d t = 0 , the resulting volumes V i will be τ -periodic. However, this dynamics does not feature a limit cycle: The solution of V i | t will even for t being large integer multiples of τ remain equal to the initial value V i | 0 from which integration was started. This will translate to the costate problem, so that the solution algorithm from above will, in general, not converge without further manipulation of the optimization problem.
A proper choice for embedding the control in the system’s state dynamics that leads to the existence of a limit cycle for a continuous τ -periodic u i ( t ) is:
V i ˙ = ν τ u i ( t ) V i
with a sufficiently large number ν . This dynamics is similar to that of an overdamped mass-spring-damper system, where the spring support moves according to u i ( t ) . If ν then V i | t u i ( t ) for t , independent of the initial value V i | 0 . That is, for ν , the control vector function u ( t ) represents the limit cycle V ( t ) of the volumes.

5. Results

The previously described optimization algorithm was applied to the exemplary alpha-Stirling engine model presented in Section 2 to optimize the control (piston paths) regarding both power and efficiency. The optimizations were performed for varying cycle time τ , or correspondingly varying engine speed 1 / τ . With help of the penalty function from Equation (16), the working volumes were restricted to an approximate range from 100 cm 3 to 1100 cm 3 . The initial control, from which the optimizations were started, corresponds to harmonic piston paths exploiting the complete admissible working volume range and featuring a phase shift of 90 . This harmonic control will, in the following, also be used as a benchmark.
In Figure 2, the Stirling engine’s power-optimal working volume trajectories are shown for different engine speeds.
It can be seen that the power-optimal volume trajectories significantly deviate from harmonic shapes. At low engine speeds, it is favorable to let the pistons rest in their extreme positions for about half the cycle time. This feature is less pronounced at higher engine speeds. Above ca. 1100 rpm and ca. 1300 rpm the power-optimal working volume trajectories detach from the maximum volume bounds, as can be seen in Figure 2 at t / τ 1 / 4 and t / τ 1 , respectively. At the highest considered engine speed of 2000 rpm, the swept volumes are considerably reduced. The power-optimal engine speed is ca. 920 rpm, which is highlighted in Figure 2 by thick black lines. It is interesting that the power-optimal piston motions found in [22] by direct optimization are similar to the trajectories from Figure 2 for low and medium engine speeds. This is the case even though, in the current study, a Stirling engine with different parameters, and a much more detailed regenerator model, are considered. Nevertheless, compared to the parametric AS class of piston motions used in [22] for direct optimization, the trajectories from Figure 2 feature more details.
In Figure 3, the Stirling engine’s efficiency-optimal working volume trajectories are shown, again for different engine speeds.
Obviously, the efficiency-optimal volume trajectories are different from the power-optimal ones. The tendency to let the pistons rest in their extreme positions at low engine speeds can also be observed here. However, especially for the cold working volume, this feature is less distinctive than with the power-optimal trajectories. The efficiency-optimal volume trajectories tend to involve smaller piston velocities and reduced swept volumes, when compared to the power-optimal trajectories for the same engine speed. The efficiency-optimal engine speed is ca. 430 rpm, which is highlighted in Figure 3 by thick black lines.
In Figure 4 the Stirling engine’s power and efficiency are plotted against the engine speed for both the power-optimal control (solid, blue) and the efficiency-optimal control (dashed, green). Moreover, the values obtained with the harmonic control (dotted, grey) from which the optimizations were started is shown as a benchmark.
At the maximum power point, the relative power gain due to the power-optimal control is ca. 28%. The relative efficiency gain at the maximum efficiency point, which is achieved with the efficiency-optimal control, is ca. 10%.
Obviously, for a given engine speed, the power-optimal and efficiency-optimal controls each lead to maximum power and maximum efficiency, respectively. However, the optimization for one performance measure may come at the cost of the other. This can, in particular, be seen in the left-hand subfigure for the efficiency-optimal control: For medium engine speeds, the optimization for maximum efficiency leads to remarkable reductions in the output power. There, the power even drops below that obtained with the harmonic control. As opposed to that, the power-optimal control also leads to higher efficiency than the harmonic control over the complete considered range of engine speeds. Note, however, that this may be different for a different set of model parameters.
In the left-hand subfigure of Figure 4, it can be seen that the efficiency-optimal control (green, dashed) leads to a sharp bend at the maximum power point. This occurs at an engine speed of ca. 670 rpm, where the hot working volume trajectory (solid gray line in Figure 3) starts to detach from the maximum volume bound at t / τ 1 .
Note that optimal controls obtained with the optimization algorithm introduced above generally constitute local optima. This becomes obvious in Figure 4 when, for example, comparing the powers resulting from the power-optimal controls at τ = 0.06 s (1000 rpm) and τ = 0.12 s (500 rpm). At τ = 0.06 s the power is close to the maximum value, whereas at τ = 0.12 s the power is much lower. However, it is clear that the power-optimal control obtained for τ = 0.06 s is an admissible periodic control for τ = 0.12 s as well, since two oscillations could be performed in one cycle. Hence, the power obtained for τ = 0.06 s (1000 rpm) constitutes a lower bound for the global optimum at τ = 0.12 s (500 rpm). It can be concluded that the optimal control found for τ = 0.12 s (500 rpm) is a local optimum and not the global one. Similar arguments are applicable for the efficiency-optimal control, for example, with the efficiency values obtained at 400 rpm and 200 rpm.

6. Summary

In this paper, we presented an iterative gradient method for optimizing the piston paths of Stirling engines, which is based on Cyclic Optimal Control Theory. After a brief introduction to Stirling engines, we outlined an exemplary irreversible alpha-Stirling engine model. This model served for illustrative purposes and is structured in such a way that its state dynamics can be expressed as a set of coupled ordinary differential equations. The Stirling engine’s state dynamics is influenced by an explicitly time-dependent, vector-valued control function. In particular, this control function determines the temporal paths of the engine’s two working pistons.
The question of which realization of those piston paths—or correspondingly what control function—leads to optimal engine performance regarding a specific objective for a fixed cycle time, constitutes a cyclic optimal control problem. We introduced the necessary conditions of optimality for this problem, involving the definition of a Hamilton function, a path target function, and a set of adjoint ordinary differential equations (costate dynamics). For the optimization of Stirling engines, we presented proper definitions of path target functions to maximize either power or efficiency. Maximum and minimum volume constraints were accounted for here via an additional penalty term in the respective path target function.
Then, we gave a detailed description of an iterative optimization algorithm that starts with a predefined periodic control function, which is gradually shifted over the course of the iterations, so as to gradually enlarge the objective and approach the optimal control. To determine those gradual shifts of the control in every iteration, not only the engine’s state dynamics needs to be solved, but also the costate dynamics. The cyclic optimal control problem features a symmetry that manifests itself in attractive and repulsive limit cycles in the state and costate dynamics, respectively. The algorithm exploits these limit cycles to solve the state and costate dynamics for periodic boundary conditions.
This optimization algorithm was applied to both, power-optimize and efficiency-optimize the control (piston paths) of the above-mentioned exemplary alpha-Stirling engine model for a range of cycle times. The optimization results were compared to piston paths that correspond to a harmonic control with 90 phase shift, which had been used as an initial control for the optimizations. At the maximum power point, the relative power gain due to the power-optimal control is ca. 28%, whereas the relative efficiency gain due to the efficiency-optimal control at the maximum efficiency point is ca. 10%.
The developed optimization algorithm can easily be applied to other Stirling engine models that involve additional irreversibilities or transfer laws that are adapted to describe a specific experimental engine setup. Design limitations such as maximum pressure or maximum piston acceleration can be included in the optimal control problem in terms of additional constraints. Moreover, other types of machines, such as beta-type or free-piston Stirling engines, Stirling cryocoolers, or Vuilleumier refrigerators can be optimized analogously.

7. Conclusions

For the cyclic optimal control problems of a Stirling engine investigated here, we observed that the existence of an attractive limit cycle in the state dynamics translates to a repulsive limit cycle in the costate dynamics. We conclude that a very stable and numerically efficient way to solve such problems is through using indirect iterative gradient algorithms that exploit these limit cycles to solve the state and costate dynamics by temporal forward and backward integration, respectively.
In the case of the considered exemplary Stirling engine, the conducted piston path optimizations lead to significant performance gains of ca. 28% in maximum power and ca. 10% in maximum efficiency. This generally confirms earlier results [22,23,24] and we conclude that it can be very worthwhile to perform such optimizations during the design process of new engines or to improve the control strategy of existing ones. Numerous types of energy conversion systems operate cyclically. We expect that cyclic optimal control theory and, in particular, the developed algorithm can be applied to a wide class of these systems, in order to identify potential performance improvements and enhance their sustainability.

Author Contributions

Investigation, R.P. and K.H.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the German Federal Ministry of Education and Research grant number FKZ01LY1706B.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Swedish Stirling AB. Residual Gases—A Huge Market Potential for PWR BLOK. Available online: https://swedishstirling.com/en/marknad/ (accessed on 19 January 2021).
  2. Microgen Engine Corporation Group. Applications. Available online: https://www.microgen-engine.com/applications/ (accessed on 19 January 2021).
  3. Azelio. Building a Renewable Future. Available online: https://www.azelio.com/product/ (accessed on 19 January 2021).
  4. Qnergy. Remote Power. Available online: https://www.qnergy.com/remote-power/ (accessed on 19 January 2021).
  5. Andresen, B.; Salamon, P.; Berry, R.S. Thermodynamics in Finite Time. Phys. Today 1984, 37, 62–70. [Google Scholar] [CrossRef]
  6. Andresen, B. Current Trends in Finite-Time Thermodynamics. Angew. Chem. 2011, 50, 2690–2705. [Google Scholar] [CrossRef] [PubMed]
  7. Rubin, M.H. Optimal Configuration of a Class of Irreversible Heat Engines. I. Phys. Rev. A 1979, 19, 1272–1276. [Google Scholar] [CrossRef]
  8. Rubin, M.H. Optimal Configuration of a Class of Irreversible Heat Engines. II. Phys. Rev. A 1979, 19, 1277–1289. [Google Scholar] [CrossRef]
  9. Hoffmann, K.H.; Burzler, J.M.; Schubert, S. Endoreversible Thermodynamics. J. Non Equilib. Thermodyn. 1997, 22, 311–355. [Google Scholar]
  10. Hoffmann, K.H.; Burzler, J.M.; Fischer, A.; Schaller, M.; Schubert, S. Optimal Process Paths for Endoreversible Systems. J. Non Equilib. Thermodyn. 2003, 28, 233–268. [Google Scholar] [CrossRef]
  11. Hoffmann, K.H.; Watowich, S.J.; Berry, R.S. Optimal Paths for Thermodynamic Systems: The Ideal Diesel Cycle. J. Appl. Phys. 1985, 58, 2125–2134. [Google Scholar] [CrossRef]
  12. Burzler, J.M.; Blaudeck, P.; Hoffmann, K.H. Optimal Piston Paths for Diesel Engines. In Thermodynamics of Energy Conversion and Transport; Stanislaw Sieniutycz, S., de Vos, A., Eds.; Springer: New York, NY, USA, 2000; pp. 173–198. [Google Scholar] [CrossRef]
  13. Chen, L.; Xia, S.; Sun, F. Optimizing piston velocity profile for maximum work output from a generalized radiative law Diesel engine. Math. Comput. Model. 2011, 54, 2051–2063. [Google Scholar] [CrossRef]
  14. Xia, S.; Chen, L.; Sun, F. Engine performance improved by controlling piston motion: Linear phenomenological law system Diesel cycle. Int. J. Therm. Sci. 2012, 51, 163–174. [Google Scholar] [CrossRef]
  15. Mozurkewich, M.; Berry, R.S. Optimal Paths for Thermodynamic Systems: The ideal Otto Cycle. J. Appl. Phys. 1982, 53, 34–42. [Google Scholar] [CrossRef]
  16. Fischer, A.; Hoffmann, K.H. Can a quantitative simulation of an Otto engine be accurately rendered by a simple Novikov model with heat leak? J. Non Equilib. Thermodyn. 2004, 29, 9–28. [Google Scholar] [CrossRef]
  17. Ge, Y.; Chen, L.; Sun, F. Optimal path of piston motion of irreversible Otto cycle for minimum entropy generation with radiative heat transfer law. J. Energy Inst. 2012, 85, 140–149. [Google Scholar] [CrossRef]
  18. Watowich, S.J.; Hoffmann, K.H.; Berry, R.S. Intrinsically Irreversible Light-Driven Engine. J. Appl. Phys. 1985, 58, 2893–2901. [Google Scholar] [CrossRef]
  19. Watowich, S.J.; Hoffmann, K.H.; Berry, R.S. Optimal Paths for a Bimolecular, Light-Driven Engine. Il Nuovo Cim. B 1989, 104, 131–147. [Google Scholar] [CrossRef]
  20. Ma, K.; Chen, L.; Sun, F. Optimal paths for a light-driven engine with a linear phenomenological heat transfer law. Sci. China Chem. 2010, 53, 917–926. [Google Scholar] [CrossRef]
  21. Kojima, S. Maximum Work of Free-Piston Stirling Engine Generators. J. Non Equilib. Thermodyn. 2017, 42, 169–186. [Google Scholar] [CrossRef]
  22. Masser, R.; Khodja, A.; Scheunert, M.; Schwalbe, K.; Fischer, A.; Paul, R.; Hoffmann, K.H. Optimized Piston Motion for an Alpha-Type Stirling Engine. Entropy 2020, 22, 700. [Google Scholar] [CrossRef]
  23. Scheunert, M.; Masser, R.; Khodja, A.; Paul, R.; Schwalbe, K.; Fischer, A.; Hoffmann, K.H. Power-Optimized Sinusoidal Piston Motion and Its Performance Gain for an Alpha-Type Stirling Engine with Limited Regeneration. Energies 2020, 13, 4564. [Google Scholar] [CrossRef]
  24. Craun, M.; Bamieh, B. Optimal Periodic Control of an Ideal Stirling Engine Model. J. Dyn. Syst. Meas. Control 2015, 137, 071002. [Google Scholar] [CrossRef] [Green Version]
  25. Paul, R.R. Optimal Control of Stirling Engines. Ph.D. Thesis, Technische Universität Chemnitz, Chemnitz, Germany, 2020. [Google Scholar]
  26. Papageorgiou, M.; Leibold, M.; Buss, M. Optimierung—Statische, Dynamische, Stochastische Verfahren für die Anwendung; Springer Vieweg: Berlin/Heidelberg, Germany, 2015. [Google Scholar] [CrossRef]
  27. Berry, R.S.; Kazakov, V.A.; Sieniutycz, S.; Szwast, Z.; Tsirlin, A.M. Thermodynamic Optimization of Finite-Time Processes; John Wiley & Sons: Chicester, UK, 2000. [Google Scholar]
  28. Craun, M.J. Modeling and Control of an Actuated Stirling Engine. Ph.D. Thesis, University of California Santa Barbara, Santa Barbara, CA, USA, 2015. [Google Scholar]
  29. Horn, F.J.M.; Lin, R.C. Periodic processes: A variational approach. Ind. Eng. Chem. Process Des. Dev. 1967, 6, 21–30. [Google Scholar] [CrossRef]
  30. Kowler, D.E.; Kadlec, R.H. The optimal control of a periodic adsorber: Part II. Theory. AIChE J. 1972, 18, 1212–1219. [Google Scholar] [CrossRef] [Green Version]
  31. van Noorden, T.L.; Verduyn Lunel, S.M.; Bliek, A. Optimization of cyclically operated reactors and separators. Chem. Eng. Sci. 2003, 58, 4115–4127. [Google Scholar] [CrossRef]
Figure 1. Schematics of the alpha-type Stirling engine considered. The corresponding endoreversible model [25] has ten degrees of freedom (state variables), being the working space’s volumes V i , temperatures T i , and particle numbers n i , the energies E R . h and E R . l of the hot and cold halves of the regenerator matrix as well as the particle number n R . d and temperature T R . d of the gas inside the regenerator dead space.
Figure 1. Schematics of the alpha-type Stirling engine considered. The corresponding endoreversible model [25] has ten degrees of freedom (state variables), being the working space’s volumes V i , temperatures T i , and particle numbers n i , the energies E R . h and E R . l of the hot and cold halves of the regenerator matrix as well as the particle number n R . d and temperature T R . d of the gas inside the regenerator dead space.
Symmetry 13 00873 g001
Figure 2. Power-optimal trajectories of the working volumes V H (solid lines) and V L (dotted lines) of an exemplary alpha-Stirling engine for varying engine speed 1 / τ . The power-optimal engine speed is ca. 920 rpm (thick black lines).
Figure 2. Power-optimal trajectories of the working volumes V H (solid lines) and V L (dotted lines) of an exemplary alpha-Stirling engine for varying engine speed 1 / τ . The power-optimal engine speed is ca. 920 rpm (thick black lines).
Symmetry 13 00873 g002
Figure 3. Efficiency-optimal trajectories of the working volumes V H (solid lines) and V L (dotted lines) of an exemplary alpha-Stirling engine for varying engine speed 1 / τ . The efficiency-optimal engine speed is ca. 430 rpm (thick black lines). The power-optimal engine speed for the efficiency-optimal control is ca. 670 rpm (thick gray lines).
Figure 3. Efficiency-optimal trajectories of the working volumes V H (solid lines) and V L (dotted lines) of an exemplary alpha-Stirling engine for varying engine speed 1 / τ . The efficiency-optimal engine speed is ca. 430 rpm (thick black lines). The power-optimal engine speed for the efficiency-optimal control is ca. 670 rpm (thick gray lines).
Symmetry 13 00873 g003
Figure 4. Net output power P and efficiency η for the harmonic (gray, dotted), power-optimal (blue, solid), and efficiency-optimal (green, dasehd) control plotted against the engine speed.
Figure 4. Net output power P and efficiency η for the harmonic (gray, dotted), power-optimal (blue, solid), and efficiency-optimal (green, dasehd) control plotted against the engine speed.
Symmetry 13 00873 g004
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Paul, R.; Hoffmann, K.H. Cyclic Control Optimization Algorithm for Stirling Engines. Symmetry 2021, 13, 873. https://doi.org/10.3390/sym13050873

AMA Style

Paul R, Hoffmann KH. Cyclic Control Optimization Algorithm for Stirling Engines. Symmetry. 2021; 13(5):873. https://doi.org/10.3390/sym13050873

Chicago/Turabian Style

Paul, Raphael, and Karl Heinz Hoffmann. 2021. "Cyclic Control Optimization Algorithm for Stirling Engines" Symmetry 13, no. 5: 873. https://doi.org/10.3390/sym13050873

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop