  The context of the present paper is stochastic thermodynamics - an approach
to nonequilibrium thermodynamics rooted within the broader framework of
stochastic control. In contrast to the classical paradigm of Carnot engines, we
herein propose to consider thermodynamic processes with periodic continuously
varying temperature of a heat bath and study questions of maximal power and
efficiency for two idealized cases, overdamped (first-order) and underdamped
(second-order) stochastic models. We highlight properties of optimal periodic
control, derive and numerically validate approximate formulae for the optimal
performance (power and efficiency).
