# Modeling the Efficiency and Effective Temperature of Bacterial Heat Engines

Roland Wiese<EMAIL_ADDRESS>Klaus Kroy  Institute for Theoretical
Physics, Leipzig University, 04103 Leipzig, Germany  Viktor Holubec
<EMAIL_ADDRESS>Faculty of Mathematics and Physics, Charles
University, CZ-180 00 Prague, Czech Republic

###### Abstract

We present a Brownian dynamics simulation of the bacterial Stirling engine
studied by _Krishnamurthy et al., Nat. Phys. 12, 1134 (2016)_. In their
experimental setup, an overdamped colloid in an optical trap with time-
modulated stiffness interacts with a bacterial bath that we represent by an
ensemble of overdamped active particles. In the parameter regime of the
experiment the thermodynamic performance is governed by an effective
temperature and can be parametrized analytically by active Brownian particle
models. We quantitatively reproduce the efficiencies reported for the
experiments under the assumption that energy exchange with the bath during
isochores of the cycle is entirely recuperated and in agreement with the
second law.

##  I Introduction

Thermodynamic heat engines convert disordered forms of energy or “heat” into
systematic work. Their efficiency is limited by universal temperature-
dependent bounds dictated by the second law of thermodynamics. These extend to
non-classical baths, be they quantum-mechanical [1, 2], relativistic or
“active” [3, 4, 5], as long as their energy supply can be characterized by an
effective temperature, which seems a _sine qua non_ condition for speaking of
a heat bath, at all.

Figure 1: Snapshot of the simulated two-dimensional setup: The Brownian probe
(blue disk) confined by the harmonic potential (green cone) diffuses in an
equilibrium solvent (blue, modeled as a standard Markovian heat bath)
containing active Brownian particles (red circles) to represent the active
bacterial bath component, as employed in the experimental setup of Ref. [3].

Recent developments in micro-manipulation techniques now allow the realization
of heat engines based on a single Brownian particle [6]. A remarkable engine
of this kind [3] is based on a particle immersed in a solution of living
bacteria, serving as a paradigmatic example of a non-equilibrium bath. The
authors of Ref. [3] reported that they operate their engine along a Stirling
cycle, with efficiencies surpassing the corresponding ultimate thermodynamic
bound attained for diverging bath temperature. This result is perplexing
because the gain in efficiency seemingly cannot be explained just by the large
effective temperature reached by virtue of the broken zeroth law (since the
non-equilibrium bath degrees of freedom do not thermalize with its
surroundings) [4]

The authors of the experimental paper argued that their results follow from
the non-Gaussianity of the noise [3], but this explanation was later shown to
be insufficient [4, 7]. During the past few years, several studies attempted
to crack the puzzle either by considering the dependence of the effective
temperature on stiffness [4], a complicated memory of the active bath [8, 9,
7, 10, 11], or the temperature dependence of the bath activity [12]. But none
of these explanations seem entirely convincing, as very specific dependencies
of the effective temperature or non-Markovian effects are required to
reproduce at least a part of the observed efficiency as a function of the
effective temperature [3].

To resolve the issue, we performed computer simulations faithful to the
experiments described in Ref. [3]. An overdamped colloidal probe particle is
trapped in a harmonic potential and diffusing in a generic bath of active
Brownian particles, as sketched in Fig. 1. We tuned the model parameters
according to the experiments, including the Stirling-like time-dependent
protocols for trap stiffness, bath temperature, and activity. As in the
experiments, the resulting cycles were quasi-static. In such a case, the
effective temperature $T_{\rm eff}=k\sigma/2k_{B}$ is simply given by the
product of the position variance $\sigma$ and the trap stiffness $k$ [4, 13].
We checked that $T_{\rm eff}$ can be obtained with reasonable precision when
sampling the data with the measurement frequency applied in the experiments
(our first main result, shown in Fig. 4). The resulting $T_{\rm eff}$ depends
on the trap stiffness $k$ so that the actual cycle in the $T_{\rm eff}-k$
plane is no longer of the Stirling type.

The efficiency $\eta=W_{\rm out}/Q_{\rm in}$ of the engine, defined as the
output work per cycle, $W_{\rm out}$, over the energy accepted from the
reservoir during the isochoric expansion and the hot isotherm, $Q_{\rm in}$,
falls below the upper limit of the Stirling efficiency,
$1/[1~{}+~{}1/\log(k_{\max}/k_{\min})]$, reached for an infinite temperature
difference (where $k_{\rm max}$ and $k_{\rm min}$ are the upper and lower
bounds on the trap stiffness during the cycle). It is thus significantly
smaller than the efficiency reported in Ref. [3]. On the other hand, when we
calculate the efficiency as $\eta^{\star}=W_{\rm out}/Q_{\rm in}^{\star}$,
where $Q_{\rm in}^{\star}$ is just the energy accepted from the reservoir
during the hot isotherm, we obtain perfect agreement with the experimental
data, shown in Fig. 5, as our second main result. This strongly suggests that
the authors of Ref. [3] actually applied this alternative definition of
efficiency, which pertains to Stirling cycles with a perfect recuperation
mechanism that conserves the heat interchanged during the isochoric branches.
While this is often a reasonable definition for classical, macroscopic
Stirling engines, we are unaware of possible recuperation mechanisms that
allow to reuse the energy interchanged with bacterial baths.

The predictions for reversible efficiencies of the Carnot and Stirling cycles,
expressed in terms of the (correctly chosen) effective temperature difference
$\Delta T_{\rm eff}$, are consistent with the efficiencies obtained by
directly measuring input energy and output work both in simulation and
experiments, contrary to the conclusion in Ref. [3]. Moreover, the measured
profile of effective temperatures during the cycle can very well be fitted,
both for our simulations and for the experiments [3], by the effective
temperature of an active Brownian particle or an active Ohrstein-Uhlenbeck
particle trapped in a harmonic potential. Both toy models can thus serve as
effective models for the passive tracer together with its active bath. This
allows us to obtain analytical formulas for $\eta$ and $\eta^{\star}$, shown
to nicely agree with our numerical data and the experimental data from Ref.
[3], in Fig. 5.

The interesting question of which of these simple effective processes can
better reproduce features of the setup beyond its average thermodynamics,
i.e., its stochastic thermodynamics, is addressed in an accompanying paper
[14].

The rest of the paper is structured as follows: in the following Sec. II, we
detail our numerical model, the protocol, and the experimentally motivated
parameter values. Section III contains definitions of work, heat, efficiency,
and effective temperature of the studied setup. Furthermore, it contains
analytical results for these variables obtained using the mentioned effective
toy models, namely the active Brownian particle model and the active Ohrstein-
Uhlenbeck model. Readers familiar with these theoretical aspects of the
analysis of active Brownian heat engines can skip the theoretical part and
directly consult our simulation results in Sec. IV. We conclude in Sec. V.

##  II Model of a bacterial heat engine

The experiment described in Ref. [3] utilizes a quasi-two-dimensional setup,
where optical tweezers are employed to trap a colloidal probe that diffuses in
a bath of bacteria suspended in a water solvent, as illustrated in Fig. 1. We
model the probe in water as a soft overdamped Brownian particle with diameter
$d$, and the bacteria by soft active Brownian particles of the same diameter.

The optical tweezers induce an approximately harmonic potential
$U(\bm{r})=k\bm{r}^{2}/2$ with stiffness $k$, and we assume that this
potential is felt only by the probe. While optical tweezers are commonly
applied to manipulate bacteria, the authors of Ref. [3] reduced the trapping
of bacteria by the optical tweezers by adding glycerol to the solution,
rendering our approximation reasonable.

We assume that the interactions between the probe and the bacteria, as well as
between the individual bacteria, derive from the soft repulsive pair potential

$V(r)=4\epsilon\left[\left(\frac{d}{r}\right)^{6}-\left(\frac{d}{r}\right)^{3}+\frac{1}{4}\right]$
(1)

