Work statistics in stochastically driven systems

We identify the conditions under which a stochastic driving inducing energy changes on a system coupled to a thermal bath can be treated as a work source. When these conditions are met, the work statistics satisfies the Crooks fluctuation theorem traditionally derived for deterministic drivings. We illustrate this fact by calculating and comparing the work statistics for a two-level system driven respectively by a stochastic and a deterministic piecewise constant protocol.


Introduction
Stochastic thermodynamics allows the identification of thermodynamic quantities at the level of single stochastic trajectories. This theory is particularly relevant for small systems in which fluctuations are comparable to average values. Remarkable experimental advances, allowing to measure and manipulate systems at the (sub) microsize level, have validated these theoretical developments. Among these achievements are the out of equilibrium versions of the fluctuation-dissipation theorem [1,2,3,4,5,6,7,8,9,10], the connection between thermodynamics and information theory [11,12,13,14,15,16,17,18,19], and -maybe most importantly-the formulation and verification of the so-called fluctuation theorem (and its variants) [20,21,22,23,24,25,26,27]. According to this theorem, a (stochastic) positive entropy production is exponentially more likely to be observed than the corresponding negative entropy production. On average this implies a positive entropy production in agreement with the second law. Depending on the specific setup, entropy production can be related to physical observables [28]. For instance, when considering transitions between equilibrium states for a system in contact with a single heat bath and driven by a deterministic time-dependent force, the entropy production can be expressed in terms of the work W minus the free energy difference ∆F between the initial and final equilibrium state. The fluctuation theorem for the work statistics in such setups has been used to evaluate free energy differences between molecular equilibrium states [29,30].
Stochastic driving is an issue of both conceptual as well as practical interest. Conceptually, one may wonder whether the energy transferred to the system can be treated as work. From a practical perspective a deterministic driving is never perfect and will always be accompanied by uncontrollable small random fluctuations. It is therefore important to understand how these fluctuations may affect the work statistics and the fluctuation theorem [31,32,33,34]. The entropy production in the joint space of the driven system as well as of the stochastic driving will always satisfy a fluctuation theorem. This was recently shown in Ref. [35] by considering Ornstein-Uhlenbeck processes. In the present paper, we want to use stochastic thermodynamics to determine the conditions under which the energy injected in the system by the stochastic driving fully captures the joint system dissipation and can thus be treated as work. We show that these conditions are rather restrictive since the stochastic driving must evolve reversibly. We study two models where this condition is satisfied: a twolevel Markov process coupled to another independent two-level Markov process, and a one-dimensional Ornstein-Uhlenbeck process coupled to another independent onedimensional Ornstein-Uhlenbeck process. We also use the former model to compare the large deviation properties of its work statistics with that of the same system but driven by a deterministic piecewise constant driving. We find that while the large deviation function has a compact support in the deterministic case, it does not in the stochastic case. Furthermore, we show that both drivings give rise to a Crooks fluctuation theorem.
The outline of the paper is as follows. In section 2, we identify the general conditions under which a stochastic driving behaves as a work source. In this case we show that the work statistics satisfies a Crooks fluctuation theorem [25]. In section 3, we compute and compare the large deviation properties of the work statistics of a two-level system driven by a piecewise constant deterministic driving [36] with that of the same system subjected to a stochastic work source. Conclusions are drawn in section 4. Finally, using the results of Ref. [37], we show in Appendix C that a stochastically driven overdamped colloidal particle in a harmonic trap does satisfy a Crooks fluctuation theorem when the work is properly identified.

