Autonomous engines driven by active matter: Energetics and design principles

Due to its non-equilibrium character, active matter in a steady state can drive engines that autonomously deliver work against a constant mechanical force or torque. As a generic model for such an engine, we consider systems that contain one or several active components and a single passive one that is asymmetric in its geometrical shape or its interactions. Generally, one expects that such an asymmetry leads to a persistent, directed current in the passive component, which can be used for the extraction of work. We validate this expectation for a minimal model consisting of an active and a passive particle on a one-dimensional lattice. It leads us to identify thermodynamically consistent measures for the efficiency of the conversion of isotropic activity to directed work. For systems with continuous degrees of freedom, work cannot be extracted using a one-dimensional geometry under quite general conditions. In contrast, we put forward two-dimensional shapes of a movable passive obstacle that are best suited for the extraction of work, which we compare with analytical results for an idealised work-extraction mechanism. For a setting with many noninteracting active particles, we use a mean-field approach to calculate the power and the efficiency, which we validate by simulations. Surprisingly, this approach reveals that the interaction with the passive obstacle can mediate cooperativity between otherwise non-interacting active particles, which enhances the extracted power per active particle significantly.


I. INTRODUCTION
The concept of thermal equilibrium allows for a comprehensive characterization of passive many-body systems in terms of thermodynamic key quantities such as entropy and temperature. Through the second law of thermodynamics, changes in these quantities constrain the amount of work an external operator can extract when forcing the system to undergo a transformation [1]. In contrast, active matter offers a class of systems that goes beyond the scope of these well-established concepts. Such systems typically comprise an assembly of self-driven components which operate far from thermal equilibrium by extracting energy from their environment [2][3][4][5][6]. Experimental realizations range from swarms of bacteria [7][8][9] and assemblies of motile filaments [10,11] and of living cells [12,13] to interacting Janus particles in a fuel bath [14][15][16]. Phenomenological properties of active matter, such as the emergence of clustering [17,18], have been reproduced with simple mathematical models, which can be either particle-based descriptions [19][20][21] or active field theories [22][23][24][25].
Historically, key quantities of equilibrium thermodynamics had been identified operationally through the interaction of the system with embedded probes such as barometers and thermometers. For a thermodynamic characterization of active matter, several works have followed this strategy. Extended definitions of pressure [26][27][28][29][30] and of chemical potential [31,32] have been proposed in active matter; moreover, a frequency-dependent temperature has been introduced based on the violation of equilibrium relations [33][34][35][36][37][38].
An important quest in the development of classical thermodynamics was the formulation of fundamental design principles for heat engines, which led to Carnot's statement of the second law of thermodynamics [39]. For systems on small scales, which are affected by ubiquitous thermal noise, stochastic energetics [40] and stochastic thermodynamics [41] provide a consistent framework for the generalization of thermodynamic concepts, such as the work that is either transferred to or extracted from a nonequilibrium system.
Inspired by colloidal heat engines in a thermal bath [42][43][44], the work delivered by cyclic engines in contact with active baths has recently been investigated both experimentally [45] and theoretically [46,47]. Such cyclic engines require an external operator applying transformations according to some time-periodic protocol. An even simpler setting for nonequilibrium systems that deliver work autonomously builds on ratchet models [48,49]. They produce a persistent current in one degree of freedom (d.o.f.) by rectifying fluctuations with some asymmetric potential. In recent years, such ratchet models have been used to illustrate nonequilibrium aspects of active matter [5,[50][51][52][53][54][55][56][57][58][59][60][61]. Particularly inspiring are experiments where asymmetric cog-shaped obstacles immersed in a bacterial bath autonomously undergo persistent rotation [62][63][64]an observation that would be prohibited in an equilibrium system due to time-reversal symmetry. By applying a sufficiently small countertorque to the rotor, its rotation can be exploited for the extraction of mechanical work, as illustrated in Fig. 1.
Despite the increasing development of such experiments, it remains to evaluate and to rationalize the efficiency of such autonomous engines, which should properly compare the extracted work with the dissipated heat. In that respect, several studies strive to identify and to quantify dissipation in simple models of active particles [65][66][67][68][69], in relation with entropy production and the irreversibility of the dynamics [70][71][72][73]. These recent advances motivate a systematic study of the performances of engines that extract work from an active bath. What is the best shape of obstacles for delivering optimal performance as an engine? How does one tune the properties of the bath to extract maximum work? Answering such questions promises to reveal new links between macroscopic observables and the nonequilibrium character of active matter.
In this paper, we propose a consistent thermodynamic framework for engines delivering work while being powered by active matter. En route, we relate the extracted power to the energetics of the self-propulsion of active particles. In defining the efficiency of the work extraction, we distinguish between a fully detailed, microscopic viewpoint and a more practical, coarse-grained viewpoint. The relevant thermodynamic quantities can be identified in a simple lattice model as well as in a general Langevin description of active Brownian particles in continuous space.
We consider specific realizations of models for one or several active particles interacting with a passive asymmetric obstacle that can move in one linear direction against an external force. In each of these models, we evaluate the power and efficiency of work extraction. In a twodimensional setting, the optimization of these quantities leads to nontrivial shapes of passive obstacles, which perform significantly better than a simple chevron shape that has so far been a popular model for ratchet effects in active matter [50][51][52][53][54]56,57,60]. For the case of many noninteracting active particles, we devise a dynamical mean-field approach. It reveals, somewhat surprisingly, that the extracted power per active particle is larger for many active particles than for a single active particle. Numerical simulations of the full many-body dynamics confirm these theoretical predictions.
The paper is organized as follows. In Sec. II, we begin with a simple lattice model and set up definitions concerning the energetics, which are illustrated on the basis of exact results. Section III introduces the energetics for a general Langevin description of active particles interacting with each other and with a passive obstacle. Moreover, we derive a no-go theorem, which excludes the possibility to extract work for an overly simple class of obstacles. In Sec. IV, we calculate the power and efficiency for a single active particle and discuss design principles for the shape of a passive obstacle. Section V generalizes to many noninteracting active particles, introducing our dynamic mean-field theory, which is validated using numerical simulations. We conclude in Sec. VI.