with energy scale $\epsilon$ and cutoff at the interparticle distance
$r=2^{1/3}d$, i.e. $V(r>2^{1/3}d)=0$, providing the particles with the “soft
radius” $d$.

The probe position vector $\bm{r}$ thus obeys the Langevin equation

$\dot{\bm{r}}=\mu\bm{F}-\mu k\bm{r}+\sqrt{2D_{t}}\bm{\xi}\,,$ (2)

and the dynamics of the “bacterial” position vectors ${\bm{r}}_{i}$ and
orientations $\theta_{i}$, $i=1,\ldots,N$, are described by the Langevin
equations

$\displaystyle\begin{split}\dot{\bm{r}}_{i}&=\mu\bm{F}_{i}+v_{a}\bm{n}_{i}+\sqrt{2D_{t}}\bm{\xi}_{i}\,,\\\
\dot{\theta}_{i}&=\sqrt{2D_{r}}\nu_{i}\,.\\\ \end{split}$ (3)

The repulsive forces read
$\bm{F}=-\sum_{i}\nabla_{\bm{r}}V(|\bm{r}-\bm{r}_{i}|)$ and
$\bm{F}_{i}=-\sum_{j}\nabla_{\bm{r}_{i}}V(|\bm{r}_{i}-\bm{r}_{j}|)-\nabla_{\bm{r}_{i}}V(|\bm{r}_{i}-\bm{r}|)$.
The probe and the active bath particles experience mutually independent
unbiased Gaussian white noises $\bm{\xi}$ and ${\bm{\xi}_{i}}$ with
translational diffusivity $D_{t}=\mu k_{B}T$, given by the temperature $T$,
Boltzmann’s constant $k_{B}$, and mobility $\mu$. The interaction energy is
set to $\epsilon=50k_{B}T_{c}$ for the minimum solvent temperature $T_{c}$.
For the active particles, we moreover need to account for the diffusion of
their orientations $\bm{n}_{i}=(\cos\theta_{i},\,\sin\theta_{i})$, along which
they self-propel at constant speed $v_{a}$, due to mutually independent
unbiased Gaussian white noises $\nu_{i}$ with rotational diffusivity $D_{r}$.

The dynamical equations are solved (iteratively) using Brownian dynamics
simulations with time step $dt=$20\text{\,}\mathrm{\SIUnitSymbolMicro s}$$
inside a square box of side length $L$ with periodic boundary conditions.

###  II.1 Parameters, units & microscopic Stirling cycle

We have chosen the parameters as close as possible to the experiment [3]. We
fixed the diameters of the probe and the bacteria to
$d=$1\text{\,}\mathrm{\SIUnitSymbolMicro m}$$. (For a discussion of the effect
of choosing different sizes for the probe and bacteria, see Ref. [14].) The
volume fraction $\phi=N\pi d^{2}/4L^{2}$ of the bacteria was kept constant at
the relatively low value $\phi=0.2$ to ensure that rare head-on collisions
responsible for the large tails in the position distribution of the probe [15,
16] were captured. All simulations were performed with $N=100$ bacteria,
corresponding to $L\approx$19.8\text{\,}\mathrm{\SIUnitSymbolMicro m}$$.

In the experiment [3], the trap stiffness $k$, water temperature $T$, and
bacterial activity, measured in our model by $v_{a}$ and $D_{r}$, were
periodically modulated according to a protocol mimicking a Stirling cycle. The
persistence time of the bacterial swimming motion reported in Ref. [3] was
$1\text{\,}\mathrm{s}$, regardless of other parameter values. We fixed the
rotational diffusivity to $D_{r}=$1\text{\,}\mathrm{Hz}$$, accordingly. For
_E. coli_ the swim speed was measured to be
$35\text{\,}\mathrm{\SIUnitSymbolMicro m}\text{\,}{\mathrm{s}}^{-1}$ [17],
which can be considered generic, since bacteria are generally reported to swim
at around $50\text{\,}\mathrm{\SIUnitSymbolMicro
m}\text{\,}{\mathrm{s}}^{-1}$, or $10^{2}$ times their body length during one
second [18]. It is highly sensitive to the ambient temperature $T$, though,
which is experimentally exploited to switch the activity on and (essentially)
off. In terms of the non-dimensional Péclet number $\mathrm{Pe}=v_{a}/dD_{r}$,
which gives a measure of the active transport during the orientational
persistence time, this behavior is captured by the range of
$\mathrm{Pe}\in[1,10^{2}]$ considered in our simulations.

Figure 2: Periodic protocols for the trap stiffness $k(t)$, solvent
temperature $T(t)$ in (a) and the bath particles’ Péclet number
$\mathrm{Pe}(t)$ in (b), as employed in the simulations.

In Fig. 2(a), we depict the protocols for stiffness and temperature employed
in the experiments, as well as in our simulations. In Fig. 2(b), we
additionally show the protocol used for $v_{a}$ in the simulation, which, we
believe, captures the main features of the protocol used in Ref. [3]. The
experimentally implemented Stirling cycle consists of four linear branches.
During “isothermal compression” (I), the trap stiffness increases from
$k_{\min}=$1.15\text{\times}{10}^{-11}\text{\,}\mathrm{N}\text{\,}{\mathrm{\SIUnitSymbolMicro
m}}^{-1}$$ to
$k_{\max}=$1.87\text{\times}{10}^{-11}\text{\,}\mathrm{N}\text{\,}{\mathrm{\SIUnitSymbolMicro
m}}^{-1}$$ while $T=T_{c}=$290\text{\,}\mathrm{K}$$ and $\mathrm{Pe}$ is at
its minimum. During the subsequent isochoric heating (II), the stiffness is
kept constant at $k_{\max}$, and water temperature increases from $T_{c}$ to
$T_{h}=$313\text{\,}\mathrm{K}$$ and the bacterial swimming intensifies from
its minimum to its maximum. The following isothermal compression (III) is
achieved by the decrease of the stiffness from $k_{\max}$ to $k_{\min}$ at
$T=T_{h}$ and maximum $\mathrm{Pe}$. The cycle is closed by an isochoric
cooling, where the temperature and Péclet number return to their initial
(minimum) values at constant stiffness $k_{\min}$ (IV). Its total duration is
$t_{\mathrm{p}}=$22\text{\,}\mathrm{s}$$ and those of the isothermal and
isochoric processes are $7\text{\,}\mathrm{s}$ and $4\text{\,}\mathrm{s}$,
respectively, all in accord with the experiment. Since in the experiment the
water temperature changed only slightly during the cycle, we assumed the
mobility to be constant and given by the value $\mu=1/6\pi\eta
d=$5\text{\times}{10}^{7}\text{\,}\mathrm{s}\text{\,}{\mathrm{kg}}^{-1}$$ for
a spherical Brownian particle with diameter
$d=$1\text{\,}\mathrm{\SIUnitSymbolMicro m}$$ and viscosity $\eta$ of water at
temperature $T_{c}=$290\text{\,}\mathrm{K}$$. Importantly, the relaxation time
$1/\mu k$ of the probe in the trap ranges from $1/\mu
k_{\max}\approx$1.1\text{\,}\mathrm{ms}$$ to $1/\mu
k_{\min}\approx$1.74\text{\,}\mathrm{ms}$$. This is always below the sampling
rate $\Delta t=$2\text{\,}\mathrm{ms}$$ used in our simulations and
experiments [3] to save numerical observables, and the engine operation can
therefore be considered quasi-static.

As indicated in the plots, length is measured in units of
$d=$1\text{\,}\mathrm{\SIUnitSymbolMicro m}$$, time in units of
$1/D_{r}=$1\text{\,}\mathrm{s}$$ and energy in units of
$k_{B}T_{c}=$4.002\text{\,}\mathrm{N}\text{\,}\mathrm{\SIUnitSymbolMicro m}$$.

##  III Theoretical analysis