Stochastic driving as a work source
We consider a stationary Markovian dynamics on a bipartite joint system made of a system with states σ and an independent energy source with states h. The bipartite property means that transitions involving a simultaneous change in σ and h are not allowed. The rates ω σ ′ ,σ (h) describing system jumps from σ to σ ′ satisfy local detailed balance [38,39] ln while the rates describing the energy source ω h,h ′ do not depend on σ and do not necessarily satisfy local detailed balance. We introduced the inverse temperature β = 1/T (k b = 1). Such dynamics can be viewed as a limit of a global dynamics satisfying local detailed balance when the energy scale involved during the source transitions is very large compared to the system one (see Appendix A). The energy changes due to transitions between σ states at fixed h constitute the heat exchanged with the bath while the energy changes due to transitions between h states at fixed σ constitute system energy changes due to the energy source. We now turn to energy exchanges described at the level of single trajectories. To set the notation, we denote the joint system, the system, and the energy source trajectories during a time interval [ Since P[σ|h] = p(σ 0 |h 0 )P σ 0 [σ|h] where p(σ 0 |h 0 ) is the probability to be in the initial state σ 0 for a given initial h 0 , the entropy production of the system is where ∆S[σ|h] = ln p(σ 0 |h 0 )/p(σ t |h t ) is the change in the Shannon entropy of the system after a time t. Using energy conservation along a system trajectory, the energy provided by the energy source to the system reads W . Therefore, the entropy production becomes where is the change in the nonequilibrium free energy of the system. The entropy production (3) and (4) Since a work source is not supposed to give rise to any entropy production, our energy source is only a work source when this additional term vanishes and thus does not affect the system entropy balance. This happens either when the driving is deterministic or when the energy source h evolves reversibly, i.e. when P[h] = P[h]. In this latter case, from the system perspective, the trajectory [h] of the energy source is perceived as a time-dependent stochastic driving. We note that even in presence of a dissipative energy source, the non-negative first term on the r.h.s. of (6) still provides a lower bound to the entropy production of the joint system. The non-negative second term constitutes in turn a lower bound on the dissipation of the energy source, since the trajectories [h] may only provide a coarse grained description of the energy source dynamics. When the long time limit is considered and for systems with a finite state space, the contributions ∆F [σ|h] to the entropy production (4) is not extensive in time and thus vanishes in the large deviation sense. The steady state fluctuation theorem for the entropy production therefore reads where w = W/t is the energy per unit of time provided by the energy source to the system, Σ sd = ∆ i S sd /t is the rate of entropy production due to the energy source, and is the large deviation function for the total entropy production. It is once again only when the driving is deterministic, or when the energy source h evolves reversibly, that Σ sd = 0, that the energy source behaves as a work source, and that the Crooks fluctuation theorem is recovered. The stochastic drivings used for the models presented below all satisfy this condition and qualify as work sources.

Modulated two-level system
In this section, we compare the work statistics of a two-level system driven by a stochastic (reversible) work source with that of the same system driven by a deterministic work source.

Stochastic work source
We consider a two-level system σ = ±1 coupled to a heat bath at temperature T and interacting with a stochastic energy source with two states ε = ±1. The Poisson rate to leave the source state ε is denoted k ε and does not depend on σ. This immediately implies that the stationary dynamics of the energy source is reversible and can thus be considered as a work source. We denote by h(t) = h 0 + ε(t)a the driving produced by the work source whose state at time t is given by ε(t). This driving is illustrated in Fig. 1. The energy of the joint system is E(σ, h) = −σh in unit of k B T (β = 1 from now on). This corresponds to the four energy levels E(σ, h 0 + εa) = −σ(h 0 + εa) depicted in Fig. 2. For a given source state ε, the rate describing a transition from system state σ to −σ is given by ω ε σ = ω(h 0 + εa)e −σ(h 0 +εa) . This rate satisfies the local detailed balance condition and includes as special case • Arrhenius rates, ω(h) = Γ, • Fermi rates, ω(h) = Γ/(2 cosh(h)), where Γ is a positive constant setting the time scale (Γ = 1 in all figures). The dynamics of the joint system is described by a stationary four-state model. Each state is specified by the pair (σ, ε) = θ. The work generating function is defined as G θ,µ (t) = e µW (t) δ θ,θ(t) where δ is the Kronecker delta and .. denotes an average over Energy Figure 2. Representation of the energy levels of the two-level system: on the left (resp. right) the work source state is ε = −1 (resp. ε = +1). The upper (resp. lower) part of the figure corresponds to σ = −1 (reps. σ = 1). For a σ = −1, a decrease of h will decrease the energy of the system resulting in a negative work contribution w = −2a, while an increase of h will increase the energy of the system and result in a positive work w = 2a.
all possible values of the work W (t) = − t 0 dt ′ḣ (t ′ )σ(t ′ ) and of the states θ(t) at time t. Its evolution is ruled by where We note that while the joint system is ruled by an autonomous steady state dynamics in the long time limit, the two-level system continuously undergoes random energy switches from the work source and tries to relax toward the new corresponding equilibrium state. The work statistics in the long time limit is characterized by φ µ the largest eigenvalue of M µ and the asymptotic cumulant generating function for the work Its analytical expression can be obtained using the Ferrari method to solve the following characteristic equation where 1 is the identity matrix and Note that the last inequality in (12) holds for any real µ. The characteristic polynomial can always be factorized into a product of two second degree polynomials with real coefficients. The cumulant generating function is then the largest solution of a second degree polynomials, with the choice between the two polynomials depending on the parameters. We do not explicitly provide the lengthy analytical solution of equation (11). Simpler expressions can be obtained in the fast and slow modulation limit, or for small and high amplitudes of the field by pertubatively expanding the function φ and the coefficients c to various orders. The characteristic polynomial obtained in this way decomposes into several equations for each order. The lowest order solutions are summarized in Table 1.

Arrhenius rates
Fermi and Bose rates Table 1. Cumulant generating function τ φ µ of the work (stochastic work source) during a time interval τ in the limits of fast (Γτ ≪ 1) and slow modulation (Γτ ≫ 1), for small amplitudes of modulation (a ≪ 1 ), or for large energy gaps (h 0 ≫ 1). We use (19) to evaluate k ± which allows comparison with the deterministic work source (see Table 2).
It is important to note that the only coefficient of the characteristic polynomial containing a µ dependence is the one of zero degree in φ. This implies that the lowest order solutions will always contain the variable µ as expected. We also remark that if the ith order solution is independent of µ, it must vanish since φ µ=0 is zero by definition. This is helpful to simplify the calculations leading to table 1. We also note the results in Table 1 rely on the hypothesis that µ is chosen inside an interval that depends of the expansion parameter. They are valid for any types of rates except in the large field expansion (h 0 ≫ 1) where the function ω(h) has, at large h, a leading role to determine the order of the various coefficient.

Periodic work source
We consider now the same two-level system as before but driven by the deterministic and periodic (of period τ ) work source depicted in Fig. 3. The period fraction during which the work source is in the lower (resp. higher) state is denoted by α (resp. 1 − α). The large deviation function and the cumulant generating function of the work statistics are derived in [36]. We briefly summarize the derivation. The work generating function G σ,µ (t) = e µW (t) δ σ,σ(t) evolves according to where L µ σ,σ ′ (h) = −σσ ′ ω(h)e −σ ′ h −ḣµσδ σ,σ ′ . The asymptotic work cumulant generating function is given by the logarithm of the highest eigenvalue λ µ of the following propagator where −→ exp stands for the time-ordered exponential. If g σ,µ denotes the eigenvector associated to the eigenvalue λ µ and g µ = σ g σ,µ the sum of its components, after n periods we get which leads to the asymptotic cumulant generating functioñ The propagator over one period Q can be decomposed into the norm conserving evolutions over ατ and (1 − α)τ interspersed by the propagation over the two time steps coinciding with the change of the work source state h. In the end, the work cumulant generating function is found to bẽ where We defined ω ± = 2ω(h 0 ± a) cosh(h 0 ± a) as in the stochastic work source case. The expansion ofφ µ in the limit of fast and slow modulation and in the limit of small amplitude a and large h 0 are given in Table 2.

Arrhenius rates
Fermi and Bose rates

Thermodynamics and average behavior
We now turn to the analysis and comparison of the work statistics generated by the stochastic and periodic work source. In both cases, we will compare the work accumulated during a time τ . Sinceφ describes the statistics of work per period τ for the periodic work source and since φ describes the statistics of work per unit time for the stochastic work source, to compare the two,φ and τ φ have to be considered. Furthermore, the parameters setting the time scale of the two work sources have to be related via in order to spend, in average, the same amount of time at high and low value of h. We keep this convention throughout the paper. We also count time in unit of a period τ , i.e. t = nτ . For large n, in the sense of large deviation the work w = W/n becomes minus the heat q = Q/n because the system internal energy is bounded and thus its change between 0 and t is not extensive in time. Similarly, the entropy production per period becomes equal to the heat flow −q because the system entropy change is not extensive in time. This implies that the work fluctuations fully characterize the large deviation properties of the entropy production and of the heat fluctuations.
For the periodic work source, the first derivative ofφ µ at µ = 0 is the average work per period For the stochastic work source, we show in Appendix B that the work received by the two-level system during time τ is with Z a normalization constant in the state probability. Note that, in (20) and (21), the average work is positive as required by the second law. For both types of work source, the average work vanishes for a → 0 (no work source) and for τ → 0 or α → 0 or 1 (the two-level system has no time to switch state between two work source transitions). For Γτ → ∞, the two-level system typically relaxes to equilibrium before the next transition in the work source happens and for both types of work source 2aεσ is the work given to the two-level system when the joint system state is (σ, ε) and a transition ε → −ε of the work source occurs. We notice that this average work is independent of any dynamical parameters, see Fig. 4. This limit is not reversible since the driving contains discontinuities. Indeed, the average work is different from the free energy difference. In Fig. 4, we present the average work for τ = 1 and τ = 100 as a function of the amplitude of the jump a. We notice that the dynamics with Fermi rates always produces less work than the other rates because the Fermi rates are the smallest. Indeed, an energy exchange between the work source and the two-level system requires a change of system state between two work source transitions. Therefore the smaller Fermi rates lead to a smaller number of system transitions and thus to a smaller average work. We also see that the average work is always higher for the periodic protocol than for the stochastic one. This is due to the fact that for a Poisson process, the most likely time intervals between work source transitions are the small ones during which the system has less time to change its state and absorb work in average.

Fluctuations and statistics of work
When comparing the work probability distributions corresponding to the two types of work source as in Fig.5, the most striking feature is the difference in the range of the fluctuations. The stochastically driven system always has a small but finite probability to exchange a very large amount of work with the work source and as a result the support of the large deviation function I(w) = max µ {µw − τ φ µ } is infinite. However the periodically driven system displays a finite support because the work exchanged during a work source transition is ±2a thus leading to three possible values for the work per period, ±4a and 0, and to the inequality |w| ≤ 4a. The large deviation function of workĨ(w) = max µ {µw −φ µ } is therefore infinite (vanishing work probability) outside that range. At the level of the cumulant generating function, this implies thatφ µ , the Legendre transform ofĨ(w), has an absolute slope that cannot exceed 4a. Both types of work probability distributions satisfy the fluctuation theorem. In fact any stochastic energy source made of two states is reversible and will thus qualify as work source. The fluctuation theorem for the periodic work source should in principle relate the work statistics for a forward periodic driving with that of the time-reversed periodic driving. However, also here a periodic driving jumping once back and forth between two states over a period is invariant under time-reversal (up to a time-shift which plays no role in the long time limit [36]). We explicitly prove the work fluctuation theorem for the stochastic as well as for the periodic work source by showing that the work cumulant generating function satisfies the relation φ µ = φ −1−µ [23]. This follows directly from (17) and indirectly from (12) by noticing that µ only appears in the characteristic polynomial through the function cosh[2a (1 + 2µ)]. This function is invariant in the exchange of µ to −1 − µ and this also holds true for the roots of the polynomial. This symmetry is also explicitly seen in Fig. 6. We now turn to the quantitative analysis of the large deviation function for work I(w) obtained by numerical Legendre transform of the cumulant generating function corresponding to the two types of work sources. Fig. 5a and the tables 1 and 2 show that both types of work sources give rise to identical work fluctuations in the limit of fast modulation (Γτ ≪ 1). The choice of the rates nevertheless influences the shape of the work distribution and the work variance decreases as the modulation speeds up. We also identify a linear behavior in τ as τ → 0. In the opposite limit of slow modulation (Γτ ≫ 1), the large deviation function becomes rate independent as seen on Fig. 5c. However, the type of work source (stochastic or periodic) still influences the work fluctuations, in particular the large fluctuations away from the common minimum (same expectation value).
In the limit of small field amplitudes (i.e. close-to-equilibrium), the cumulant generating function becomes quadratic in µ: where the mean work values are obtained from (20) and (21) by second order expansion in a. The average work differs for stochastic and periodic work sources and for the different rates. The same observation remains true at the level of work fluctuations.

Conclusion
We identified the condition under which a system subjected to a stochastic driving can be seen thermodynamically as a system subjected to a work source, namely the stochastic driving protocol has to be statistically reversible or in other words its entropy production has to vanish. Under this assumption, the statistics of work and entropy production in the system are identical and a work fluctuation theorem is satisfied. We then compared the exact work statistics of a two-level system driven by a stochastic two-state work source with that of a periodic two-state work source, the two sources spending the same fraction of time in their upper and lower states. We found that the work fluctuations are unbounded in the former case and bounded in the latter one. For fast as well as for slow switching rate in the work source the work fluctuations are quite similar. For small switching amplitudes the system remains close to equilibrium where work fluctuations are Gaussian. Finally, for a given amplitude of the jumps in the work source, important values for the work average and variance are obtained when the time scales of the system and of the work source are comparable.
where the heat flow entering system σ from bath ν = 1 is given by while the energy received by system σ from system h reads Appendix B. Steady state probability with stochastic driving We derive the average work done by the stochastic work source of Fig. 1 on our two-level system. To do so we calculate the steady probability current for the transitions leading to work exchanges. The steady state probability p ε σ to find the joint system in a state (σ, ε) can be obtained from the spanning tree formula [43] and reads The average work accumulated during τ is then Appendix C. Stochastically driven colloidal particle, the Gaussian driving case We consider an overdamped colloidal particle in contact with a bath a temperature T and evolving in a one dimensional harmonic trap whose position follows an Ornstein-Uhlenbeck process. Since this process plays the role of a reversible work source acting on the colloidal particle, our results of section 2 indicate that a work fluctuation theorem should hold. However, this model has been studied experimentally in [31] and theoretically in [37,44] and the Authors found that the work fluctuation theorem is only satisfied in a certain range of parameters. The reason for these violations is that work is defined in these references as the time integral of the velocity times the stochastic force and this work definition differs from the Jarzynski work by a boundary term. We now use the results of [37] (trying to keep their notations) to show that, as we predicted, the Crooks work fluctuation theorem is always valid when the Jarzynski work is considered. We denote by x = x(t) the position of the particle (i.e. the system) and by y = y(t) the position of the trap (i.e. the work source). The stochastic differential equations of motion areẋ where ξ = ξ(t) and ζ = ζ(t) are two uncorrelated Gaussian white noise averaging to zero and with correlation ξ(t)ξ(s) = 2Dδ(t − s) and ζ(t)ζ(s) = 2Aδ(t − s). Two time scales are introduced in (C.1) and (C.2), the relaxation time in the harmonic trap τ γ = γ/k with γ the friction coefficient and k the stiffness of the trap, and the relaxation time of the y correlation, i.e. y(t)y(s) = Aτ 0 exp(−|t − s|/τ 0 ). We note that the Einstein relation D = T /γ (which plays the role of the local detailed balance condition in equation (1)  We remark here that the Jarzynski work could be infinite for some rare events because the amplitude of change of the position x is in principle infinite. The third part in the entropy production is the work source entropy production ∆ i S sd [y] = − 1 2Aτ 0 [y(t) 2 − y(0) 2 ] − ln p st (y(t)) p st (y(0)) = 0, (C. 6) which vanishes because the driving is a Gaussian process always relaxing to an effective equilibrium. Introducing the final state vector U = (x(t), y(t)) T , the initial state vector U 0 = (x(0), y(0)) T , and the stationary probability distribution with H 1 = Dτ 0 δ(1 + δ) 1 + δ + θδ 2 θδ 2 θδ 2 θδ + θδ 2 , (C.8) the entropy production becomes We defined the matrix R = 1 Dθτ 0 δθ 0 0 1 . (C. 10) In Ref. [37], the generating function of the first term on the right hand side of (C.9) was obtained for a given initial and final state. The entropy production modifies this quantity by a boundary term which only depends on U 0 and U. Using the result of Ref. [37], we obtain the following expression for the generating function of the entropy production (which is equal to the dissipated work) at large time t: e µ∆ i S = g µ e tφµ , (C.11) The exponential pre-factor g µ is important if the generating function has non analyticities in the region where the saddle approximation is done to find the large deviation function. Using again the results of reference [37], we find the following exponential pre-factor g µ = 4ν µ (1 + ν µ ) 2 . (C.14) The work fluctuation theorem follows from (C.12) since g −1−µ = g µ and φ −1−µ = φ µ . As for the two-level system, this theorem is satisfied because the stochastic driving is reversible, see (C.6).