A. Setup
Lattice models have repeatedly been used as minimal models for the analysis of various aspects of active matter [66,[74][75][76][77]. For our purpose of studying the extraction of work, we consider a one-dimensional lattice with L sites, periodic boundary conditions, and one active and one passive particle, as shown in Fig. 2(a). Both particles can hop to unoccupied neighboring lattice sites. The positions of the particles at time t are denoted as i a ðtÞ and i p ðtÞ for the active and passive particle, respectively. We define the signed distance between the two particles as iðtÞ ≡ ½i a ðtÞ − i p ðtÞ mod L; FIG. 1. Schematic representation of an autonomous engine driven by active matter. An asymmetric cog-shaped passive obstacle (gray) rotates persistently in contact with a bath of active particles (dark blue). Applying an external load opposed to the spontaneous rotation, for instance, by connecting the rotation axis to an external weight, the system produces work by lifting the weight. Besides, both the obstacle and the active particles are in contact with a thermostat at fixed temperature T, so that heat is constantly dissipated in the energy reservoir (light blue).
where the modulo operation is due to the periodic boundaries and is applied such that 1 ≤ iðtÞ < L. The free active particle is modeled as a run-and-tumble particle that has an internal d.o.f. nðtÞ that switches stochastically between þ1 and −1 at a Markovian rate γ. The inverse of this rate 1=γ quantifies the persistence time of the active particle. According to the state of the variable n, the particle hops preferentially to the right or to the left, as detailed below. The free passive particle has hopping rates that are biased in the direction of the applied external force. In order to obtain a persistent, directed current even in the absence of the external force, the left-right symmetry of the system needs to be broken. In the setting we ultimately have in mind, this symmetry breaking would be achieved by giving the passive particle some asymmetric shape, which, however, is not possible in one dimension. As a simple way to still break the symmetry while preserving the dynamics of the free particles, we introduce, in addition to the hard-core exclusion of the particles, an asymmetric short-range interaction potential for 1 ≤ i < L, as shown in Fig. 2(b). Thus, the passive particle attracts the active one, if the latter is one lattice site to the right. Conversely, the passive particle repels the active one, if the latter is one lattice site to the left. This local interaction mimics the effect that some notch in the shape of the passive obstacle would have, which traps the active particle on one side but not on the other one. The dynamics of the system is modeled as a continuoustime Markov process. For the identification of physical heat, we require this process to be thermodynamically consistent, which constrains the transition rates depending on the driving forces and the potential [41]. The passive particle hops to the right or left at rates w þ i and w − i , respectively, which depend on the distance iðtÞ. In contact with a heat bath at a constant temperature, these rates are constrained by the local detailed balance condition with the external force f ex acting on the passive particle in the negative direction. In this section, we set the lattice spacing, the temperature, and Boltzmann's constant to one. The local detailed balance condition is satisfied by setting for all transitions that do not lead to an overlap of the particles. The prefactor w 0 is a rate of reference that is not constrained by thermodynamics, determining the diffusivity of the passive particle. The hard-core exclusion is accounted for by setting all rates involving the state i ¼ 0 (or, equivalently, i ¼ L þ 1) to zero. The active particle is endowed with a self-propulsion mechanism that allows for chemically driven translational transitions biased toward the direction given by the internal d.o.f. nðtÞ. Nonetheless, the transitions can also be induced by the passive influence of thermal noise and potential forces. A minimal thermodynamically consistent model accounts for both types of transition [66]. It ascribes to the thermal transitions of the active particle the transition rates with a rate of reference k 0;th . The chemically driven transitions occur at rates with another rate of reference k 0;ch and the chemical free energy Δμ that is transduced in a transition parallel to the preferred (active) jump direction n. On a mesoscopic scale, where information on the microscopic chemical process is not accessible, the two types of transition cannot be distinguished, leading to the combined rates Setup for the lattice model of an active particle (blue) interacting with a passive one (gray) in a periodic geometry. (b) The particles interact via on-site exclusion and via an asymmetric potential ranging to the next lattice site. (c) Sample trajectories for the passive particle (black line) and the active particle (green or red line, depending on the internal d.o.f.). The active particle first pushes the passive one from behind, until its internal d.o.f. changes direction at t ≃ 120. Then, after circuiting once around the ring, it hits the passive particle on the attractive other side and sticks to it for the remainder of the shown time interval. Parameters: In Eq. (6b), we have brought these combined rates to the form of a local detailed balance relation, with an effective, "active" force and k 0 ≡ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi k 2 0;th þ k 2 0;ch þ 2k 0;th k 0;ch coshðΔμ=2Þ Even though the active force does not enter the microscopic rates (4), it emerges as a useful quantity for a dynamical, mesoscopic description of the active particle as being pulled by a fictitious external force f ac acting in the direction of nðtÞ. Unlike the microscopic parameter Δμ, the active force can be inferred on a mesoscopic scale, for example, through the force that is required to stall an active particle with persistently positive n. This property allows us to define the active force independently of the microscopic dynamics, which would typically be much more complex than what is captured by the minimal model used here.
In the state space spanned by the variables ði p ; i a ; nÞ, the transition rates (3), (6), and γ give rise to a stochastic dynamics, that is illustrated in Fig. 2(c) with a sample trajectory. The corresponding master equation leads to a stationary probability distribution pði p ; i a ; nÞ. Because of the translational symmetry of the total system, this distribution can be written as where pði; nÞ is the stationary distribution on the state space spanned by n and the relative coordinate (1). Combining the transition rates that increase and decrease i, we find for this distribution the reduced stationary master equation For finite L, this system of equations with 2ðL − 1Þ unknowns can be solved using linear algebra.

B. Energetics
With the steady-state distribution pði; nÞ at hand, the total particle current J, or average velocity of the particles, is given by Since the particles cannot pass through each other, the average velocities of the passive and the active particle must be the same, which leads to the second equality. The extracted power is the rate of work performed against the force f ex : This power is positive when the external force acts in the direction opposite to the current, while P ex < 0 means that work is performed on the system. To extract positive work, the external force must be nonzero and opposite to the direction of the current at zero force, and its absolute value must be smaller than the stall force f stall at which the current vanishes. The input of chemical work into the total system stems from the chemically powered, active transitions of the active particle On the other hand, the total rate of entropy production follows from its standard definition [78] as Thus, the chemical power P ch ¼ P ex þ σ tot is transferred to both extracted power P ex and dissipated power σ tot [79]. The latter is essentially the heat that is dissipated into the environment but may also include the change of entropy in chemical reservoirs [80]. The thermodynamic efficiency associated with the extraction of work can be defined as On the mesoscopic scale, where active and passive transitions of the active particle are typically indistinguishable, an exact evaluation of σ tot based on observations is not possible. Hence, a coarse-grained thermodynamic approach is necessary to evaluate the performance of the engine. Applying the concepts of stochastic thermodynamics to the coarse-grained model involving the combined transition rates k AE i;n yields the coarse-grained entropy production rate This rate of entropy production is also obtained by comparing the forward and time-reversed path probabilities for i p and i a without taking into account the types of transition for i a . We identify the "active power" as the rate of work performed by the fictitious active force f ac . Since the coarse-grained entropy production satisfies 0 ≤ Σ ≤ σ tot , we find Hence, the active power gives a stronger bound on the extracted power than the full chemical power. Since this inequality shows that the difference between P ch and P ac is inevitably dissipated into the environment, we ask in the following how much of P ac can be extracted as useful work P ex and define the "active efficiency" The identification of P ex and P ac and their relation to P ch constitute the first main result of this paper. Importantly, the former two are accessible on a mesoscopic scale and, thus, retain their significance beyond our specific minimal model for the chemical driving process, as shown below for a description with continuous d.o.f. Consequently, we use P ex and η as the main quantities of interest to characterize the performance of an engine. We now explore the dependence of the power and efficiency of work extraction on the various parameters of the lattice model. For this purpose, the stationary master equation (10) is solved numerically. As the main parameter of interest, we choose the interaction strength ε, which represents a measure for the asymmetry of the passive work-extraction mechanism and which is dimensionless in our units with k B T ¼ 1. For each combination of parameters shown in Fig. 3, we optimize the extracted power with respect to the external force f ex and the passive diffusivity w 0 , leading to optimal parameters f Ã ex and w Ã 0 . Evaluating η at these parameters gives the active efficiency at maximum output power η Ã . In addition, we calculate the global maximum of the efficiency η max over all values of f ex and w 0 , which turns out to be only slightly larger than η Ã .
In the Appendix A, we present analytical calculations for various limiting cases of the model. In particular, we find that, in the high persistence regime for γ ≪ w 0 , k 0 , the power and efficiency of work extraction generally become highest. The corresponding curves in Fig. 3 saturate in the limit γ → 0. In contrast to that, the regime where the orientation of the active particle switches very quickly resembles an equilibrium system, where work cannot be extracted. Finally, another analytically tractable limiting case is the one where the interaction is strong, ε → ∞. By adjusting the active and external forces, the active efficiency can get arbitrarily close to one, showing that there is no universal upper bound on the efficiency smaller than the trivial bound η ≤ 1.

A. Setting and energetics
In a general context, we consider a set of N active particles in a two-or three-dimensional channel or box with periodic boundary conditions. These particles interact with each other and with a passive object serving as the work extractor. The interactions are mediated by pair potentials, and, for simplicity, we neglect hydrodynamic interactions. The passive object, in the following referred to as the "obstacle," has a fixed shape and is constrained to move along a single d.o.f. against an external force. The parameters of the active particle, k 0 ¼ 1, f ac ¼ 1, and selected values of γ are kept fixed, while the extracted power P ex is optimized with respect to w 0 and f ex . The limit of small tumbling rate γ → 0 (orange) is evaluated using the effective potential (A1). Bottom: The active efficiency η Ã at maximum power (solid lines) and the maximal active efficiency η max (dotted lines) optimized again with respect to w 0 and f ex .
For notational simplicity, we take this d.o.f. to be the translational one associated with the direction e x and keep the orientation of the particle fixed. Thus, while the active particles are a priori free to move and rotate in any direction, we keep the obstacle effectively fixed to a one-dimensional "railway line." The formulation of the model for a rotating obstacle at a fixed position and subject to an external torque, as illustrated in Fig. 1, would be analogous.
We denote the positions of the active particles as r i a , with i labeling the particle index, and the position of the passive obstacle as r p . The dynamics of the latter is modeled through the overdamped Langevin equation Here, μ p is the mobility of the passive obstacle (in the e x direction), f ex is the external force applied in the negative e x direction, and VðrÞ is the interaction pair potential between the obstacle and each of the active particles, with ∇ acting on the distance vector The active particles are chemically driven in the direction of their internal orientation vectors n i . Their positions evolve according to the overdamped Langevin equation with an active velocity u ac and the potential force Here, UðrÞ is the pair potential for interactions between active particles, with ∇ acting on the distance vector r ¼ r i a − r j a . We consider two microscopic origins of the noise term, which we decompose as ζ i a ¼ ζ i th þ ζ i ch n i . As described in Ref. [66], these two terms arise in the continuum limit of a lattice model analogous to the one in Sec. II. First, the thermally induced translational Brownian motion of the active particle is modeled with an isotropic noise term ζ i th with correlations hζ i th ðtÞ ⊗ ζ j th ðt 0 Þi ¼ 2D th δðt − t 0 Þδ ij 1. Second, the noise in the chemical reaction couples to the driven motion of the particle in the direction n i , which is reflected in the one-component noise term ζ i ch with correlations hζ i ch ðtÞζ j ch ðt 0 Þi ¼ 2D ch δðt − t 0 Þδ ij . The fluctuation-dissipation theorem requires the mobility tensor to have two components μ i a ¼ μ th 1 þ μ ch n i ⊗ n i , according to the diffusion coefficients D th ¼ μ th k B T and D ch ¼ μ ch k B T. The thermal mobility μ th is given by the inverse of the Stokes friction of the particle in the surrounding fluid.
The chemical mobility μ ch depends on the details of the selfpropulsion mechanism. For example, the continuum limit of the discrete microscopic model discussed in Sec. II yields μ ch ¼ u ac d=Δμ for a small driving affinity Δμ ≪ k B T of a reaction event that comes with the displacement d.
The vectors n i perform isotropic rotational Brownian motion on the unit circle or unit sphere with rotational diffusion coefficient D r . We take this rotational diffusion to be independent of the position of the particles; i.e., we assume that there are no alignment interactions among active particles or between active particles and the obstacle. This aspect of the model has been validated experimentally for at least one class of autophoretic Janus colloids, whose orientation is indeed left unaffected upon contact with an obstacle [81]. However, for rod-shaped active particles or pusher-or puller-type microswimmers, steric or hydrodynamic alignment interactions are present [63,82] and need to be included in a more complex dynamics for n i . Moreover, we note that active Ornstein-Uhlenbeck particles [70] can formally be implemented in the present formalism by allowing the length of n i to fluctuate as well, such that n i performs an Ornstein-Uhlenbeck process. Finally, a setting with fixed obstacle positions, commonly considered as active ratchets [5,[50][51][52][53][54][55][56][57][58][59][60][61], can also be used to extract mechanical work by applying the external force directly to the active particles rather than to a passive tracer. Our discussion of the thermodynamics and the design principles below can straightforwardly be extended to this case through a change of the reference frame.
The dynamics described by the Langevin equations leads to a stationary distribution pðfr i a g; fn i g; r p Þ. The mean velocity of the obstacle can be expressed as an average with respect to this distribution as which leads to the extracted power P ex ¼ f ex J. The rate of total thermodynamic entropy production in the steady state follows through the same steps as in Ref. [66] as with the chemical power Equation (24) is analogous to Eq. (14) for the discrete model, where T is set to 1. On a mesoscopic scale, only the dynamics of r p , r i a , and n i can be observed, while the two sources of the noise become indistinguishable. While this fact prohibits an exact evaluation of the chemical power, we can, as before for the lattice model, identify an active power as a coarse-grained quantification of the input of energy. It can be defined model independently as the rate of work that is performed by an effective active force apparently providing propulsion in the direction of n i [70,[83][84][85].
Such an active force is commonly used ad hoc in theoretical models for active particles that discard the details of the self-propulsion mechanism [19,20,[86][87][88][89]. It can be determined phenomenologically as the force required to stall an active particle with persistent director n. Experimentally, the active force can also be measured for a single free active particle that undergoes rotational and translational diffusion. For this purpose, one applies an external force and evaluates the velocity of the active particle at times when the director n is antiparallel to the external force. When this velocity reaches zero on average, the absolute value of the external force matches that of the active force. For the specific model at hand, we have f ac ≡ u ac =ðμ th þ μ ch Þ, and the active power can be written using Eq. (21) as The difference between the effective input P ac and the actual output power P ex leads to the definition of the coarse-grained entropy production Σ ≡ ðP ac − P ex Þ=T. Several recent works quantify irreversibility in active matter in terms of the ratio of forward and backward path probabilities [65,[69][70][71][72][73]. The same entropy production Σ emerges in such a framework by applying the standard principles of stochastic thermodynamics to the joint trajectory of fr i a g, fn i g, and r p and considering both fn i g and f ex as even under time reversal. Other choices for the set of variables and time reversal are conceivable and have indeed been explored as characterizations for the irreversibility, yet only this choice yields the connection to the active power P ac that is useful in the context of work extraction. The ensuing entropy production Σ is positive and, as a result of the coarse-graining procedure, smaller than the full entropy production σ tot , yielding again the order (18) for the chemical, active, and extracted power.
In the following, we assume that the chemical contribution to the mobility μ ch is much smaller than the thermal contribution μ th . This assumption is justified from a microscopic perspective, if the displacement d of the active particle associated with an individual reaction event is sufficiently small, such that, for external or potential forces f that lead to velocities μ th f of the order of u ac , we have μ ch =μ th ∼ fd=Δμ ≪ 1 (see also Ref. [68]). In fact, μ ch might even be on the order of magnitude of a slight geometric anisotropy of the thermal mobility tensor itself, prohibiting the inference of μ ch on a mesoscopic scale. Under the assumption of small μ ch , the chemical power (25) is much larger than the active power (26). Since the latter bounds the extracted power P ex from above, the thermodynamic efficiency η td ¼ P ex =P ch is small. With the dominating first term in Eq. (25) being constant, maximizing P ex for fixed u ac and μ ch leads also to maximal η td .
Alternatively, we consider analogously to Eq. (19) the active efficiency η ¼ P ex =P ac as a mesoscopically accessible characterization of the performance of a work extractor after subtracting the inevitable chemical losses. For the remainder of the paper, we focus on the model of active particles with an isotropic mobility tensor μ a ¼ μ a 1 and diffusion coefficient D a ¼ μ a k B T, which reproduces the dynamics of the model considered above up to corrections of the order of μ ch =μ th . The active force is then simply given by f ac ¼ u ac =μ a , where both the speed u ac and the mobility μ a are straightforward to determine experimentally. This "active Brownian particle" model, which discards the chemical noise in the self-propelled motion but keeps thermal diffusive noise in both the translational and angular sectors, is standard in the literature, as reviewed, e.g., in Ref. [5].

B. A no-go theorem
We first consider a single passive particle, serving as an obstacle, and a single active particle along a onedimensional continuous coordinate. The active particle has a director n that jumps between AE1 at a positionindependent rate γ. The Langevin equations (20) and (21) then reduce to for the respective positions x a and x p of the active and passive particles on a ring with x a , x p ∈ ½0; 1Þ with periodic boundary conditions and with independent onedimensional noise terms ζ a;p . The interaction potential VðxÞ is a function of the relative coordinate x ¼ x a − x p (with the prime denoting the derivative with respect to x), which consists of a hard-core exclusion and an additional, asymmetric interaction. Despite the similarity to the lattice model considered in Sec. II, it is not possible to produce a persistent current against the external force for any potential VðxÞ, as we now show. Because of the hard-core exclusion, the mean velocities of the active and the passive particle are both equal to the overall current J ¼ h_ x a i ¼ h_ x p i. By rescaling the Langevin equations (28b) and (28a) with the respective mobilities and adding them up, the potential term drops out, and we end up with because the averages of ζ a , ζ p , and n are zero. Thus, the current J is always in the same direction as the external force, such that work cannot be extracted. Notably, for f ex ¼ 0, there is no persistent current J. This result is fairly remarkable, since, according to Pierre Curie's principle [40,90], the asymmetry of the potential and the nonequilibrium driving would generally be sufficient conditions for the emergence of a persistent current.
This result can be generalized to a setting with N interacting active Brownian particles and one passive obstacle described by the Langevin equations (21) and (20) in two or three dimensions with an isotropic mobility tensor μ a ¼ μ a 1. The resulting mean velocities of the active particles J a ≡ h_ x i a i and of the obstacle J p ≡ h_ x p i satisfy NJ a =μ a þ J p =μ p ¼ −f ex . If VðrÞ is an exclusion potential that stretches over the whole cross section of the channel or box, such that the active particles cannot overtake the obstacle, we have again J ¼ J p ¼ J a , prohibiting a positive output power.
Nonetheless, a nonzero current J p at zero external force, and thus positive extracted power under a sufficiently small counterforce, is achievable in several ways. First, one can choose the potential VðrÞ in a way that active particles can pass by or through the obstacle, such that the currents J a and J p are no longer constrained to be equal. Second, one can add in Eqs. (28a) and (28b) an external potential that depends explicitly on the absolute coordinates of the particles, thus breaking the translational invariance of the system as a whole. For instance, a periodic potential with well-separated minima mimics the discrete lattice analyzed above, showing that the lack of a continuous translational invariance is ultimately the reason why discrete models evade the no-go theorem. Third, one can introduce an anisotropy in the rotational motion or a coupling or feedback between the rotational and translational motion. Notably, this possibility easily allows for a lossless conversion of the active power into extracted power by fully polarizing the active particles and tightly coupling them to the obstacle. Fourth, an anisotropic mobility tensor μ a , for example, due to a non-negligible μ ch , can also lead to a nonvanishing current against the external force.
In the following, we focus on the first possibility and consider a hard-core interaction between the active particles and the obstacle that does not cover the whole channel, such that active particles can pass by the obstacle.

A. General formalism
In preparation for the many-particle case, we now study the extraction of work in a two-dimensional setting with a single active particle that interacts with an obstacle. Because of the periodic boundary conditions, this setting is equivalent to an active particle interacting with a periodic array of obstacles. For the case of spatially fixed obstacles, experimental [81] and theoretical [59,91] work has revealed a rich dynamics.
As a general consideration, we notice that, for an efficient extraction of work, the size L of the obstacle must be smaller than or at most comparable to the persistence length l ≡ u ac =D r of the active particle. Otherwise, unless the interaction with the obstacle affects the orientation of the active particles (not true here with our chosen potential interaction), the active particle behaves just like a passive Brownian particle in its interaction with the obstacle, which cannot produce any current. Likewise, the box length, i.e., the distance between repeated instances of the obstacle, should not exceed the persistence length. In reduced units, where the length scale of the obstacle and u ac are kept fixed, the regime of high persistence corresponds to small D r , which we focus on in the following. In analogy to the dependence of the one-dimensional system on the switching rate γ, we expect both the power and the efficiency of the work extraction to decrease with increasing D r .
The timescale separation that ensues for small D r facilitates the computation of the relevant currents. In two dimensions, we first keep the vector n ¼ ðcos θ; sin θÞ T fixed and determine the mean velocities of the active particle and the obstacle as a function of the angle θ. Next, we account for the slow, autonomous rotational diffusion of the active particle by averaging these currents over θ with a uniform distribution.
We consider again the relative coordinate r ≡ r a − r p , for which the Langevin equation follows from Eqs. (20) and (21) as It is solved with the same periodic boundary conditions as for the absolute coordinates. The drift terms of the active particle and the obstacle are combined to v 0 ðθÞ ≡ u ac n þ μ p f ex e x : The steady-state solution of the Langevin equation (30) leads to a mean velocity where the index θ indicates the ensemble average of trajectories with fixed n. This relation allows one to express the components of the average interaction force between the particles in terms of the components of their relative velocity: This average interaction force then yields expressions for the average absolute velocities: of the individual particles. Averaging with a uniform distribution over θ then leads to the mean velocity of the obstacle (23): and the extracted power P ex ¼ f ex J. The active power (27) is given by which is used as a reference for the active efficiency η ¼ P ex =P ac . Crucially, the geometric shape of the interaction potential enters into these expressions for the conversion of power only via the two functions v x;y ðθÞ for the relative velocity determined by the Langevin equation (30).

B. Idealized velocity filter
With the above results at hand, we can now discuss possible shapes of the function v x;y ðθÞ to compare different mechanisms that extract work through the interaction of the translational d.o.f. of the active particles and the obstacle. To generate a large positive current J, the integral of v x ðθÞ in Eq. (36) should be negative with a large absolute value. Without any interaction, the relative velocity in the x direction is given by v 0 x ðθÞ ¼ u ac cos θ þ μ p f ex , leading consistently to J ¼ −μ p f ex . Broadly speaking, a welldesigned mechanism for the extraction of work should have two crucial properties: On the one hand, when θ is such that v 0 x ðθÞ > 0, the activity of the active particle is harnessed, for example, by trapping it in some notch of the obstacle and thereby reducing the relative velocity to vðθÞ ¼ 0. On the other hand, when v 0 x ðθÞ < 0, the active particle should interact with the obstacle as little as possible. If they do not interact at all, the resulting relative velocity remains vðθÞ ¼ v 0 ðθÞ.
Without yet considering realizations of the interaction potential that yield these properties, we can discuss the effect of an idealized velocity filter that is accordingly modeled by vðθÞ ¼ v 0 ðθÞχðθÞ. The function χðθÞ is set to one for θ c < θ < 2π − θ c , when the active particle is free, and zero otherwise, when the particle is trapped. The critical angle for which v x ðθÞ ¼ 0 is given by θ c ≡ arccosð−μ p f ex =u ac Þ. We assume that the external force is not exceedingly large, such that jμ p f ex j ≤ u ac still holds-otherwise, the active particle would be either trapped or free independently of θ, prohibiting a positive output power. Plugging the model function for v x ðθÞ into Eq. (36) yields the resulting current J. It can conveniently be written as with the average interaction force exerted by the active particle The dimensionless parameter compares the velocity of the free obstacle to the active speed. The active power (37) follows as From Eqs. (38) and (41), we finally obtain the expressions for the extracted power and active efficiency of the idealized velocity filter, based only on general geometric arguments.

C. Design principles
With the idealized velocity filter as a benchmark, we now consider specific realizations of the interaction potential. The optimization of the power and efficiency amounts to finding good designs for isothermal engines driven by active matter. This task is related to, but quite distinct from, the work of Ref. [92], which studies design principles for ratchets driven by passive particles at two different temperatures.
In order to keep the setting simple, we focus on hard-core interactions and set the noise terms in the Langevin equation (30) to zero, pertaining to a regime where the timescale L=jv 0 j of the drift process is fast compared to the diffusion on the longer timescale L 2 =D a;p . Ensemble averages of the type h·i θ then reduce to an average over a single periodic trajectory. These trajectories can be calculated in a simple numerical scheme, where the hard-core interaction is realized through constraint forces, as detailed in Appendix B. For a zero external force, as explored in Fig. 4, the idealized velocity filter leads to v x ðθÞ ¼ u ac cos θ for 90°< θ < 270°and v x ðθÞ ¼ 0 otherwise. In Fig. 4(a), we compare this function to the numerical results for v x ðθÞ for two selected geometries of the obstacle [93].
A shape of obstacles that is often used to illustrate nonequilibrium aspects of active matter is a simple V shape or "chevron" [50][51][52][53][54]56,57,60]. We model this type of obstacle as two straight lines with a fixed opening angle and a hard-core exclusion for the active particles. Figure 4(b) shows this shape along with selected trajectories of the relative coordinate r. The symmetry of this setting allows us to restrict the discussion to angles 0 ≤ θ ≤ 180°. The chevron of the chosen geometry is indeed capable of entrapping the active particles for positive relative velocity v 0 x ðθÞ and letting it pass otherwise. Nonetheless, the resulting function v x ðθÞ differs from the one for the idealized velocity filter in two obvious ways. First, for angles below but close to 90°(e.g., θ ¼ 75°), the active particle cannot be trapped; instead, it repeatedly slides along the outer side of the arms of the chevron. Accordingly, for the chosen geometry, the function v x ðθÞ is positive for 70°≲ θ < 90°. Second, for angles larger than 90°, the interaction between the active particle and the obstacle reduces the absolute value of their relative velocity. Notably, for 90°< θ ≲ 110°, the repeated interaction due to the periodic boundary conditions leads to vanishing v x ðθÞ. In total, the function v x ðθÞ for the chevron-shaped obstacle is for all angles θ larger than or equal to the one for the idealized velocity filter. Accordingly, the resulting current J in Eq. (36) becomes reduced compared to Eq. (38), for the chosen geometry and parameters of Fig. 4, to approximately 72% of the filter value.
In principle, the output current for a chevronlike particle can be maximized using a delicate limiting procedure. First, the opening angle of the arms of the chevrons must be decreased to almost zero, such that the active particle can be trapped for all angles θ < 90°. Second, the overall size of the chevron must be decreased, such that the interaction between the active particle and the obstacle for all other angles is decreased. In this limit, the function v x ðθÞ and the current J approach the values for the ideal velocity filter. However, the small size of the chevron and its opening lead to further limitations. When the condition L 2 =D a;p ≫ L=jv 0 j is no longer met, translational noise becomes relevant, such that the active particle can be trapped only transiently. Indeed, the small cross section of the obstacle increases the time until the particle is trapped again, and this time may even be comparable to the timescale set by the rotational diffusion. It is therefore essential to first let the observation time tend to infinity, then let the thermal noise and the rotational diffusion coefficient tend to zero, and at the very last let the size and the opening angle of the chevron vanish. It should be noted that, in this limit, increasing the number of obstacles per unit area does not increase the extracted power: All instances of the active particle with v 0 x ðθÞ > 0 are ultimately trapped even in a scarce array of obstacles, whereas it is essential that all instances with v 0 x ðθÞ < 0 interact as little as possible with the obstacles.
Given these observations, one may be tempted to conclude that the idealized velocity filter provides a general upper bound on the current J that can be approached only in extreme limiting cases. Nonetheless, for more sophisticated shapes and arrangements of the obstacle and its repeated instances, it is possible to exceed this apparent bound. In Fig. 4(c), we show a kitelike shape with hooks at the upper and lower vertices. This shape is repeated periodically along a square lattice that is diagonal to the direction of motion e x of the obstacle. We impose the constraint that the distances to all the repeated instances of the obstacle are kept fixed over time, such that it is still sufficient to describe the position of the ensuing array of obstacles with a single variable x p . The hooks at the upper and lower vertices of the kiteshaped particle take over the role of the chevrons in trapping the active particle for angles in the region around θ ¼ 0. For the chosen geometry, this trapping ensues for angles jθj ≲ 80°. Crucially, for angles somewhat above this threshold, the elongated rear shape of the kites and the pattern in which they are arranged force the coordinate r on a trajectory whose general direction is ð−1; 1Þ, thus reversing the sign of v x ðθÞ compared to v 0 x ðθÞ. As visible in Fig. 4(a), this effect persists for all angles up to approximately 135°, leading to negative velocities v x ðθÞ below the curve for the idealized velocity filter. For even larger values of θ, an interaction between the active particle and the obstacle leading to v x ðθÞ > v 0 x ðθÞ cannot be avoided. Nonetheless, when averaging over all θ, a positive effect prevails. The width and length of the kite shown in Fig. 4(c) are optimized to yield a current that is approximately 5% larger than that of the idealized velocity filter (with fixed μ p =μ a ¼ 0.1 and f ex ¼ 0). The overall proximity between the functions v x ðθÞ for the kite-shaped particle and the velocity filter justifies the role of the latter as an analytically tractable model for the thermodynamics of a well-designed work extractor.
Next, we explore the dependence of the current J on the external force f ex . For this purpose, we make use of the fact that a change of f ex in Eq. (31) has the same effect as a change of the angle θ and the speed u ac . Making explicit the dependence of v on θ, f ex , the potential, and the noise, this correspondence can be expressed as vðθ; f ex ; V; ζ a ; ζ p Þ ¼ αvðθ; 0; V=α; ζ a =α; ζ p =αÞ; ð42Þ and the scaled external force z as above. In particular, for a hard-core interaction and in the absence of noise, as discussed above, the knowledge of the function vðθÞ at a zero external force is sufficient to calculate the integrals in Eqs. (36) and (37) for arbitrary f ex . The loading curves in Fig. 5 show the results for the extracted power and the active efficiency for the chevron and kitelike shapes from Fig. 4, which are compared to the analytical expressions for the idealized velocity filter derived from Eqs. (38) and (41).
We observe that the extracted power is rather small. Taking the active power of a free particle μ a f 2 ac as a reference, the scaled extracted power P ex =μ a f 2 ac does not exceed 0.0025 for μ p =μ a ¼ 0.1 as chosen in Fig. 5. For the velocity filter, a global maximization yields the bound P ex ≲ 0.0089μ a f 2 ac , which is reached for μ p =μ a ≃ 1.48 and f ex =f ac ≃ 0.094. The values for the active efficiency are larger than P ex =μ a f 2 ac , because the interaction between the particles reduces the active power compared to the free active particle. The superiority of the kite-shaped work extractor persists for all external forces, producing a larger current, power, and efficiency than the velocity filter.

A. Mean-field theory
Building on the results for the single active particle, we next study the extraction of work in a setting with a large number N of active particles. We focus on the dilute limit, where the size of the active particles is assumed to be sufficiently small compared to the typical interparticle distances. The direct interactions among the active particles can then be neglected. Nonetheless, the small active particles still interact with a large obstacle. Naively, one might expect that this interaction is simply additive in the number of active particles. However, we have to take into account that each active particle affects the motion of the obstacle, which has, in turn, some effect on its interaction with all other active particles.
Focusing on noninteracting active particles, the number density of obstacles plays only a subordinate role. Since an obstacle can, in principle, trap arbitrarily many active particles, it is irrelevant whether a single obstacle extracts power from all active particles together or whether several obstacles each extract only a fraction of the power. The only requirement, as before for the single-particle case, is that the distance between obstacles does not exceed the persistence length of the active particles. In order to derive the key quantities, we use a mean-field approach, focusing first on the interaction between a representative active particle and the obstacle, where the influence from all other active particles is subsumed with the external force. A posteriori, this influence is determined self-consistently.
We start with some general considerations for the dynamics of the obstacle interacting with a background of many small active particles and producing work against a counterforce. First, we notice that the velocity of the obstacle cannot persistently exceed the velocity u ac of the individual active particles; otherwise, all interactions would be directed against the direction of motion of the obstacle. Thus, one can only hope to increase the extracted power with the number of active particles by simultaneously increasing the external force.
Second, the obstacle and the many active particles currently pushing it are in close contact, such that they may be regarded as a single complex. Since we neglect hydrodynamic interactions, the friction coefficients of the objects forming such a complex are additive. As the number of active particles in this complex increases linearly with N, we can assign to the interacting obstacle an effective friction coefficient, or inverse mobility, that scales also linearly in N. This scaling later turns out to be self consistent in the mean-field analysis. Since the forces acting on the complex of obstacle and active particles also scale linearly in N, the resulting average velocity J can still remain nonzero.
Third, we expect that fluctuations in the dynamics of the obstacle vanish in the limit of many active particles. Such fluctuations have two sources: The thermal noise acting on the complex of the obstacle and trapped active particles scales according to the effective mobility like 1= ffiffiffiffi N p . The other contribution stems from fluctuations of the force exerted by all the active particles. Being the sum of N independent random variables, the fluctuations in the resulting force scale like ffiffiffiffi N p . Multiplication by the effective mobility shows that the impact of these fluctuations on the velocity of the obstacle vanishes also like 1= ffiffiffiffi N p . As a result of the above considerations, we can replace the Langevin equation (20) for the obstacle in the meanfield limit by a simple motion _ r p ¼ Je x with a constant, yetto-be-determined velocity J. The form of the Langevin equation (21) for a representative active particle, with the interaction term U set to zero, is unaffected by the presence of the other active particles. The many-body dynamics then reduces to an effective two-body problem analogous to the one in Sec. IV. The Langevin equation for the relative coordinate r between the representative active particle and the obstacle follows as _ r ¼ṽ 0 ðθÞ − μ a ∇VðrÞ þ ζ a : ð44Þ It has the same form as Eq. (30) for the single active particle, but with μ p and, thus, ζ p set to zero and the drift term redefined asṽ The solution of the Langevin equation (44) leads to the stationary relative velocity vðJÞ ¼ h_ ri, where we make the dependence on J explicit. We stress that our mean-field approach is not limited to persistent active particles with a timescale separation between translational and rotational motion, as considered in Sec. IV. In general, Eq. (44) is to be solved with rotational diffusion in the angle θ, which is thereby averaged over in the computation of vðJÞ. In case we do have very persistent active particles, we can use the same strategies as before for the single-particle case, starting with a model function or explicit results for vðθÞ, obtaining the dependence on J through the transformation (42) with z ¼ J=u ac , and then integrating out θ.
The interaction force exerted by the representative active particle in the x direction on the obstacle follows from Eq. (44) as In the mean-field solution, this force is exerted by each of the active particles, which together yield the total force acting on the bare obstacle. Consistency with the generally valid relation (23) therefore requires which finally relates J to the corresponding external force f ex and yields the extracted power Moreover, consistently with what we have assumed before, the effective mobility of the obstacle in contact with the active particles scales like On the other hand, the total active power, as defined in Eq. (27), is given in the mean-field limit from the N independent contributions of all active particles as where the averages are computed from the Langevin equation (44) and run over all angles θ, such that hn · e x i ¼ 0.
For the idealized velocity filter, we focus again on persistent active particles and calculate where the critical angle is defined through v 0 x ðθ c Þ ¼ u ac cos θ c − J ¼ 0. Carrying out the integration, we obtain which is similar to Eq. (39) for the single-particle case but with a redefined dimensionless parameter z ≡ J=u ac . Again, we focus on jzj ≤ 1, corresponding to the region of interest where jJj ≤ u ac . Rather then solving the ensuing transcendental equation for J [Eq. (47)], we can analyze the dependence of the extracted and active power on the external force in terms of parametric plots defined by P ex ðzÞ ¼ u ac zf ex ðzÞ; ð53bÞ see Fig. 6. The only parameter that does not amount to a mere overall scaling of the above equations is λ ≡ μ a =ðNμ p Þ.
Note that μ p is here the bare mobility entering through Eq. (47) and not the vanishing effective one. Provided that the ratio of bare mobilities μ a =μ p is not of the order of N, we can set λ ¼ 0, leaving us with a parameter-free representation. Otherwise, for a large obstacle that is much less mobile than the active particles, an ensuing positive value of λ reduces P ex ðzÞ for all z, leading to a smaller maximal extracted power. The extracted power is maximized for z Ã ¼ cosðy Ã Þ ≃ 0.394, where y Ã is the smallest positive solution of 2y ¼ tan y. The external force corresponding to z Ã is given by f ex ðz Ã Þ ¼ ðNf ac =2πÞ sin y Ã ≃ 0.146Nf ac . The maximal extracted power itself is P ex ðz Ã Þ ¼ ðNμ a f 2 ac =2πÞz Ã sin y Ã ≃ 0.0577Nμ a f 2 ac , and the active power is P ac ðz Ã Þ ≃ 0.744Nμ a f 2 ac , leading to an active efficiency at a maximum power of η Ã ≃ 7.74%. This result is only little below the maximal active efficiency η max ≃ 7.99% that is reached for f ex ≃ 0.175Nf ac and λ ¼ 0, for which the active power is P ac ≃ 0.0559Nμ a f 2 ac . We recall that in Sec. IV the power extracted from a single active particle is rather small, amounting to roughly 1% of the active power expended by the active particle. Naively, one may have expected that by using N noninteracting active particles both the extracted and the expended power increase linearly, leading to a similarly small efficiency. Surprisingly, however, as summarized in Table I, we find analytically for the idealized velocity filter that the extractable power per active particle and the characteristic efficiencies are consistently higher by nearly one order of magnitude in the setting with many active particles than in the one with a single active particle. This increase is an important result of our paper, which could not have been anticipated a priori.
The joint interaction with the obstacle mediates some kind of cooperativity between the otherwise noninteracting active particles. For an intuitive understanding of this behavior, consider the reaction of the obstacle to the detachment of a previously trapped active particle. If there  I. Thermodynamic characterization of the extraction of work for the idealized velocity filter in a setting with a single active particle (N ¼ 1) and in the limit of many active particles. Listed are the maximal extracted power per active particle (along with the maximizing parameters f ex and μ p ), the active efficiency at maximum power η Ã , and the maximal active efficiency η max . Note that, in the mean-field theory, the maximum power is independent of the mobilities μ p;a , as long as their ratio is well above 1=N.  are no other active particles, the obstacle is then surrendered completely to the external force pulling it backwards. Such negative contributions to the extracted power are prevented when the presence of many more trapped active particles stabilizes the forward motion of the obstacle. Beyond active matter, the collective effects observed here are somewhat reminiscent of the ones observed in coupled molecular motors [94] and, more recently, in coupled heat engines [95] and power converters [96]. As before, the idealized velocity filter serves as a benchmark for the performance of work extractors based on suitably shaped obstacles. In Fig. 6, we compare its power and efficiency to that of the chevron and kite-shaped particles in the mean-field limit. For this purpose, we solve Eq. (44) for the two geometries shown in Figs. 4(b) and 4(c) and with the noise term set to zero. These solutions yield velocity profiles similar to the ones in Fig. 4(a), which can be used to compute vðJÞ along with the relevant thermodynamic quantities.
For the chevron particle, the mean relative velocity v x ðJÞ is always larger than for the idealized velocity filter. Hence, the interaction force (46) is below that of the velocity filter for any given current J. In Eq. (47), this difference leads to a smaller corresponding external force f ex and, thus, a smaller extracted power P ex ¼ f ex J. In contrast, the kite-shaped particle has a somewhat higher maximal extracted power than the velocity filter. For small external forces, though, the extracted power is somewhat smaller. This regime corresponds to large currents J, where the kite-shaped particle, unlike the idealized velocity filter, experiences strong "headwind" from surrounding active particles. In comparison to Fig. 5, we stress that for both designs of the obstacle the attained efficiency and power per active particle are larger than in the case with a single active particle.

B. Numerical simulations
To test our design principles in actual many-particle settings, we now turn to the numerical study of autonomous engines driven by a bath of active particles. We consider a set of noninteracting active Brownian particles in two dimensions with position dynamics given by Eq. (21). As usual for this type of model, the translational noise ζ i a is assumed to have isotropic Gaussian correlations, which amounts to neglecting the chemical mobility compared to the thermal one (μ ch ≪ μ th ). We allow the angular direction n i ¼ ðcos θ i ; sin θ i Þ to fluctuate in time following an independent dynamics for each particle: where D r is the rotational diffusion coefficient. The noise term ξ i has Gaussian statistics with a zero mean and variance given by hξ i ðtÞξ j ðt 0 Þi ¼ δ ij δðt − t 0 Þ. We recall the definition of the according persistence length l ¼ u ac =D r as the typical distance covered by a particle, in the absence of an obstacle, before changing its orientation. We now model each obstacle by an assembly of soft rods which interact repulsively with the surrounding active particles. The potential between a particle i and a rod j is taken as short ranged of the form Vðr ij Þ ¼ V 0 ð1 − r ij =aÞ 2 for r ij < a, where r ij is the minimal distance between the particle center and the points on the line segment of the rod. In practice, we use a ¼ 1 in what follows, so that all length scales are expressed in units of the particle-rod interaction length. Besides, the energy scale V 0 is always large compared with the ones of thermal fluctuations k B T and the active force af ac , so that the rods effectively act as hard walls. Following the geometry introduced in Sec. IV, we can then form two types of obstacle, either chevrons or kites, as shown in Figs. 7(a) and 7(b). The arrangement of the obstacles is directly inspired by the periodic structures in Sec. IV, namely, a simple square lattice for chevrons and a two-lane arrangement for kites, and it is kept fixed throughout the simulations. The displacement of all rods forming the obstacles is synchronized and restricted to the x direction with dynamics given by Eq. (20). Finally, we use biperiodic boundary conditions, so that the obstacles follow a perpetual directed motion toward x > 0 in the absence of external force (f ex ¼ 0) (See Supplemental Material [97]).
We measure the extracted power per active particle and the efficiency as functions of the external force for both chevrons and kites, as reported in Figs. 7(c)-7(f). At a given value of the persistence length l, the loading curves extracted from various numbers of active particles N fall onto a master curve, in agreement with the mean-field regime considered in Sec. VA. When increasing the persistence length l, the stall force, the maximum power and efficiency, as well as the corresponding force values increase. These data corroborate that the regime of large persistence is indeed optimal, as we assume in Sec. IV. In practice, the orange curves corresponding in Fig. 7 to the largest persistence coincide with the ones for infinite persistence, namely, when D r ¼ 0. The translational diffusion coefficients D a and D p have only little influence on the loading curve, as long as the thermal energy is small compared to the energy required for a particle to leave a trapped state. Moreover, the peak values of power and efficiency are systematically higher for kites compared with chevrons. This difference shows that the kites achieve better performances not only at a large persistence, but also for intermediate regimes. In short, these numerical results demonstrate that the design principles we put forward indeed allow one to delineate the optimal geometry for autonomous engines in a fluctuating active bath.
Comparing the loading curves in Figs. 7(c)-7(f) with the corresponding analytic predictions in Fig. 6, the peak values extracted from numerical simulations turn out to be smaller. Two reasons account for this difference. First, our The displacement of all obstacles is synchronized and restricted to the x axis. Active particles, shown as blue circles, interact only with the obstacles. Using a biperiodic box with size L x × L y and given the shape asymmetry, the obstacles follow a perpetual directed motion toward x > 0. To extract work, the operator applies a constant force f ex toward x < 0 on the obstacles. The extracted power P ex and the efficiency η are, respectively, shown for (c),(e) chevrons and (d),(f) kites as functions of the applied force. The shapes of the symbols refer to particle density ρ accounting for the excluded obstacle area: ρ ¼ 0.23 (triangles), 0.46 (circles), and 0.68 (diamonds). The color code corresponds to persistence lengths l ¼ μ a f ac =D r of the active particles. Chevrons: l=L ¼ 3.3 (black), 6.6 (red), and 66 (orange). Kites: l=L ¼ 2.2 (black), 4.4 (red), and 44 (orange). Solid curves are the predictions of the mean-field theory, obtained from simulations for a single active particle. Other parameters:  Fig. 4. This difference is due to the finite size of active particles and finite width of rods, in contrast with the pointlike and linelike approximation used in Secs. IV C and VA. While our simulations serve as a proof of principle, further improvements of the power and efficiency may be expected for a rigorous optimization of the obstacles' shape and arrangement under the constraints set by such a more realistic setting. For a quantitative verification of the mean-field approach, we evaluate the single-particle dynamics by numerically integrating the Langevin equation (44) specifically for the geometry and diffusion coefficients used in the simulation and for a finely discretized set of values for J. The force, extracted power, and efficiency in the mean-field limit of many active particles then follow from Eqs. (47), (48), and (50). The loading curves resulting as parametric plots are shown as solid curves in Figs. 7(c)-7(f). They agree well with the results of the simulation, indicating that the particle densities used in the simulation are already sufficiently large to justify the meanfield assumptions. In particular, since the mean-field theory works even for the lowest density used in the simulations, one can expect that the enhancement of the power and efficiency are observable even in a dilute realization of a model with interactions between active particles, before clogging effects decrease the power again at very high densities [98].

VI. CONCLUSIONS
In this work, we have analyzed the dynamics and energetics of asymmetrically shaped passive obstacles immersed in active baths. The interaction with active particles propels the obstacles such that they can deliver work against a mechanical counterforce. In such a setting, thanks to the simultaneous breaking of spatial and timereversal symmetries, the obstacles act as autonomous engines driven by active matter. This type of setting is minimal for an engine driven by an active bath; in stark contrast to classical heat engines, it requires neither a second bath nor any cyclic manipulation of system parameters.
In a general approach, we have identified the quantities that are relevant for a characterization of the thermodynamics of active engines. An obvious quantity to consider is the extracted work, defined as the external counterforce times the displacement of the obstacle. For a quantification of the efficiency of an engine, this work is to be compared to the input of energy. Yet, the total rate at which chemical energy is supplied to maintain the active particles' selfpropulsion is hard to assess, as it typically involves many unresolved microscopic processes. Moreover, most of this chemical energy is typically dissipated on a microscopic scale and can, therefore, fundamentally not be extracted by any mechanism that operates on a mesoscopic scale. In contrast, the active work we have considered here is a more easily assessable quantity at a mesoscopic level, which also turns out to be more closely related to the extracted work. It takes into account the displacement of active particles driven by an effective active force, which can be inferred phenomenologically from experimental data. Here, we have shown how the active work can be identified through coarse-graining from a minimal, microscopic, and thermodynamically consistent model for active particles. As a result, the commonly used active Brownian particle model emerges in a way that allows us to disentangle chemical aspects of entropy production from coarse-grained ones. We thus have formalized the concept of active force [19,20,[87][88][89] and work [70,[83][84][85], previously used in theoretical models, from a thermodynamic perspective. Moreover, we have shown how the work that can be extracted on a macroscopic scale is related to the active work. Since the former is less than the latter, we can define the active efficiency as the ratio of these two quantities. It is an upper bound on the "full" thermodynamic efficiency defined as the ratio of extracted work to the chemical energy expended microscopically, which is, however, typically not measurable. In contrast, the active efficiency allows an experimenter who has access to an active bath to quantify the performance of an engine built on it, independently of mesoscopically irrelevant chemical details of the particles' self-propulsion mechanism.
We have investigated the power and efficiency of work extraction from active matter for minimal examples of engines in various settings. Common to all of these settings is the fact that the extracted power increases with the persistence length of active particles. For a onedimensional lattice model with one active particle and the obstacle represented by a passive particle with asymmetric interactions, we have calculated the power and efficiency exactly. In one limiting case, the active efficiency reaches unity, revealing that there can be no stronger universal bound on the extracted power.
For a fairly general Langevin model in continuous space, a no-go theorem shows that power can be extracted only when active particles have the possibility to pass by the passive obstacle. Therefore, we have focused on twodimensional settings, where such a passing by is possible even for particles with hard-core interactions.
For the case of a single active particle and a single passive obstacle, we have considered the effect of the geometry of the obstacle on the power and efficiency. An analytically solvable benchmark is given by an obstacle with the idealized behavior of a velocity filter, trapping particles moving in one direction and letting pass particles in the other. Simple chevron-shaped particles cannot surpass the power and efficiency of such a filter.
Nonetheless, we have shown that, with a more complex design of obstacles, it is possible to improve upon this benchmark by a small margin.
For obstacles immersed in a bath of many active particles that do not interact with each other, we have calculated the power and efficiency of the work extraction using a meanfield approach. It reveals that at high number densities the efficiency and the power per active particle are enhanced by one order of magnitude compared to the case of a single active particle. Numerical simulations for the many-particle setup validate the mean-field approach.
In this paper, our illustrations of work-extraction mechanisms have been focused on highly idealized model systems. For instance, we have not considered pair interactions between active particles, alignment interactions between the active particles and the obstacle, or hydrodynamic interactions, which would likely all be present in experimental realizations. These idealizations have allowed us to obtain analytical results and general design principles. Nonetheless, one may expect that these results provide benchmarks for a more general class of models, in which our idealizations are embedded as limiting cases, in particular, the dilute limit.
Beyond the paradigm of active Brownian particles with rotational diffusion in two dimensions, one could also explore three-dimensional particles, stochastic variations in the propulsion speed as in active Ornstein-Uhlenbeck models [70,87,88], or sudden reorientations of the propulsion direction as in run-and-tumble models [99,100]. Our definitions of quantities characterizing the energetic performance of engines apply already to these cases, thus supporting the generality of our approach. Yet, new design principles for the optimization of the performance may emerge in such more complex settings. It will also be interesting to investigate the universality of the cooperative enhancement of the performance beyond the mean-field approach used here. Thanks to modern techniques for the microfabrication of particles [63,101], the exertion of forces using optical tweezers [43,45], and the realization of artificial self-propelled particles [14,81], it should be possible to address these questions experimentally. In the limiting case of highly persistent active particles, γ ≪ w 0 , k 0 , there is a timescale separation between the reorientations and the lateral transitions. Hence, the distribution pði; nÞ can be written in terms of two effective Boltzmann distributions pði; nÞ ≈ exp½−V eff ði; nÞ=Z n that are normalized such that P i pði; nÞ ¼ 1=2 for each n. The effective potential must then obey V eff ði; nÞ − V eff ði þ 1; nÞ ¼ ln

ACKNOWLEDGMENTS
to restore a detailed balance relation for the combined transition rates between adjacent states i. Note that even in this case, where the relative coordinate equilibrates locally, the total system is nonetheless in a genuine nonequilibrium state with nonvanishing currents J and P ac . Provided that the lattice size L is sufficiently large to separate the attractive site from the repulsive one, lattice sites away from the passive particle become depleted, such that the resulting currents no longer depend on L.
In contrast, for γ ≫ w 0 , k 0 , the orientation of n equilibrates locally for every i, leading to n-independent, effective transition rates of the active particle of the form Thus, the dynamics of i a and i p becomes equivalent to a passive system that is driven only by the external force.
Without an external force, the system then reaches an effective equilibrium state pðiÞ ∝ expð−V i Þ with the actual interaction potential and vanishing current J, which is analogous to the small persistence regime in continuous models, where effective Boltzmann approaches are legitimate [100,102]. As leading-order corrections for fixed k 0 and w 0 , the deviations from the Boltzmann distribution, the current J in Eq. (11), and the optimal external force all scale like 1=γ (similar to the case of off-lattice models [103]), leading to the maximum extracted power scaling like 1=γ 2 . Since, nonetheless, the active power (17) remains finite, the active efficiency vanishes like 1=γ 2 as well.
For small external forces, the response in the change of the current must be linear. For a small asymmetry ε in the interaction potential or large γ, the stall force f stall is small as well, such that the linear regime covers f stall . In this case, the output current is given by J ¼ J 0 ð1 − f ex =f stall Þ þ Oðf 2 ex Þ with the current J 0 at zero force, such that the maximal extracted power P max ¼ J 0 f stall =4 is attained at the force f Ã ex ¼ f stall =2. Figure 8 compares these two characteristic forces.
Another limiting case that can be understood analytically is the one for which the interaction potential is strong, i.e., ε → ∞. In this limit, the stationary probability is concentrated in the state i ¼ 1, which is almost impossible to leave. Thus, there are almost no transitions, and both the extracted power and the active power vanish. Nonetheless, the active efficiency (19) is well defined in this limit. It can be calculated from the dominant contributions to the currents stemming from rare and short-lived excursions to the state i ¼ 2. Jumps out of this state are highly biased toward i ¼ 1, such that all other states i > 2 can be neglected for the calculation of the current. We assume a timescale separation between the sojourn time in the state i ¼ 2 and the much larger timescale 1=γ for reorientations. The steady-state distribution then reads The stationary currents due to jumps of the passive particle follow as which leads to the output current J ¼ J þ þ J − and the active efficiency Using the explicit forms for the rates: Thus, as expected, both currents vanish in the limit ε → ∞. Nonetheless, η remains finite in this limit. Additionally taking the limit w 0 → 0 yields independently of the order in which the limits are taken. For large f ac and f ex ∼ f ac − ffiffiffiffiffiffi f ac p , this efficiency gets arbitrarily close to one, showing that there is no universal upper bound on the efficiency smaller than η ≤ 1.

APPENDIX B: IMPLEMENTATION OF THE HARD-CORE INTERACTION
We calculate numerical solutions of the Langevin equation (30) for the relative coordinate r in the limit of vanishing noise terms ζ a and ζ p and the interaction potential VðrÞ being hard core. Away from the obstacle, the equation is integrated exactly using a simple Euler scheme with time step δt ¼ 0.01 and zero potential force. If it is detected that after the next such time step the active particle would penetrate the obstacle, the equation is modified to Therein, the effect of the potential force is modeled by the constraint force f c ¼ f c m, which has to be parallel to the local normal vector to the surface of the obstacle m.
The absolute value of the constraint force is obtained by requiring that the resulting velocity is parallel to the surface (_ r · m ¼ 0), leading to If it is detected that the active particle has reached a cusp node of the obstacle where it gets trapped, the calculation terminates and the averaged relative velocity vðθÞ is assigned zero. We stress that the explicit evaluation of the average h∇VðrÞi θ of the hard-core potential can be avoided by using Eq. (33), which uses only average relative velocities.   Fig. 3). For small external forces within linear response, this force is half the stall force f stall at the respective parameters (dashed lines); deviations occur for stronger forces.