In this section, we first review stochastic thermodynamic definitions of work,
heat, and efficiency. Then we discuss how the notion of thermodynamic
temperature can be extended to heat engines operating with non-equilibrium
reservoirs, like in the experiment under consideration. Finally, we present
analytical results for two equivalent versions of an effective model that maps
the whole setup onto a single swimmer in a trap: the active Brownian heat
engine (ABE) based on an individual active Brownian or active Ohrstein-
Uhlenbeck particle [4], respectively. Both versions serve as coarse-grained
descriptions of the simulations and yield consistent energetics but differ
with respect to their stochastic fluctuations, as further elaborated in Ref.
[14].

###  III.1 Work, heat and efficiency

The efficiency of a (heat) engine is defined as the ratio of the produced
(average) output work and the supplied energy input (heat),

$\eta=\frac{W_{\text{out}}}{Q_{\text{in}}}\,.$ (4)

In stochastic thermodynamics, a system’s known energy function and its
dependency on the control parameter $k$ of the driving protocol can be
utilized to define work and heat [19, 20]. The internal energy of the probe
with mass $m$ is

$U=k\sigma/2+m\langle{\bm{v}}^{2}\rangle/2,$ (5)

where the first term $k\sigma/2=k\langle{\bm{r}}^{2}\rangle/2$ is the
ensemble-averaged potential energy of the probe in the harmonic potential. The
second term is the probe’s average kinetic energy. Since the momentum
$m{\bm{v}}$ plays no role in the overdamped dynamics of the probe, the kinetic
energy is often neglected in assessing the efficiency of stochastic heat
engines, which can lead to overestimations [21] that are of minor relevance
for the present discussion.

In accordance with standard procedures of stochastic thermodynamics [19, 20]
and also with the experiment [3], we define work via the contribution
$\dot{k}\sigma/2$ to the rate of change $\dot{U}$ of the internal potential
energy $U$ due to the external driving of the system in $k$. The remainder
$k\dot{\sigma}/2+m\dot{\langle|{\bm{v}}|^{2}\rangle}/2$ of $\dot{U}$ is then
the energy input per time from the reservoir, which we identify as the heat
current. Note that this energy balance does not account for the power
necessary to keep the bath active (often called housekeeping heat) [4, 22, 23,
24], but only for the heat acquired from this active bath by the working
substance.

The total output work $W_{\text{out}}=-W$ and input heat $Q_{\text{in}}$ per
cycle follow from integrating these fluxes over time $t=0\ldots t_{p}$. For
the net output work, we get without any ambiguity the expression

$W_{\text{out}}=-\frac{1}{2}\int_{0}^{t_{p}}\dot{k}(t)\sigma(t)\,\mathrm{d}t\,.$
(6)

For the input heat, the situation is more complicated since it admits several
definitions, as will be discussed in the following. The positive energy
transferred from the bath is

$Q_{\text{in}}=\frac{1}{2}\int_{0}^{t_{p}}k(t)\dot{\sigma}(t)\Theta(\dot{\sigma})\,\mathrm{d}t\,,$
(7)

where the integrand is nonzero during branches II and III of the cycle in Fig.
2 and only heating but no cooling of the probe is counted, as ensured by the
Heaviside step function $\Theta(\dot{\sigma})$. This is the most commonly
employed definition of input heat in studying overdamped stochastic heat
engines [20, 4], which, according to its supplemental information, is also
applied to the experiment of Ref. [3].

To minimize avoidable losses and enhance their efficieny, macroscopic Stirling
engines can be operated using a recuperation mechanism, which stores the heat
leaving the working medium along the cooling branch IV and returns it during
the heating branch II. For perfect recuperation, only the input heat
$Q_{\text{in}}^{\star}$ transferred from the bath during the isothermal branch
III with $T(t)\equiv T_{h}$ counts as a net cost, or, using the Kronecker
symbol $\delta$, the branch with $\delta_{T_{h},T(t)}=1$:

$Q_{\text{in}}^{\star}=\frac{1}{2}\int_{0}^{t_{p}}k(t)\dot{\sigma}(t)\delta_{T_{h},T(t)}\,\mathrm{d}t\,.$
(8)

While this definition is thus quite useful for classical designs, it is hard
to imagine what a recuperation mechanism storing the energy released by the
“working medium” to the active bath should look like.

In any case, the above expression for $Q_{\rm in}$ does not account for the
rate of kinetic energy change $m\dot{\langle{\bm{v}}^{2}\rangle}/2$. In the
overdamped approximation, momentum degrees of freedom of the particle are
assumed to be in thermal equilibrium with a background solvent at all times.
Thus $m\dot{\langle{\bm{v}}^{2}\rangle}/2=k_{B}\dot{T}$, and the kinetic
contribution to $Q_{\text{in}}$ is $k_{B}(T_{h}-T_{c})$ while it vanishes for
$Q_{\text{in}}^{\star}$.

For ordinary (“passive”) quasi-static Stirling cycles such as the one depicted
in Fig. 2(a) with $\mathrm{Pe}(t)=0$, the most commonly used expression (7)
for the heat supply yields [25]

$\eta_{\infty}^{\text{eq}}=\eta_{c}[1+\eta_{c}/\log(k_{\max}/k_{\min})]^{-1}$
(9)

for the efficiency from Eq. (4). Taking into account the kinetic contribution
to the input heat, the latter changes to
$W_{\text{out}}/(Q_{\text{in}}+k_{B}(T_{h}-T_{c}))$, which is always smaller.
The kinetic contribution becomes negligible for active engines operating with
a large activity difference, as shown in Fig. 5(b), which is pertinent to the
experimental setup.

Assuming perfect recuperation, the input heat is given by Eq. (8), no matter
whether the kinetic contribution to heat is counted or not, and the efficiency
reads

$\eta^{\star}=\frac{W_{\text{out}}}{Q_{\text{in}}^{\star}}\,.$ (10)

For quasi-static passive engines, $\eta^{\star}$ is then equivalent to the
Carnot efficiency, $\eta_{c}=1-T_{c}/T_{h}$, the optimum achievable for any
heat engine, independently of design and working substance, and independently
of how the heat bath is practically realized.

Besides the standard efficiencies (4) and (10), defined as average work over
average heat, one may also consider the stochastic efficiency
$\eta_{s}=-w/q_{\text{in}}$, where $w$ and $q_{\text{in}}$ are stochastic work
and heat per cycle, defined in App. B. The large deviation function of
$\eta_{s}$ does provide useful information about the engine efficiency [26,
27, 28, 29, 30], but only when very large sample sizes are available. However,
$\eta_{s}$ itself is not so useful for the study of average thermodynamics
because all its moments diverge [31]. Yet, it is sometimes still being
employed for that purpose [12]. In Fig. 7 in App. B, we plot the running mean
of $\eta_{s}$ over the number of cycles to illustrate the fact that $\eta_{s}$
is not a well-behaving stochastic quantity upon averaging.

###  III.2 Effective temperature

Thermodynamic temperature is classically defined by the zeroth and second laws
of thermodynamics [32]. Since the zeroth law relies on mutual equilibration,
it does not hold for out-of-equilibrium systems such as active systems. For
these, each degree of freedom (or thermometer) $i$ may acquire a different
(effective) temperature $T_{\text{eff}}^{i}$ [8, 33, 13], which merely needs
to be consistent with the second law, in sharp contrast to equilibrium where
all thermometers (no matter which degree of freedom they couple to) must show
identical results. Breaking the zeroth law is thus what allows active systems
to operate at meaningful bath temperatures
$T_{\text{eff}}\sim\mathcal{O}(${10}^{3}\text{\,}\mathrm{K}$)$ and thereby
achieve large efficiencies, approaching the limit $\eta=1$ of work-to-work
conversion, without burning the laboratory.

Even though there is an ongoing debate in the literature, which effective
temperature is the most suitable for assessing the thermodynamic performance
of an active engine [8, 4, 9, 13, 10], we demonstrate below that it should be
the effective temperature linked to the degrees of freedom, which act as the
engine’s working medium. Only a correspondingly defined effective temperature
provides, if it exists, a proper second law upper bound on the engine
efficiency and thereby a consistent notion of heat and heat engine (as opposed
to imperfect work-to-work transducers, say) [4]. An appropriate notion of
effective temperature is not guaranteed to exist when the working medium
comprises more than a single degree of freedom, as different degrees of
freedom can have different $T_{\text{eff}}$ [4]. For example, when using work
and heat definitions (6) and (7) (neglecting kinetic contributions to heat,
for simplicity) or (8), we find that the work-producing degree of freedom of
the medium is the position variance $\sigma$, and thus $T_{\text{eff}}$
exists. On the other hand, using the heat definition (7) plus the kinetic term
from Eq. (5) means that the working medium comprises both position and
momentum variances, and the existence of $T_{\text{eff}}$ is not guaranteed
[5].

Clearly, if the effective temperature does not exist, it does not make sense,
thermodynamically, to speak of a heat engine. The reason is that it then
becomes impossible to determine, with thermodynamic means, how much of the
energy interchanged between the working fluid and the bath is “disordered
heat” or “work in disguise”. For thermodynamic cycles with equilibrium
reservoirs, temperatures $T_{i}$ relate the energies $Q_{i}$ extracted from
the individual baths to their entropy change $\Delta S_{i}=-Q_{i}/T_{i}$, via
the Clausius equality. Since the entropy change of the working medium per
cycle vanishes, the temperatures $T_{i}$ provide a mapping between the energy
changes $Q_{i}$ of the baths and the total entropy change per cycle, $\Delta
S_{\rm tot}=-\sum_{i}Q_{i}/T_{i}$. The second law $\Delta S_{\rm tot}\geq 0$
then implies an upper bound $\eta<1$ on the engine’s efficiency, which
saturates for quasi-static reversible cycles. For cycles with non-equilibrium
reservoirs, no such _a priori_ upper bound on efficiency exists unless one can
assign a set of effective temperatures $T_{i}^{\rm eff}$ to the non-
equilibrium baths, providing a thermodynamically consistent replacement for
the above $T_{i}$. If $T_{i}^{\rm eff}$ do not exist, i.e., one cannot relate
the energy transferred from the reservoirs with a thermodynamically consistent
entropy production, or change in “disorder”, no second law bound on efficiency
exists, and one can only apply the first law limitation $\eta\leq 1$, also
valid for work-to-work conversion.

For quasi-static processes, when a system is in contact with non-equilibrium
reservoirs, effective temperatures of individual degrees of freedom can be
found by comparing their observed behavior with their behavior under the same
control parameters while in contact with an equilibrium reservoir at a well-
defined temperature. Consider, for example, a system described by a
Hamiltonian $H(k,\bm{r})=kf(\bm{r})/2$, where $k(t)$ is the externally
modulated parameter. In this case, the working medium has the single degree of
freedom $\sigma=\langle f(\bm{r})\rangle$, work and heat currents are given by
$\dot{k}\sigma/2$ and $k\dot{\sigma}/2$, and $T_{\rm eff}$ exists. Under
equilibrium conditions, $\langle
f(\bm{r})\rangle_{\text{eq}}=\sigma_{\text{eq}}(k,T)=\int
f(\bm{r})e^{-H(k,\bm{r})/k_{B}T}/Z(k,T)$, where $Z(k,T)$ is the partition
function. The effective temperature $T_{\text{eff}}$ can thus be calculated
from the implicit equation $\sigma_{\text{eq}}(k,T_{\rm eff})=\sigma$. It
corresponds to the temperature of an equilibrium bath that, if used as a
replacement for the non-equilibrium bath, would give the same thermodynamic
performance. Since $T_{\rm eff}$ follows from the Boltzmann distribution, its
thermodynamic consistency with the second law is guaranteed by construction.
Noteworthily, identical working media in contact with different non-
equilibrium baths at the same $T_{\text{eff}}$ yield the same thermodynamic
performance, which provides a notion of (reduced) thermodynamic universality
in the absence of the zeroth law.

The work and heat definitions in Eqns. (6) and (7) (neglecting kinetic
contribution to heat) or (8) are related to the general example above via the
function $f(\bm{r})={\bm{r}}^{2}$. In two dimensions,
$k\sigma_{\text{eq}}/2=k_{B}T$ and thus

$T_{\text{eff}}=\frac{k}{2k_{B}}\sigma\,.$ (11)

###  III.3 Results for the active Brownian heat engine

In the numerical model in Sec. II, the effect of the bath on the probe is
described by the combined active and passive noise
${\bm{\eta}}\equiv\mu\bm{F}+\sqrt{2D_{t}}\bm{\xi}$ in Eq. (3), with which the
dynamical equation for the probe can be rewritten in the form

$\dot{\bm{r}}=-\mu k\bm{r}+\bm{\eta}.$ (12)

According to the above discussion, identical working media in contact with
different non-equilibrium baths yield the same thermodynamic performance if
the baths are described by the same $T_{\text{eff}}$. This implies, in
particular, that the complex many-body problem posed by the operation of the
active heat engine can be mapped onto a much simpler toy model involving a
single active particle, self-propelled by some effective noise. By finding the
effective temperature corresponding to Eq. (12) for a given active particle
model, one can thus develop a toolkit of analytically tractable toy models for
the original bacterial heat engine and compute analytical predictions for its
thermodynamic performance.

Arguably, the simplest noise $\bm{\eta}$ in Eq. (12), which genuinely brings
the trapped colloid out of equilibrium, is exponentially correlated noise,
such as in the active Brownian particle (ABP) [4] or active Ornstein-Uhlenbeck
particle (AOUP) [34] models. More precisely, the noise autocorrelation
function for the ABP and AOUP models can be written in the form
$\langle\eta_{i}(t)\eta_{j}(t^{\prime})\rangle=\delta_{ij}v_{a}^{2}e^{-D_{r}|t-t^{\prime}|}+2D_{t}\delta_{ij}\delta(t-t^{\prime})$,
and thus $\bm{\eta}$ comprises an exponentially correlated component,
representing the persistent motion due to activity, and an independent white
component, describing thermal background noise.

For both of these models the quasi-static variance $\sigma_{\infty}$ reads
[4],

$\sigma_{\infty}(k,T,v_{a})=\frac{2k_{B}T_{\text{eff}}}{k}=\frac{2k_{B}T}{k}+\frac{v_{a}^{2}}{\mu
k(\mu k+D_{r})}$ (13)

so that they predict the same energetics and thus the same thermodynamic
performance. The two models differ in the probability density of the noise,
though. While it is non-Gaussian for the ABP, it is Gaussian for the AOUP. In
a certain parameter regime, the noise $\bm{\eta}$ measured in the simulations
becomes Gaussian and exponentially correlated, and, in this regime, the AOUP
also reproduces fluctuations of work and heat very satisfactorily [14].

We follow Ref. [4] in summarizing such (thermodynamically equivalent) engines
with the effective temperature $T_{\text{eff}}$ given by Eq. (13) by the
notion of active Brownian heat engine (ABE). For the ABE, the quasi-static
thermodynamic performance can be investigated analytically by substituting the
quasi-static variance $\sigma_{\infty}$ in the definitions of work and heat in
Eqns. (6)–(8). Work is performed only during the expansion and compression
branches, i.e., $W_{\text{out}}=-W_{\text{I}}-W_{\text{III}}$,

$\displaystyle W_{\text{I}}$
$\displaystyle=\int_{k_{\min}}^{k_{\max}}\sigma_{\infty}(T_{c},v_{\min})\,\mathrm{d}k\,,$
$\displaystyle W_{\text{III}}$
$\displaystyle=\int_{k_{\max}}^{k_{\min}}\sigma_{\infty}(T_{h},v_{\max})\,\mathrm{d}k\,.$

The heat supplied by the hot active bath during branch III is given by the
first law, $Q_{\text{in}}^{\star}=\Delta U_{\text{III}}-W_{\text{III}}$, with
the energy difference

$\Delta U_{\text{III}}=U(k_{\min},T_{h},v_{\max})-U(k_{\max},T_{h},v_{\max}),$

where $U(k,T,v_{a})=k\sigma_{\infty}(k,T,v_{a})/2$.

The total heat input (7) reads $Q_{\text{in}}=\Delta U_{\text{II}}+\Delta
U_{\text{III}}-W_{\text{III}}$, where

$\Delta U_{\text{II}}=U(k_{\max},T_{h},v_{\max})-U(k_{\max},T_{c},0)$

and the complete expressions for the efficiencies
$\eta_{\infty}^{\star}=W_{\text{out}}/Q_{\text{in}}^{\star}$ and
$\eta_{\infty}=W_{\text{out}}/Q_{\text{in}}$ are then,

$\eta_{\infty}^{\star}=\frac{(T_{h}-T_{c})\log\frac{k_{\max}}{k_{\min}}+\frac{\mu
k_{\min}+D_{r}}{D_{r}}\left[\Delta
T_{\text{eff}}-(T_{h}-T_{c})\right]\log\frac{k_{\max}(\mu
k_{\min}+D_{r})}{k_{\min}(\mu
k_{\max}+Dr)}}{T_{h}\log\frac{k_{\max}}{k_{\min}}+(\mu
k_{\min}+D_{r})\left[\Delta
T_{\text{eff}}-(T_{h}-T_{c})\right]\left[\frac{\mu(k_{\max}-k_{\min})}{(\mu
k_{\min}+D_{r})(\mu k_{\max}+D_{r})}+\frac{1}{D_{r}}\log\frac{k_{\max}(\mu
k_{\min}+D_{r})}{k_{\min}(\mu k_{\max}+D_{r})}\right]}\,,$ (14)
$\eta_{\infty}=\frac{(T_{h}-T_{c})\log\frac{k_{\max}}{k_{\min}}+\frac{\mu
k_{\min}+D_{r}}{D_{r}}\left[\Delta
T_{\text{eff}}-(T_{h}-T_{c})\right]\log\frac{k_{\max}(\mu
k_{\min}+D_{r})}{k_{\min}(\mu
k_{\max}+D_{r})}}{(T_{h}-T_{c})+T_{h}\log\frac{k_{\max}}{k_{\min}}+\left[\Delta
T_{\text{eff}}-(T_{h}-T_{c})\right]\left[1+\frac{\mu
k_{\min}+D_{r}}{D_{r}}\log\frac{k_{\max}(\mu k_{\min}+D_{r})}{k_{\min}(\mu
k_{\max}+D_{r})}\right]}\,.$ (15)

Here, the effective temperature difference $\Delta T_{\text{eff}}=\max\Delta
T_{\text{eff}}-\min\Delta T_{\text{eff}}$ is

$\Delta T_{\text{eff}}=T_{h}-T_{c}+\frac{v_{\max}^{2}}{2\mu k_{B}(\mu
k_{\min}+D_{r})}.$ (16)

Note that the minimum swim speed is assumed to be zero, $v_{\min}=0$, to
simplify the expression and reduce the number of parameters. Small minimum
swim speeds of $v_{a}\approx$1\text{\,}\mathrm{\SIUnitSymbolMicro
m}\text{\,}{\mathrm{s}}^{-1}$$ amount to small changes in the effective
temperature $\Delta T_{\rm eff}\approx$1\text{\,}\mathrm{K}$$ via Eq. (13) and
become negligible for the large temperature differences considered in the
following section (and probably in most meaningful applications).

In the limit of a passive cycle, i.e., $v_{\max}\to 0$ and $\Delta
T_{\text{eff}}\to T_{h}-T_{c}$, $\eta_{\infty}^{\star}$ reduces to $\eta_{c}$
and $\eta_{\infty}$ to the equilibrium quasi-static Stirling efficiency (9).
The same limits are reached for vanishing persistence, $D_{r}\to\infty$, when
ABP and AOUP behave like a (passive) Brownian particle. In the opposite limit
of infinite persistence, i.e., $v_{\max}\to\infty$ and $\Delta
T_{\text{eff}}\to\infty$, one obtains well-defined limits that are distinct
from their conventional counterparts,

$\displaystyle\lim_{\Delta T_{\text{eff}}\to\infty}\eta_{\infty}$
$\displaystyle=\left[1+\frac{\frac{D_{r}}{\mu
k_{\min}+D_{r}}}{\log\frac{k_{\max}(\mu k_{\min}+D_{r})}{k_{\min}(\mu
k_{\max}+D_{r})}}\right]^{-1}\,,$ $\displaystyle\lim_{\Delta
T_{\text{eff}}\to\infty}\eta_{\infty}^{\star}$
$\displaystyle=\frac{\log\frac{k_{\max}(\mu k_{\min}+D_{r})}{k_{\min}(\mu
k_{\max}+D_{r})}}{\log\frac{k_{\max}(\mu k_{\min}+D_{r})}{k_{\min}(\mu
k_{\max}+D_{r})}+\frac{D_{r}\mu(k_{\max}-k_{\min})}{(\mu k_{\min}+D_{r})(\mu
k_{\max}+D_{r})}}\,.$

Notably, for all $\Delta T_{\text{eff}}>T_{h}-T_{c}$, the relations
$\eta_{c}>\eta_{\infty}^{\star}$ and $\eta_{\infty}^{\text{eq}}>\eta_{\infty}$
hold. This is caused by the stiffness dependence of the effective temperature
in Eq. (13), which implies that the active engine does not follow a Stirling
protocol in the $T_{\text{eff}}-k$ diagram, even under quasi-static driving,
as depicted in Fig. 4. For finite $v_{\max}$, the efficiency is determined by
the competition of time scales $1/\mu k$ and $1/D_{r}$. The studied model
operates in the regime where the persistence time dominates over the
equilibration time in the harmonic trap, $1/D_{r}\gg 1/\mu k$, but other
choices could be worthwhile to explore experimentally.

The results presented in this section provide a fit-free analytical
description (in terms of $\Delta T_{\rm eff}$) of the efficiency obtained from
the simulations using identical parameter values as given in Sec. II in the
above equations.

##  IV Simulation results

Figure 3: The effective temperatures $T_{\text{eff}}$ as functions of the
Péclet number for the probe in the active bath (symbols) and the effective ABE
(dashed line). Different symbols correspond to the evaluation of $T_{\rm eff}$
from the probe’s position variance (dark red circles) and the autocorrelation
functions of its driving noise (green triangles) as well as its athermal
component $\mu\bm{F}$, alone (red squares). All effective temperatures were
obtained at constant solvent temperature $T=T_{c}$ (dash-dotted baseline) and
trap stiffness $k=k_{\min}$.

In this section, we describe the main numerical results obtained by solving
our implementation of the bacterial engine of Ref. [3], as described in Sec.
II, using Brownian dynamics simulations.

In Fig. 3, the symbols represent the effective temperature
$T_{\text{eff}}=k\sigma/(2k_{B})$ from Eq. (11) as a function of the Péclet
number $\mathrm{Pe}~{}=~{}v_{a}/dD_{r}$, for fixed solvent temperature $T$ and
stiffness $k$. We determined the position variance from the simulation data
using two complementary approaches. First, we directly averaged the squared
magnitude of the position vector (dark red circles). Secondly, we calculated
$\sigma$ from the autocorrelation function of the noise
$\bm{\eta}=\mu\bm{F}+\sqrt{2D_{t}}\bm{\xi}$ as detailed in App. A (green
triangles). Red squares illustrate that neglecting the thermal noise
contribution to $\bm{\eta}$ leads to a slight overestimation of $T_{\rm eff}$,
showing that the active and thermal noise contributions are anti-correlated.
(The thermal noise disturbs the active swimming slightly.) The dashed line in
Fig. 3 shows $T_{\text{eff}}$ from Eq. (13) for the much simpler schematic ABE
model, evaluated using the parameters from Sec. II except for the swim speed
$v_{a}=$9\text{\,}\mathrm{\SIUnitSymbolMicro}\mathrm{m}\mathrm{/}\mathrm{s}$$,
which was adjusted to fit the simulation results at $\mathrm{Pe}=10$
($v_{a}=$10\text{\,}\mathrm{\SIUnitSymbolMicro}\mathrm{m}\mathrm{/}\mathrm{s}$$).
The actual probe particle to be represented by the effective ABE is thereby
found to self-propel at a slightly lower speed than the “bacteria” in the
bath. Although the numerical data for $T_{\rm eff}$ are not perfectly
parabolic in $\mathrm{Pe}$ at higher values, the ABE prediction, Eq. (13),
nicely agrees with the simulation up to
$T_{\text{eff}}\approx${10}^{3}\text{\,}\mathrm{K}$$. Punctual agreement
between the two models at higher $T_{\rm eff}$ can, of course, be enforced by
fitting the ABE’s $v_{a}$ to the measured $\sigma$, at the desired
$\mathrm{Pe}$ value. In Ref. [14], we further show that $T_{\rm eff}$
increases quadratically with the probe radius, in agreement with Eq. (13) for
$D_{r}\ll\mu k$ (as experimentally the case) since the mobility $\mu$ is
inversely proportional to it.

Our first main result is Fig. 4, showing the time evolution of the position
variances (left panels) and the dependence of the corresponding effective
temperatures on the trap stiffness (right panels) during the cycle depicted in
Fig. 2, for several activity protocols. The data in the upper panels were
obtained from several thousands of consecutive cycles to obtain relatively
smooth lines. In contrast, the lower panels mimic the data acquisition in the
experiment, with only a hundred consecutive cycles [3]. The figure
demonstrates that despite the relatively poor statistics attainable in
experiments, a quantitative analysis of the engine’s performance using
$T_{\text{eff}}$ is still possible. As discussed in the previous section,
Figs. 2 and 4 contains all the information necessary to assess the average
thermodynamic performance of the engine.

The shapes of the cycles in Fig. 4(b) and (d) show that only for a passive
bath ($\mathrm{Pe}=0$) the engine operates along a proper Stirling cycle,
which corresponds to a rectangle in the $T_{\text{eff}}-k$ plane. Otherwise
($\mathrm{Pe}>0$), the effective temperature during the expansion branch of
the cycle (III in Fig. 2) decays with the stiffness, as nicely predicted by
the simple ABE in Eq. (13). The efficiency is thus no longer that of a
Stirling process, as given in Eq. (9).

Finally, Fig. 4 demonstrates that already partial knowledge of the variance
along a full cycle of the active engine allows its mapping to the ABE. In the
figure, the mapping is achieved by adjusting minimum and maximum values of
$v_{a}$ in Eq. (13) so that minimum and maximum values of $\sigma_{\infty}$
agree with those measured for $\sigma$ (illustrated by the two black dots in
Fig. 4(a)), keeping the other parameters fixed at the values given in Sec. II.
Using this method, the variances and effective temperatures of the simulation
and the ABE are seen to agree nicely over the whole cycle (see the dashed and
continuous lines in Fig. 4(a) and (b)).

Figure 4:  Simulation results and theoretical predictions for the Stirling
protocol of Fig. 2 in terms of the position variance $\sigma$ as a function of
time (left panels) and the phase portrait, which depicts the effective
temperature difference $\Delta T_{\rm eff}=T_{\rm eff}-\min T_{\rm eff}$
against the trap stiffness $k$ (right panels). Transparent lines were obtained
by calculating $\sigma$ as an average over several thousand (upper panels) and
hundred (lower panels) consecutive cycles. The solid lines are moving averages
of the transparent lines over 200 time points. In (a) and (b), the simulation
data is complemented by analytical results obtained from the reduced ABE
model, Eq. (13), for the passive case and for $\mathrm{Pe}\in[1,40]$ (blue and
yellow dashed lines, respectively). The minimum and maximum values of $v_{a}$
in the active ABE were determined by adjusting the variance of the ABE to the
simulations at the two black dots in (a). In (b) an additional passive
Stirling cycle (blue line), operating at the extreme temperature difference
$\Delta T=$950\text{\,}\mathrm{K}$$, is shown to underscore the difference
between the actual cycle of the active engine and the conventional Stirling
protocol that the original experiments attempted to imitate.

Our second main result is shown in Fig. 5(a), where we present the
experimentally achieved efficiency from Ref. [3] (diamonds) and numerical
results for the various definitions of the efficiency discussed in Sec. III
(other symbols) together with corresponding analytical predictions from the
reduced ABE model (lines). The most common definition (4) of efficiency for
overdamped stochastic heat engines ($W_{\text{out}}/Q_{\text{in}}$, full
circles), neglecting kinetic energy but accounting for the heat absorbed by
the working medium during the isochoric heating branch of the Stirling cycle
in Fig. 2, yields values slightly below the standard Stirling efficiency
$\eta_{\infty}^{\text{eq}}$ in Eq. (9), whenever the bath is active. As
explained above, this is because the actual cycle is not a perfect Stirling
cycle in the $T_{\text{eff}}-k$ plane. On the other hand, the numerically
determined $W_{\text{out}}/Q_{\text{in}}$ almost perfectly agrees with the
corresponding analytical result $\eta_{\infty}$ for the ABE in Eq. (15). The
efficiency $W_{\text{out}}/(Q_{\text{in}}+Q_{v})$ (open circles), which does
additionally account for the kinetic energy contribution, is about $11\%$
smaller than $W_{\text{out}}/Q_{\text{in}}$ for the “passive” engine ($\Delta
T=$23\text{\,}\mathrm{K}$$) and quickly converges to
$W_{\text{out}}/Q_{\text{in}}$ with increasing activity. This is shown in Fig.
5(b), where we depict the relative error
$\Delta\eta=1-Q_{\text{in}}/(Q_{\text{in}}+Q_{v})$ of
$W_{\text{out}}/Q_{\text{in}}$. The heat leakage through momentum degrees of
freedom can thus be safely neglected for strongly active systems. Moreover,
$\Delta\eta=0$ when one can experimentally realize the activation at constant
solvent temperature $T$, e.g., by modulating the activity via external
electric fields [35, 36].

The efficiencies computed using the optimistic (but unrealistic) recuperation
definition (10) ($W_{\text{out}}/Q_{\text{in}}^{\star}$, triangles), nicely
follow the corresponding analytical ABE prediction (14),
$\eta_{\infty}^{\star}$. The mismatch for large $\Delta
T_{\text{eff}}\gtrsim$1000\text{\,}\mathrm{K}$$ is caused by the above-
mentioned inaccuracy of the ABE effective temperature compared to that of our
simulation, as depicted in Fig. 3.

Interestingly, the values of the nominal efficiency at perfect recuperation,
both of our simulations and the reduced analytical ABE model nicely agree with
the efficiencies reported experimentally in Ref. [3]. Despite the claim of
using heat and efficiency definitions equivalent to our $Q_{\rm in}$ in Eq.
(7) and $\eta=W_{\rm out}/Q_{\rm in}$, respectively, formulated in their
supplementary information, our results thus strongly suggest that the authors
of Ref. [3] must inadvertently have adopted the recuperation definition of
efficiency $\eta^{\star}=W_{\rm out}/Q_{\rm in}^{\star}$. This is arguably a
more straightforward and theoretically better-supported explanation of the
reported unconventionally large efficiencies than those we have found in the
literature [3, 7, 9, 7, 10, 11, 12].

Figure 5:  (a) Efficiencies obtained from our simulations (triangles and
circles) compared to experiments [3] (diamonds) as functions of the effective
temperature difference $\Delta T_{\text{eff}}$. Lines depict the corresponding
analytical predictions (14) and (15) from the reduced ABE model, except the
dark red line (Carnot’s efficiency, equivalent to Stirling’s at perfect
recuperation) and the yellow line (Stirling efficiency without recuperation).
The triangles correspond to our numerical data, if employed to evaluate the
(inappropriate) nominal recuperation definition of efficiency (10). The full
and open circles represent the most common definition of overdamped efficiency
(4) without and with considering the heat leaked through momentum degrees of
freedom, respectively. The relative difference $\Delta\eta$ between these two
efficiencies is shown in (b).

##  V Conclusion and Outlook

We performed numerical simulations of a relatively simple but physically sound
model of the bacterial heat engine realized experimentally in Ref. [3]. The
colloidal particle trapped by optical tweezers, which represents the working
medium of the engine, was modeled as an overdamped Brownian particle in a
harmonic potential. The bacterial bath surrounding the colloid was realized as
an ensemble of active Brownian particles in a Markovian solvent, interacting
with the probe by a soft, short-range repulsive potential.

The central results of our study are displayed in Figs. 4 and 5. Figure 4
contains all information about the system’s average response to the imposed
periodic protocol needed for a thermodynamic analysis of the cycle using the
key concept of an effective temperature. Importantly, the figure shows that
this information is sufficiently accessible also with the limited resolution
of the experimental setup of Ref. [3]. Figure 5 illustrates how the bounds on
the efficiency according to the second law limit the efficiency obtained from
simulations in terms of the effective temperature. Moreover, the puzzlingly
large efficiencies reported from the experiments in Ref. [3], which seemed in
conflict with the second law of thermodynamics, are seen to nicely agree with
the nominal ideal recuperation efficiency of the numerical model. Although, in
the absence of a technical implementation of such recuperation for the
bacterial bath, this figure of merit has so far no practical significance, we
thereby provide a simple explanation for a long-standing puzzle. Finally, our
numerical results for efficiencies and effective temperatures align well with
results obtained analytically by means of a hugely simplified model of the
bacterial heat engine, based on a single effective active Brownian or active
Ohrstein-Uhlenbeck particle. This empirical mapping provides a nice
demonstration that all systems with the same Hamiltonian and the same
effective temperature yield identical average thermodynamics, including the
efficiencies, for a given protocol.

More generally, this study shows that whenever an effective temperature
$T_{\text{eff}}$ according to the second law can be defined for an engine
operating with a non-equilibrium bath, it offers the most straightforward way
to assess its average thermodynamic performances and to derive bounds on it.
This includes deriving optimal protocols for the output power of heat engines
with active reservoirs from the known results for engines with equilibrium
reservoirs [4]. Generalizing in the same way results for maximum efficiency
[37] is not that straightforward since the introduced mapping to equilibrium
does not consider the housekeeping heat [38]. More general proposals for the
derivation of bounds on the efficiency of active heat engines, such as those
based on information theory [24], usually require some statistical knowledge
of the system dynamics, e.g., its stationary probability distribution, which
is much harder to obtain, already in the case of a single active particle [39]
than the simple average required for the calculation of $T_{\text{eff}}$
within the present model.

## Acknowledgements

V.H. acknowledges the support of Charles University through project
PRIMUS/22/SCI/009. K.K. acknowledges financial support from the Deutsche
Forschungsgemeinschaft for computational resources.

##  Appendix A Autocorrelations of the active noise term

The position variance $\sigma$ of the tracer particle can in principle be
computed from the noise autocorrelation function (ACF)
$\langle\bm{\eta}(t)\cdot\bm{\eta}(0)\rangle$ [4]. The corresponding formula
for the effective temperature is

$T_{\text{eff}}=\frac{1}{2\mu
k_{B}}\int_{0}^{\infty}\langle\bm{\eta}(t)\cdot\bm{\eta}(0)\rangle e^{-\mu
kt}\,\mathrm{d}t\,.$ (17)

Although of theoretical interest, this Green-Kubo type relation is most likely
not a practical tool for obtaining $T_{\rm eff}$ from experiments due to the
required high temporal resolution. (Instead of $\Delta
t=$2\text{\,}\mathrm{ms}$$, used in the rest of the paper, we utilized all
simulation data points generated with timestep
$dt=$20\text{\,}\mathrm{\SIUnitSymbolMicro s}$$ here.) In our simulations, we
sampled the noise ACFs at constant stiffness $k$ and temperature $T$ and
checked that the results were not visibly dependent on the trap stiffness, in
accord with the fact that the active bath does not feel the potential directly
but only via the probe. The $k$-dependence of the effective temperature thus
originates solely from the exponential term in Eq. (17).

To check the influence of the background thermal noise contribution on
$T_{\text{eff}}$, we evaluated the effective temperature both using the full
ACF and also the ACF of only the active component of the noise, $\mu\bm{F}$ in
Eq. (2). The results for $T_{\rm eff}$ are shown in Fig. 3 in the main text. A
few example ACFs are shown in Fig. 6. At high activity, they decay
approximately exponentially, as indicated by the dashed lines. The equilibrium
and low-activity ACFs instead exhibit a two-step decay and are better
approximated by a weighted sum of an exponential and a stretched exponential
(dash-dotted lines),

$c_{1}e^{-\sqrt{t/\tau_{1}}}+c_{2}e^{-t/\tau_{2}}\,,$ (18)

with two time scales differing roughly by two orders of magnitude,
$\tau_{2}/\tau_{1}\approx 10^{2}$ and
$\tau_{1}\approx${10}^{-2}\text{\,}\mathrm{s}$$. The same functional form of
the noise ACF has previously been observed in a similar system with a
different interaction potential [40].

Figure 6: Autocorrelation functions of the active component
$\bm{\eta}=\mu\bm{F}$ of the noise in Eq. (2). Dashed lines represent simple
exponential fits, and dash-dotted lines represent the weighted sum (18) of an
exponential and a stretched exponential with stretching exponent $1/2$. The
inset shows the weighting factor to determine $T_{\text{eff}}$ via Eq. (17),
an exponential decay with the probe’s relaxation time in the harmonic
potential with stiffness $k=k_{\min}$, which effectively cuts off the effect
of the stretched tails on $T_{\rm eff}$.

The relaxation time $1/{\mu k}$ of the probe’s average position in the trap is
orders of magnitude shorter than the decay of the noise ACFs, as shown in the
inset of Fig. 6 for $k=k_{\text{min}}$. This means that the $T_{\text{eff}}$
estimate via Eq. (17) is dominated by the autocorrelation at very short times.
The realm of Péclet numbers for which the ACF is exponential can also be used
to establish a mapping to the ABE, as an alternative model for the tracer in
an active bath. For exponentially correlated noise $\bm{\eta}$ in the ABE
model for $t>0$ (ignoring the $\delta$-peak at $t=0$ due to thermal noise),
the ABE parameters $v_{a}$ and $D_{r}$ can be determined by fitting
$C(t)=v_{a}^{2}e^{-D_{r}t}$ to the averaged steady-state ACFs at
$(k_{\max},v_{\min})$ and $(k_{\min},v_{\max})$, corresponding to the black
points in Fig. 4(a). This way, a time-dependence in $D_{r}$ is introduced,
similar to those for the temperature and the Péclet number in Fig. 2.

##  Appendix B Stochastic efficiency

The stochastic work and heat currents are defined analogously to their
averages in Sec. III, just the averaging over the noise is not imposed. The
definitions of stochastic work $w_{\text{out}}$, delivered by the system per
cycle, configurational input heat $q_{\text{in}}$ (without the kinetic energy
contribution), and ideal-recuperation input heat $q_{\rm in}^{\star}$ read

$\displaystyle w_{\text{out}}(t)$ $\displaystyle=$
$\displaystyle-\frac{1}{2}\int_{0}^{t}\dot{k}(t^{\prime})\bm{r}^{2}(t^{\prime})\,\mathrm{d}t^{\prime}\,,$
(19) $\displaystyle q_{\text{in}}(t)$ $\displaystyle=$
$\displaystyle\int_{0}^{t}k(t^{\prime})\bm{r}(t^{\prime})\cdot\dot{\bm{r}}(t^{\prime})\Theta(\dot{\sigma})\,\mathrm{d}t^{\prime}\,,$
(20) $\displaystyle q_{\text{in}}^{\star}(t)$ $\displaystyle=$
$\displaystyle\int_{0}^{t}k(t^{\prime})\bm{r}(t^{\prime})\cdot\dot{\bm{r}}(t^{\prime})\delta_{T_{\max},T(t)}\,\mathrm{d}t^{\prime}\,.$
(21)

In Fig. 7, averages $\eta_{s}=\langle w_{\rm out}/q_{\rm in}\rangle$ of the
stochastic efficiency are shown as functions of the sample size $N$, compared
to the proper thermodynamic efficiency $\eta=\langle w_{\rm
out}\rangle/\langle q_{\rm in}\rangle$. While $\eta$ converges rapidly after
about $N\approx 10^{2}$ cycles, $\eta_{s}$ never converges, due to the large
fluctuations of $q_{\text{in}}$ in the denominator, which can introduce huge
jumps at arbitrary $N$.

Figure 7:  Thermodynamic efficiency $\eta=\langle-w\rangle/\langle
q_{\text{in}}\rangle$ (solid lines) and the (ill-defined) average stochastic
efficiency $\eta_{s}=\langle-w/q_{\text{in}}\rangle$ (dashed lines) as
functions of the number of cycles used to evaluate the averages, for the
passive and two active realizations of the numerical model. While the
thermodynamic efficiency, defined as the ratio of averages, converges
relatively fast, the average of the stochastic ratio does not exist.

## References

  * Roßnagel  _et al._ [2014] J. Roßnagel, O. Abah, F. Schmidt-Kaler, K. Singer, and E. Lutz, Phys. Rev. Lett. 112, 030602 (2014).
  * Scully  _et al._ [2003] M. O. Scully, M. S. Zubairy, G. S. Agarwal, and H. Walther, Science 299, 862 (2003).
  * Krishnamurthy  _et al._ [2016] S. Krishnamurthy, S. Ghosh, D. Chatterji, R. Ganapathy, and A. K. Sood, Nat. Phys. 12, 1134–1138 (2016).
  * Holubec  _et al._ [2020] V. Holubec, S. Steffenoni, G. Falasco, and K. Kroy, Phys. Rev. Res. 2, 043262 (2020).
  * Holubec and Marathe [2020] V. Holubec and R. Marathe, Phys. Rev. E 102, 060101 (2020).
  * Martínez  _et al._ [2017] I. A. Martínez, É. Roldán, L. Dinis, and R. A. Rica, Soft Matter 13, 22–36 (2017).
  * Lee and Park [2022] J. S. Lee and H. Park, Phys. Rev. E 105, 024130 (2022).
  * Zakine  _et al._ [2017] R. Zakine, A. Solon, T. Gingrich, and F. Van Wijland, Entropy 19, 193 (2017).
  * Lee  _et al._ [2020] J. S. Lee, J.-M. Park, and H. Park, Phys. Rev. E 102, 032116 (2020).
  * Chang  _et al._ [2023] C.-H. Chang, C.-J. Chang, N.-J. Wu, Y. Jun, and C.-H. Chang, Phys. Rev. Res. 5, 043085 (2023).
  * Albay  _et al._ [2023] J. A. C. Albay, Z.-Y. Zhou, C.-H. Chang, H.-Y. Chen, J. S. Lee, C.-H. Chang, and Y. Jun, Phys. Rev. Res. 5, 033208 (2023).
  * Kwon  _et al._ [2024] T. Kwon, S. Kwon, and B. J. Sung, Soft Matter , (2024).
  * Gronchi and Puglisi [2021] G. Gronchi and A. Puglisi, Phys. Rev. E 103, 052134 (2021).
  * Wiese  _et al._ [2024] R. Wiese, K. Kroy, and V. Holubec, arXiv:2406.19794 [cond-mat.soft] (2024).
  * Leptos  _et al._ [2009] K. C. Leptos, J. S. Guasto, J. P. Gollub, A. I. Pesci, and R. E. Goldstein, Phys. Rev. Lett. 103 (2009).
  * Thiffeault [2015] J.-L. Thiffeault, Phys. Rev. E 92 (2015).
  * Lowe  _et al._ [1987] G. Lowe, M. Meister, and H. C. Berg, Nature 325, 637–640 (1987).
  * Tortora  _et al._ [2020] G. J. Tortora, B. R. Funke, C. L. Case, D. Weber, and W. B. Bair,  _Microbiology: An Introduction, 13th Global Edition_ (Pearson, 2020).
  * Sekimoto [2010] K. Sekimoto,  _Stochastic Energetics_ (Springer Berlin Heidelberg, 2010).
  * Seifert [2012] U. Seifert, Rep. Prog. Phys. 75, 126001 (2012).
  * Dechant  _et al._ [2017] A. Dechant, N. Kiesel, and E. Lutz, Europhys. Lett. 119, 50003 (2017).
  * Malgaretti  _et al._ [2021] P. Malgaretti, P. Nowakowski, and H. Stark, Europhys. Lett. 134, 20002 (2021).
  * Ekeh  _et al._ [2020] T. Ekeh, M. E. Cates, and É. Fodor, Phys. Rev. E 102, 010101 (2020).
  * Datta  _et al._ [2022] A. Datta, P. Pietzonka, and A. C. Barato, Phys. Rev. X 12 (2022).
  * Blickle and Bechinger [2011] V. Blickle and C. Bechinger, Nat. Phys. 8, 143–146 (2011).
  * Proesmans  _et al._ [2015] K. Proesmans, B. Cleuren, and C. Van den Broeck, Europhys. Lett. 109, 20004 (2015).
  * Verley  _et al._ [2014a] G. Verley, M. Esposito, T. Willaert, and C. Van den Broeck, Nat. Commun. 5 (2014a).
  * Martínez  _et al._ [2015] I. A. Martínez, E. Roldán, L. Dinis, D. Petrov, J. M. R. Parrondo, and R. A. Rica, Nat. Phys. 12, 67–70 (2015).
  * Verley  _et al._ [2014b] G. Verley, T. Willaert, C. Van den Broeck, and M. Esposito, Phys. Rev. E 90 (2014b).
  * Gingrich  _et al._ [2014] T. R. Gingrich, G. M. Rotskoff, S. Vaikuntanathan, and P. L. Geissler, New J. Phys. 16, 102003 (2014).
  * Polettini  _et al._ [2015] M. Polettini, G. Verley, and M. Esposito, Phys. Rev. Lett. 114 (2015).
  * Callen [1985] H. B. Callen,  _Thermodynamics and an Introduction to Thermostatistics_ (John Wiley & Sons, 1985).
  * Baldovin  _et al._ [2017] M. Baldovin, A. Puglisi, A. Sarracino, and A. Vulpiani, J. Stat. Mech. 2017, 113202 (2017).
  * Caprini  _et al._ [2022] L. Caprini, A. R. Sprenger, H. Löwen, and R. Wittmann, J. Chem. Phys. 156, 071102 (2022).
  * Krishnamurthy  _et al._ [2023] S. Krishnamurthy, R. Ganapathy, and A. K. Sood, Nat. Commun. 14, 6842 (2023).
  * Ibáñez  _et al._ [2024] M. Ibáñez, C. Dieball, A. Lasanta, A. Godec, and R. A. Rica, Nat. Phys. 20, 135–141 (2024).
  * Ye  _et al._ [2022] Z. Ye, F. Cerisola, P. Abiuso, J. Anders, M. Perarnau-Llobet, and V. Holubec, Phys. Rev. Res. 4, 043130 (2022).
  * Fodor [2024] É. Fodor, Europhys. News 55, 20–23 (2024).
  * Caraglio and Franosch [2022] M. Caraglio and T. Franosch, Phys. Rev. Lett. 129, 158001 (2022).
  * Jayaram and Speck [2023] A. Jayaram and T. Speck, Europhys. Lett. 143, 17005 (2023).