Open Access
This article is

- freely available
- re-usable

*Entropy*
**2017**,
*19*(7),
379;
doi:10.3390/e19070379

Article

An Application of Pontryagin’s Principle to Brownian Particle Engineered Equilibration

^{1}

Department of Mathematics and Statistics, University of Helsinki, P.O. Box 68, FIN-00014 Helsinki, Finland

^{2}

iteratec GmbH, Zettachring 6, 70567 Stuttgart, Germany

^{*}

Author to whom correspondence should be addressed.

Received: 3 July 2017 / Accepted: 20 July 2017 / Published: 24 July 2017

## Abstract

**:**

We present a stylized model of controlled equilibration of a small system in a fluctuating environment. We derive the optimal control equations steering in finite-time the system between two equilibrium states. The corresponding thermodynamic transition is optimal in the sense that it occurs at minimum entropy if the set of admissible controls is restricted by certain bounds on the time derivatives of the protocols. We apply our equations to the engineered equilibration of an optical trap considered in a recent proof of principle experiment. We also analyze an elementary model of nucleation previously considered by Landauer to discuss the thermodynamic cost of one bit of information erasure. We expect our model to be a useful benchmark for experiment design as it exhibits the same integrability properties of well-known models of optimal mass transport by a compressible velocity field.

Keywords:

fluctuation phenomena; random processes; noise and Brownian motion; nonequilibrium and irreversible thermodynamics; control theory; stochastic processesPACS:

05.40.-a; 05.70.Ln; 02.30.Yy; 02.50.Ey## 1. Introduction

An increasing number of applications in micro- and sub-micro-scale physics calls for the development of general techniques for engineered finite-time equilibration of systems operating in a thermally-fluctuating environment. Possible concrete examples are the design of nano-thermal engines [1,2] or of micro-mechanical oscillators used for high precision timing or sensing of mass and forces [3].

A recent experiment [4] exhibited the feasibility of driving a micro-system between two equilibria over a control time several orders of magnitude faster than the natural equilibration time. The system was a colloidal micro-sphere trapped in an optical potential. There is consensus that non-equilibrium thermodynamics (see, e.g., [5]) of optically-trapped micron-sized beads is well captured by Langevin–Smoluchowski equations [6]. In particular, the authors of [4] took care of showing that it is accurate to conceptualize the outcome of their experiment as the evolution of a Gaussian probability density according to a controlled Langevin–Smoluchowski dynamics with gradient drift and constant diffusion coefficient. Finite time equilibration means that at the end of the control horizon, the probability density is the solution of the stationary Fokker–Planck equation. The experimental demonstration consisted of a compression of the confining potential. In such a case, the protocol steering the equilibration process is specified by the choice of the time evolution of the stiffness of the quadratic potential whose gradient yields the drift in the Langevin–Smoluchowski equation. As a result, the set of admissible controls is infinite. The selection of the control in [4] was then based on simplicity of implementation considerations.

A compelling question is whether and how the selection of the protocol may stem from a notion of optimal efficiency. A natural indicator of efficiency in finite-time thermodynamics is entropy production. Transitions occurring at minimum entropy production set a lower bound in the Clausius inequality. Optimal control of these transitions is, thus, equivalent to a refinement of the second law of thermodynamics in the form of an equality.

In the Langevin–Smoluchowski framework, entropy production optimal control takes a particularly simple form if states at the end of the transition are specified by sufficiently regular probability densities [7]. Namely, the problem admits an exact mapping into the well-known Monge–Kantorovich optimal mass transport [8]. This feature is particularly useful because the dynamics of the Monge–Kantorovich problem is exactly solvable. Mass transport occurs along free-streaming Lagrangian particle trajectories. These trajectories satisfy boundary conditions determined by the map, called the Lagrangian map, transforming into each other the data of the problem, the initial and the final probability densities. Rigorous mathematical results [9,10,11] preside over the existence, qualitative properties and reconstruction algorithms for the Lagrangian map.

The aforementioned results cannot be directly applied to optimal protocols for engineered equilibration. Optimal protocols in finite-time unavoidably attain minimum entropy by leaving the end probability densities out of equilibrium. The qualitative reason is that optimization is carried over the set of drifts sufficiently smooth to mimic all controllable degrees of freedom of the micro-system. Controllable degrees of freedom are defined as those varying over typical time scales much slower than the time scales of Brownian forces [12]. The set of admissible protocols defined in this way is too large for optimal engineered equilibration. The set of admissible controls for equilibration must take into account also extra constraints coming from the characteristic time scales of the forces acting on the system. From the experimental slant, we expect these restrictions to be strongly contingent on the nature and configuration of peripherals in the laboratory setup. From the theoretical point of view, the self-consistence of Langevin–Smoluchowski modeling imposes a general restriction. The time variation of drift fields controlling the dynamics must be slow in comparison to Brownian and inertial forces.

In the present contribution, we propose a refinement of the entropy production optimal control adapted to engineered equilibration. We do this by restricting the set of admissible controls to those satisfying a non-holonomic constraint on accelerations. The constraint relates the bound on admissible accelerations to the path-wise displacement of the system degrees of freedom across the control horizon. Such displacement is a deterministic quantity, intrinsically stemming from the boundary conditions inasmuch as we determine it from the Lagrangian map.

This choice of the constraint has several inherent advantages. It yields an intuitive hold on the realizability of the optimal process. It also preserves the integrability properties of the optimal control problem specifying the lower bound to the second law. This is so because the constraint allows us to maintain protocols within the admissible set by exerting on them uniform accelerating or decelerating forces. On the technical side, the optimal control problem can be handled by a direct application of the Pontryagin maximum principle [13]. For the same reasons as for the refinement of the second law [7], the resulting optimal control is of the deterministic type. This circumstance yields a technical simplification, but it is not a necessary condition in view of extensions of our approach. We will return to this point in the conclusions.

The structure of the paper is as follows. In Section 2 we briefly review the Langevin–Smoluchowski approach to non-equilibrium thermodynamics [14]. This section can be skipped by readers familiar with the topic. In Section 3, we introduce the problem of optimizing the entropy production. In particular we explain its relation with the Schrödinger diffusion problem [15,16]. This relation, already pointed out in [17], has recently attracted the attention of mathematicians and probabilists interested in rigorous application of variational principles in hydrodynamics [18]. In Section 4, we formulate the Pontryagin principle for our problem. Our main result follows in Section 5, where we solve in explicit form the optimal protocols. Section 6 and Section 7 are devoted to applications. In Section 6, we revisit the theoretical model of the experiment [4], the primary motivation of our work. In Section 7, we apply our results to a stylized model of controlled nucleation obtained by manipulating a double-well potential. Landauer and Bennett availed themselves of this model to discuss the existence of an intrinsic thermodynamic cost of computing [19,20]. Optimal control of this model has motivated in more recent years in several theoretical [21] and experimental works [22,23,24].

Finally, in Section 8, we compare the optimal control we found with those of [25]. This reference applied a regularization technique coming from instanton calculus [26] to give a precise meaning to otherwise ill-defined problems in non-equilibrium thermodynamics, where terminal cost seems to depend on the control rather than being a given function of the final state of the system.

In the conclusions, we discuss possible extensions of the present work. The style of the presentation is meant to be discursive, but relies on notions in between non-equilibrium physics, optimal control theory and probability theory. For this reason, we include in the Appendices some auxiliary information as a service to the interested reader.

## 2. Kinematics and Thermodynamics of the Model

We consider a physical process in a d-dimensional Euclidean space (${\mathbb{R}}^{d}$) modeled by a Langevin–Smoluchowski dynamics:

$$\begin{array}{c}\hfill \mathrm{d}{\mathbf{\xi}}_{t}=-{\partial}_{{\mathbf{\xi}}_{t}}U({\mathbf{\xi}}_{t},t)\phantom{\rule{0.166667em}{0ex}}\mathrm{d}t+\sqrt{\frac{2}{\beta}}\phantom{\rule{0.166667em}{0ex}}\mathrm{d}{\mathbf{\omega}}_{t}\end{array}$$

The stochastic differential $\mathrm{d}{\mathbf{\omega}}_{t}$ stands here for the increment of a standard d-dimensional Wiener process at time t [6]. $U:{\mathbb{R}}^{d}\otimes \mathbb{R}\mapsto \mathbb{R}$ denotes a smooth scalar potential, and ${\beta}^{-1}$ is a constant sharing the same canonical dimensions as U. We also suppose that the initial state of the system is specified by a smooth probability density:

$$\begin{array}{c}\hfill \mathrm{P}(\mathit{q}\le {\mathbf{\xi}}_{{t}_{\iota}}<\mathit{q}+\mathrm{d}\mathit{q})={\mathrm{p}}_{\iota}\left(\mathit{q}\right){\mathrm{d}}^{d}\mathit{q}\end{array}$$

Under rather general hypotheses, the Langevin–Smoluchowski Equation (1) can be derived as the scaling limit of the overdamped non-equilibrium dynamics of a classical system weakly coupled to a heat bath [27]. The Wiener process in (1) thus embodies thermal fluctuations of order ${\beta}^{-1}$. The fundamental simplification entailed by (1) is the possibility to establish a framework of elementary relations linking the dynamical to the statistical levels of description of a non-equilibrium process [14,28]. In fact, the kinematics of (1) ensures that for any time-autonomous, confining potential, the dynamics tends to a unique Boltzmann equilibrium state.

$$\begin{array}{c}\hfill {\mathrm{p}}_{\mathrm{eq}}\left(\mathit{q}\right)\propto exp(-\beta \phantom{\rule{0.166667em}{0ex}}U\left(\mathit{q}\right))\end{array}$$

Building on the foregoing observations [14], we may then identify U over a finite-time horizon with the internal energy of the system. The differential of U:
yields the energy balance in the presence of thermal fluctuations due to interactions with the environment. We use the notation $\stackrel{{\scriptscriptstyle 1/2}}{\xb7}$ for the Stratonovich differential [6]. From (3), we recover the first law of thermodynamics by averaging over the realizations of the Wiener process. In particular, we interpret:
as the average work done on the system. Correspondingly,
is the average heat discarded by the system into the heat bath, and therefore:
is the embodiment of the first law.

$$\begin{array}{c}\hfill \mathrm{d}U({\mathbf{\xi}}_{t},t)=\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{\partial}_{t}U({\mathbf{\xi}}_{t},t)+\mathrm{d}{\mathbf{\xi}}_{t}\stackrel{{\scriptscriptstyle 1/2}}{\xb7}{\partial}_{{\mathbf{\xi}}_{t}}U({\mathbf{\xi}}_{t},t)\end{array}$$

$$\begin{array}{c}\hfill \mathcal{W}=\mathrm{E}{\int}_{{t}_{o}}^{{t}_{f}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{\partial}_{t}U({\mathbf{\xi}}_{t},t)\end{array}$$

$$\begin{array}{c}\hfill \mathcal{Q}=-\mathrm{E}{\int}_{{t}_{o}}^{{t}_{f}}\mathrm{d}{\mathbf{\xi}}_{t}\stackrel{{\scriptscriptstyle 1/2}}{\xb7}{\partial}_{{\mathbf{\xi}}_{t}}U({\mathbf{\xi}}_{t},t)\end{array}$$

$$\begin{array}{c}\hfill \mathcal{W}-\mathcal{Q}=E(U({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})-U({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}}))\end{array}$$

The kinematics of stochastic processes [29] allows us also to write a meaningful expression for the second law of thermodynamics. The expectation value of a Stratonovich differential is in general amenable to the form:
where:
is the current velocity. For a potential drift, the current velocity vanishes identically at equilibrium. As is well known from stochastic mechanics [30,31], the current velocity permits couching the Fokker–Planck equation into the form of a deterministic mass transport equation (see also Appendix B). Hence, upon observing that:
we can recast (7) into the form:
which we interpret as the second law of thermodynamics (see, e.g., [32]). Namely, if we define $\mathcal{E}=\beta \phantom{\rule{0.166667em}{0ex}}{\mathcal{Q}}_{T}$ as the total entropy change in $\left[{t}_{\iota}\phantom{\rule{0.166667em}{0ex}}{t}_{\mathit{f}}\right]$, (10) states that the sum of the entropy generated by heat released into the environment plus the change of the Gibbs–Shannon entropy of the system is positive definite and vanishes only at equilibrium. The second law in the form (10) immediately implies a bound on the average work done on the system. To evince this fact, we avail ourselves of the equality:
and define the current velocity potential:

$$\begin{array}{c}\hfill \mathcal{Q}=-\mathrm{E}{\int}_{{t}_{\iota}}^{{t}_{f}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}(\mathit{v}\xb7{\partial}_{{\mathbf{\xi}}_{t}}U)({\mathbf{\xi}}_{t},t)\end{array}$$

$$\begin{array}{c}\hfill \mathit{v}(\mathit{q},t)=-{\partial}_{\mathit{q}}\left(U(\mathit{q},t)+\frac{1}{\beta}ln\mathrm{p}(\mathit{q},t)\right)\end{array}$$

$$\begin{array}{c}\hfill \mathrm{E}{\int}_{{t}_{\iota}}^{{t}_{f}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}(\mathit{v}\xb7{\partial}_{{\mathbf{\xi}}_{t}}ln\mathrm{p})({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})=\mathrm{E}{\int}_{{t}_{\iota}}^{{t}_{f}}\mathrm{d}t\left({\partial}_{t}+{\mathit{v}}_{t}\xb7{\partial}_{{\mathbf{\xi}}_{t}}\right)ln\mathrm{p}({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})=\mathrm{E}ln\frac{\mathrm{p}({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})}{\mathrm{p}({\mathbf{\xi}}_{{t}_{\iota}},{t}_{\iota})}\end{array}$$

$$\begin{array}{c}\hfill {\mathcal{Q}}_{T}=\mathcal{Q}-\frac{1}{\beta}\mathrm{E}ln\frac{\mathrm{p}({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})}{\mathrm{p}({\mathbf{\xi}}_{{t}_{\iota}},{t}_{\iota})}=\mathrm{E}{\int}_{{t}_{\iota}}^{{t}_{f}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{\parallel \mathit{v}({\mathbf{\xi}}_{t},t)\parallel}^{2}\end{array}$$

$$\begin{array}{c}\hfill \mathcal{W}=\mathrm{E}\left(U({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})-U({\mathbf{\xi}}_{{t}_{\iota}},{t}_{\iota})+\frac{1}{\beta}ln\frac{\mathrm{p}({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})}{\mathrm{p}({\mathbf{\xi}}_{{t}_{\iota}},{t}_{\iota})}\right)+{\mathcal{Q}}_{T}\end{array}$$

$$\begin{array}{c}\hfill F(\mathit{q},t)=U(\mathit{q},t)+\frac{1}{\beta}ln\mathrm{p}(\mathit{q},t)\end{array}$$

We then obtain:

$$\begin{array}{c}\hfill \mathcal{W}=\mathrm{E}(F({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})-F({\mathbf{\xi}}_{{t}_{\iota}},{t}_{\iota}))+{\mathcal{Q}}_{T}\ge \mathrm{E}(F({\mathbf{\xi}}_{{t}_{\mathit{f}}},{t}_{\mathit{f}})-F({\mathbf{\xi}}_{{t}_{\iota}},{t}_{\iota}))\end{array}$$

In equilibrium thermodynamics, the Helmholtz free energy is defined as the difference:
between the internal energy $\mathcal{U}$ and entropy $\mathcal{S}$ of a system at temperature ${\beta}^{-1}$. This relation admits a non-equilibrium extension by noticing that the information content [33] of the system probability density:
weighs the contribution of individual realizations of (1) to the Gibbs–Shannon entropy. We refer to [29] for the kinematic and thermodynamic interpretation of the information content as the osmotic potential. We also emphasize that the notions above can be given an intrinsic meaning using the framework of stochastic differential geometry [17,31]. Finally, it is worth noticing that the above relations can be regarded as a special case of macroscopic fluctuation theory [34].

$$\begin{array}{c}\hfill \mathcal{F}=\mathcal{U}-{\beta}^{-1}\phantom{\rule{0.166667em}{0ex}}\mathcal{S}\end{array}$$

$$\begin{array}{c}\hfill S(\mathit{q},t)=-ln\mathrm{p}(\mathit{q},t)\end{array}$$

## 3. Non-Equilibrium Thermodynamics and Schrödinger Diffusion

We are interested in thermodynamic transitions between an initial state (2) at time ${t}_{\iota}$ and a pre-assigned final state at time ${t}_{\mathit{f}}$ also specified by a smooth probability density:

$$\begin{array}{c}\hfill \mathrm{P}(\mathit{q}\le {\mathbf{\xi}}_{{t}_{\mathit{f}}}<\mathit{q}+\mathrm{d}\mathit{q})={\mathrm{p}}_{\mathit{f}}\left(\mathit{q}\right){\mathrm{d}}^{d}\mathit{q}\end{array}$$

We also suppose that the cumulative distribution functions of (2) and (12) are related by a Lagrangian map $\mathit{\ell}:{\mathbb{R}}^{d}\mapsto {\mathbb{R}}^{d}$ such that:

$$\begin{array}{c}\hfill \mathrm{P}({\mathbf{\xi}}_{{t}_{\iota}}<\mathit{q})=\mathrm{P}({\mathbf{\xi}}_{{t}_{\mathit{f}}}<\mathit{\ell}\left(\mathit{q}\right))\end{array}$$

According to the Langevin–Smoluchowski dynamics (1), the evolution of probability densities obeys a Fokker–Planck equation, a first order in time partial differential equation. As a consequence, the price we pay to steer transitions between assigned states is to regard the drift in (1) not as an assigned quantity, but as a control. A priori, a control is only implicitly characterized by the set of conditions that make it admissible. Informally speaking, admissible controls are all those drifts steering the process $\left\{{\mathbf{\xi}}_{t},t\in [{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]\right\}$ between the assigned end states (2) and (12) while ensuring that at any time $t\in [{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]$, the Langevin–Smoluchowski dynamics remains well defined.

Schrödinger [15] considered already in 1931 the problem of controlling a diffusion process between assigned states. His work was motivated by the quest for a statistical interpretation of quantum mechanics. In modern language [35,36], the problem can be rephrased as follows. Given (2) and (12) and a reference diffusion process, determine the diffusion process interpolating between (2) and (12) while minimizing the value of its Kullback–Leibler divergence (relative entropy) [37] with respect to the reference process. A standard application (Appendix A) of the Girsanov formula [6] shows that the Kullback–Leibler divergence of (1) with respect to the Wiener process is:
$\mathrm{P}$ and ${\mathrm{P}}_{\mathbf{\omega}}$ denote respectively the measures of the process solution of (1) with drift $-{\partial}_{\mathit{q}}U(\mathit{q},t)$ and of the Wiener process $\mathbf{\omega}$. The expectation value on the right-hand side is with respect to $\mathrm{P}$ as elsewhere in the text. A now well-established result in optimal control theory (see, e.g., [35,36]) is that the optimal value of the drift satisfies a backward Burgers equation with the terminal condition specified by the solution of the Beurling–Jamison integral equations. We refer to [35,36] for further details. What interests us here is to emphasize the analogy with the problem of minimizing the entropy production $\mathcal{E}$ in a transition between assigned states.

$$\begin{array}{c}\hfill \mathcal{K}(\mathrm{P}\parallel {\mathrm{P}}_{\omega})=\frac{\beta}{2}E{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{\parallel {\partial}_{{\mathbf{\xi}}_{t}}U({\mathbf{\xi}}_{t},t)\parallel}^{2}\end{array}$$

Several observations are in order at this stage.

The first observation is that also (10) can be directly interpreted as a Kullback–Leibler divergence between two probability measures. Namely, we can write (Appendix A):
for ${P}_{R}$ the path-space measure of the process:
evolving backward in time from the final condition (12) [38,39].

$$\begin{array}{c}\hfill \mathcal{K}(P\parallel {P}_{R})=\frac{\beta}{2}E{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{\parallel \mathit{v}({\mathbf{\xi}}_{t},t)\parallel}^{2}\end{array}$$

$$\begin{array}{c}\hfill \mathrm{d}{\mathbf{\xi}}_{t}={\partial}_{{\mathbf{\xi}}_{t}}U({\mathbf{\xi}}_{t},t)\phantom{\rule{0.166667em}{0ex}}\mathrm{d}t+\sqrt{\frac{2}{\beta}}\phantom{\rule{0.166667em}{0ex}}\mathrm{d}{\mathbf{\omega}}_{t}\end{array}$$

The second observation has more far reaching consequences for optimal control. The entropy production depends on the drift of (1) exclusively through the current velocity (8). Hence, we can treat the current velocity itself as the natural control quantity for (15). This fact entails major simplifications [7]. The current velocity can be thought of as deterministic rather than as a stochastic velocity field (see [29] and Appendix B). Thus, we can couch the optimal control of (15) into the problem of minimizing the kinetic energy of a classical particle traveling from an initial position $\mathit{q}$ at time ${t}_{\iota}$ and a final position $\mathit{\ell}\left(\mathit{q}\right)$ at time ${t}_{\mathit{f}}$ specified by the Lagrangian map ℓ (13). In other words, entropy production minimization in the Langevin–Smoluchowski framework is equivalent to solving a classical optimal transport problem [8].

The third observation comes as a consequence of the second one. The optimal value of the entropy production is equal to the Wasserstein distance [40] between the initial and final probability measures of the system; see [41] for details. This fact yields a simple characterization of the Landauer bound and permits a fully-explicit analysis of the thermodynamics of stylized isochoric micro-engines (see [42] and the references therein).

## 4. Pontryagin’s Principle for Bounded Accelerations

An important qualitative feature of the solution of the optimal control of the entropy production is that the system starts from (2) and reaches (12) with non-vanishing current velocity. This means that the entropy production attains a minimum value when the end-states of the transition are out-of-equilibrium. We refer to this lower bound as the refinement of the second law.

Engineered equilibration transitions are, however, subject to at least two further types of constraints not taken into account in the derivation of the refined second law. The first type of constraint is on the set of admissible controls. For example, admissible controls cannot vary in an arbitrary manner: the fastest time scale in the Langevin–Smoluchowski dynamics is set by the Wiener process. The second type is that end-states are at equilibrium. In mathematical terms, this means that the current velocity must vanish identically at ${t}_{\iota}$ and ${t}_{\mathit{f}}$.

We formalize a deterministic control problem modeling these constraints. Our goal is to minimize the functional:
over the set of trajectories generated for any given choice of the measurable control ${\mathbf{\alpha}}_{t}$ by the differential equation:
satisfying the boundary conditions:

$$\begin{array}{c}\hfill \mathcal{E}={\int}_{{t}_{\iota}}^{{t}_{f}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}\beta \phantom{\rule{0.166667em}{0ex}}{\parallel {\mathbf{\nu}}_{t}\parallel}^{2}\end{array}$$

$$\begin{array}{cc}\hfill {\dot{\mathbf{\chi}}}_{t}& ={\mathbf{\nu}}_{t}\hfill \end{array}$$

$$\begin{array}{cc}\hfill {\dot{\mathbf{\nu}}}_{t}& ={\mathbf{\alpha}}_{t}\hfill \end{array}$$

$$\begin{array}{c}\hfill {\mathbf{\chi}}_{{t}_{\iota}}=\mathit{q}\phantom{\rule{28.45274pt}{0ex}}\&\phantom{\rule{28.45274pt}{0ex}}{\mathbf{\chi}}_{{t}_{\mathit{f}}}=\mathit{\ell}\left(\mathit{q}\right)\end{array}$$

We dub the dynamical variable ${\mathbf{\chi}}_{t}$ the running Lagrangian map as it describes the evolution of the Lagrangian map within the control horizon. We restrict the set of admissible controls $\mathbb{A}=\left\{{\mathbf{\alpha}}_{t},t\in [{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]\right\}$ to those enforcing equilibration at the boundaries of the control horizon:
whilst satisfying the bound:

$$\begin{array}{c}\hfill {\mathbf{\nu}}_{{t}_{\iota}}=0\phantom{\rule{28.45274pt}{0ex}}\&\phantom{\rule{28.45274pt}{0ex}}{\mathbf{\nu}}_{{\mathbf{t}}_{\mathit{f}}}=0\end{array}$$

$$\begin{array}{c}\hfill |{\mathbf{\alpha}}_{t}^{\left(i\right)}|\le \frac{{K}^{\left(i\right)}\left(\mathit{q}\right)}{{({t}_{\mathit{f}}-{t}_{\iota})}^{2}}\phantom{\rule{28.45274pt}{0ex}}\forall \phantom{\rule{0.166667em}{0ex}}t\in [{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]\phantom{\rule{28.45274pt}{0ex}}\forall \phantom{\rule{0.166667em}{0ex}}i=1,\cdots ,d\end{array}$$

We suppose that the ${K}^{\left(i\right)}\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}>\phantom{\rule{0.166667em}{0ex}}0$$i=1,\cdots ,d$ are strictly positive functions of the initial data $\mathit{q}$ of the form:

$$\begin{array}{c}\hfill {K}^{\left(i\right)}\left(\mathit{q}\right)\propto |{\mathit{\ell}}^{\left(i\right)}\left(\mathit{q}\right)-{\mathit{q}}^{\left(i\right)}|\end{array}$$

The constraint is non-holonomic inasmuch as it depends on the initial data of a trajectory. The proportionality (22) relates the bound on acceleration to the Lagrangian displacement needed to satisfy the control problem. Finally, we emphasize that the rate of change ${\mathbf{\nu}}_{t}$ of the running Lagrangian map is related to the current velocity (8) by a standard change of hydrodynamic coordinates from Lagrangian to Eulerian, which we write explicitly in formula (33) below.

We resort to the Pontryagin principle [13] to find normal extremals of (17). We defer the statement of the Pontryagin principle, as well as the discussion of abnormal extremals to Appendix C. We proceed in two steps. We first avail ourselves of Lagrange multipliers to define the effective cost functional:
subject to the boundary conditions (19) and (20). Then, we couch the cost functional into an explicit Hamiltonian form:
with:

$$\begin{array}{c}\hfill \mathcal{A}={\int}_{{t}_{\iota}}^{{t}_{f}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}(\beta \phantom{\rule{0.166667em}{0ex}}\parallel {\mathbf{\nu}}_{t}{\parallel}^{2}+{\mathbf{\eta}}_{t}\xb7\left({\dot{\mathbf{\chi}}}_{t}-{\mathbf{\nu}}_{t}\right)+{\mathbf{\theta}}_{t}\xb7\left({\dot{\mathbf{\nu}}}_{t}-{\mathbf{\alpha}}_{t}\right))\end{array}$$

$$\begin{array}{c}\hfill \mathcal{A}={\int}_{{t}_{\iota}}^{{t}_{f}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}({\mathbf{\eta}}_{t}\xb7{\dot{\mathbf{\chi}}}_{t}+{\mathbf{\theta}}_{t}\xb7{\dot{\mathbf{\nu}}}_{t}-H({\mathbf{\chi}}_{t},{\mathbf{\nu}}_{t},{\mathbf{\eta}}_{t},{\mathbf{\theta}}_{t},{\mathbf{\alpha}}_{t}))\end{array}$$

$$\begin{array}{c}\hfill H({\mathbf{\chi}}_{t},{\mathbf{\nu}}_{t},{\mathbf{\eta}}_{t},{\mathbf{\theta}}_{t},{\mathbf{\alpha}}_{t})={\mathbf{\eta}}_{t}\xb7{\mathbf{\nu}}_{t}+{\mathbf{\theta}}_{t}\xb7{\mathbf{\alpha}}_{t}-\beta \phantom{\rule{0.166667em}{0ex}}\parallel {\mathbf{\nu}}_{t}{\parallel}^{2}\end{array}$$

Pontryagin’s principle yields a rigorous proof of the intuition that extremals of the optimal control equations correspond to stationary curves of the action (23) with Hamiltonian:

$$\begin{array}{c}\hfill {H}_{\star}({\mathbf{\chi}}_{t},{\mathbf{\nu}}_{t},{\mathbf{\eta}}_{t},{\mathbf{\theta}}_{t})=\underset{\mathbf{\alpha}\in \mathbb{A}}{max}H({\mathbf{\chi}}_{t},{\mathbf{\nu}}_{t},{\mathbf{\eta}}_{t},{\mathbf{\theta}}_{t},{\mathbf{\alpha}}_{t})={\mathbf{\eta}}_{t}\xb7{\mathbf{\nu}}_{t}+\frac{{\sum}_{i=1}^{d}{K}^{\left(i\right)}\left|{\theta}_{t}^{\left(i\right)}\right|}{{({t}_{\mathit{f}}-{t}_{\iota})}^{2}}-\beta \phantom{\rule{0.166667em}{0ex}}{\parallel {\mathbf{\nu}}_{t}\parallel}^{2}\end{array}$$

In view of the boundary conditions (19), (20), extremals satisfy the Hamilton system of equations formed by (18a) and:

$$\begin{array}{c}\hfill {\dot{\mathbf{\nu}}}_{t}^{\left(i\right)}={\partial}_{{\mathbf{\theta}}_{t}}{H}_{\star}=\frac{{K}^{\left(i\right)}}{{({t}_{\mathit{f}}-{t}_{\iota})}^{2}}sgn{\theta}_{t}^{\left(i\right)}\end{array}$$

$$\begin{array}{c}\hfill {\dot{\mathbf{\eta}}}_{t}=-{\partial}_{{\mathbf{\chi}}_{t}}{H}_{\star}=0\end{array}$$

$$\begin{array}{c}\hfill {\dot{\mathbf{\theta}}}_{t}=-{\partial}_{{\mathbf{\nu}}_{t}}{H}_{\star}=-{\mathbf{\eta}}_{t}+2\phantom{\rule{0.166667em}{0ex}}\beta \phantom{\rule{0.166667em}{0ex}}{\mathbf{\nu}}_{t}\end{array}$$

In writing (24a), we adopt the convention:

$$\begin{array}{c}\hfill sgn0=0\end{array}$$

## 5. Explicit Solution in the $\mathbf{1}\mathit{d}$ Case

The extremal Equations (18a) and (24) are time-autonomous and do not couple distinct vector components. It is therefore not too restrictive to focus on the $d=1$ case in the time horizon $[0,T]$.

The Hamilton equations are compatible with two behaviors: a “push-region” where the running Lagrangian map variable evolves with constant acceleration:

$$\begin{array}{c}\hfill {\ddot{\chi}}_{t}=\frac{K}{{T}^{2}}sgn{\theta}_{t}\phantom{\rule{28.45274pt}{0ex}}\&\phantom{\rule{28.45274pt}{0ex}}{\theta}_{t}\ne 0\end{array}$$

and a “no-action” region specified by the conditions:
where ${\chi}_{t}$ follows a free streaming trajectory:

$$\begin{array}{c}\hfill {\theta}_{t}=0\phantom{\rule{28.45274pt}{0ex}}\&\phantom{\rule{28.45274pt}{0ex}}-{\mathbf{\eta}}_{\star}+2\phantom{\rule{0.166667em}{0ex}}\beta \phantom{\rule{0.166667em}{0ex}}{\mathbf{\nu}}_{\star}=0\end{array}$$

$$\begin{array}{c}\hfill {\dot{\chi}}_{t}={\mathbf{\nu}}_{\star}\end{array}$$

We call switching times the values of t corresponding to the boundary values of a no-action region. Switching times correspond to discontinuities of the acceleration ${\alpha}_{t}$. Drawing from the intuition offered by the solution of the unbounded acceleration case, we compose push and no-action regions to construct a single solution trajectory satisfying the boundary conditions. If we surmise that during the control horizon, only two switching times occur, we obtain:

$$\begin{array}{c}\hfill {\nu}_{t}=\left\{\begin{array}{cc}{\displaystyle \frac{K}{{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{0}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[0,{t}_{1})\hfill \\ {\displaystyle \frac{K\phantom{\rule{0.166667em}{0ex}}{t}_{1}}{{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{0}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[{t}_{1},{t}_{2}]\hfill \\ {\displaystyle \frac{K}{{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}\left({t}_{1}\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{0}+(t-{t}_{2})\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{T}\right)\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}({t}_{2},T]\hfill \end{array}\right.\end{array}$$

which implies:

$$\begin{array}{c}\hfill {\theta}_{t}=\left\{\begin{array}{cc}{\theta}_{0}-{\displaystyle \frac{\beta \phantom{\rule{0.166667em}{0ex}}K\phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}(2\phantom{\rule{0.166667em}{0ex}}{t}_{1}-t)}{{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{0}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[0,{t}_{1})\hfill \\ 0\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[{t}_{1},{t}_{2}]\hfill \\ {\displaystyle \frac{K\phantom{\rule{0.166667em}{0ex}}{(t-{t}_{2})}^{2}}{{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{T}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}({t}_{2},T]\hfill \end{array}\right.\end{array}$$

The self-consistence of the solution fixes the initial data in (27):
whilst the requirement of vanishing velocity at $t=T$ determines the relation between the switching times:

$$\begin{array}{c}\hfill {\theta}_{0}={\displaystyle \frac{\beta \phantom{\rule{0.166667em}{0ex}}K\phantom{\rule{0.166667em}{0ex}}{t}_{1}^{2}}{{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{0}\end{array}$$

$$\begin{array}{c}\hfill {t}_{2}=T+\frac{sgn{\theta}_{0}}{sgn{\theta}_{T}}{t}_{1}\end{array}$$

Self-consistence then dictates:

$$\begin{array}{c}\hfill sgn{\theta}_{{t}_{\mathit{f}}}=-sgn{\theta}_{{t}_{0}}\end{array}$$

We are now ready to glean the information we unraveled by solving (24), to write the solution of (18a):

$$\begin{array}{c}\hfill {\chi}_{t}=\mathit{q}+\left\{\begin{array}{cc}{\displaystyle \frac{K\phantom{\rule{0.166667em}{0ex}}{t}^{2}}{2\phantom{\rule{0.166667em}{0ex}}{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{0}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[0,{t}_{1})\hfill \\ {\displaystyle \frac{K\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(2\phantom{\rule{0.166667em}{0ex}}t-{t}_{1})}{2\phantom{\rule{0.166667em}{0ex}}{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}sgn{\theta}_{0}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[{t}_{1},T-{t}_{1}]\hfill \\ K{\displaystyle \frac{2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})-{(T-t)}^{2}}{2\phantom{\rule{0.166667em}{0ex}}{T}^{2}}}sgn{\theta}_{0}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}(T-{t}_{1},T]\hfill \end{array}\right.\end{array}$$

The terminal condition on ${\chi}_{t}$ fixes the values of ${t}_{1}$ and $sgn{\theta}_{{t}_{0}}$:

$$\begin{array}{c}\hfill \ell \left(\mathit{q}\right)=\mathit{q}+{\displaystyle \frac{K\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})}{{T}^{2}}}sgn{\theta}_{{t}_{0}}\end{array}$$

The equation for ${t}_{1}$ is well posed only if:

$$\begin{array}{c}\hfill sgn{\theta}_{{t}_{0}}=sgn(\ell \left(\mathit{q}\right)-\mathit{q})\end{array}$$

The only admissible solution is then of the form:

$$\begin{array}{c}\hfill {t}_{1}=\frac{T}{2}\left(1-\sqrt{1-4\phantom{\rule{0.166667em}{0ex}}\delta}\right)\end{array}$$

The switching time is independent of q in view of (22). It is realizable as long as:

$$\begin{array}{c}\hfill \delta =\frac{\left|\ell \right(\mathit{q})-\mathit{q}|}{K\left(\mathit{q}\right)}\phantom{\rule{0.166667em}{0ex}}\le \phantom{\rule{0.166667em}{0ex}}\frac{1}{4}\phantom{\rule{28.45274pt}{0ex}}\forall \phantom{\rule{0.166667em}{0ex}}\mathit{q}\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}\mathbb{R}\end{array}$$

The threshold value of $\delta $ corresponds to the acceleration needed to construct an optimal protocol consisting of two push regions matched at the half control horizon.

#### Qualitative Properties of the Solution

Equation (28) complemented by (29) and the realizability bound (31) fully specify the solution of the optimization problem we set out to solve. The solution is optimal because it is obtained by composing locally-optimal solutions for a Markovian dynamics. Qualitatively, it states that transitions between equilibrium states are possible at the price of the formation of symmetric boundary layers determined by the occurrence of the switching times. For $\delta \ll 1$, the relative size of the boundary layers is:

$$\begin{array}{c}\hfill \frac{{t}_{1}}{T}=\frac{T-{t}_{2}}{T}\approx \delta \end{array}$$

In the same limit, the behavior of the current velocity far from the boundaries tends to the optimal value of the refined second law [7]. Namely, for $t\in [{t}_{1}\phantom{\rule{0.166667em}{0ex}},{t}_{f}]$, we find:

$$\begin{array}{c}\hfill {\displaystyle \frac{K\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}{t}_{1}}{{T}^{2}}}\phantom{\rule{0.166667em}{0ex}}sgn(\ell \left(\mathit{q}\right)-\mathit{q})\stackrel{\delta \ll 1}{\approx}{\displaystyle \frac{K\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}\delta}{T}}sgn(\ell \left(\mathit{q}\right)-\mathit{q})=\frac{\ell \left(\mathit{q}\right)-\mathit{q}}{T}\end{array}$$

More generally, for any $0\le \phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}\le T/2$, we can couch (28) into the form:

$$\begin{array}{c}\hfill {\chi}_{t}=\mathit{q}+(\ell \left(\mathit{q}\right)-\mathit{q})\times \left\{\begin{array}{cc}{\displaystyle \frac{{t}^{2}}{2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})}}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[0,{t}_{1})\hfill \\ {\displaystyle \frac{2\phantom{\rule{0.166667em}{0ex}}t-{t}_{1}}{2\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[{t}_{1},T-{t}_{1}]\hfill \\ \left(1-{\displaystyle \frac{{(T-t)}^{2}}{2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})}}\right)\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}(T-{t}_{1},T]\hfill \end{array}\right.\end{array}$$

The use of the value of the switching time ${t}_{1}$ to parametrize the bound simplifies the derivation of the Eulerian representation of the current velocity. Namely, in order to find the field $v:\mathbb{R}\times [0,T]\mapsto \mathbb{R}$ satisfying:
We can invert (32) by taking advantage of the fact that all of the arguments of the curly brackets are independent of the position variable q.

$$\begin{array}{c}\hfill {\nu}_{t}=v({\chi}_{t},t)\end{array}$$

We also envisage that the representation (32) may be of use to analyze experimental data when finite measurement resolution may affect the precision with which microscopic forces acting on the system are known.

## 6. Comparison with Experimental Swift Engineering Protocols

The experiment reported in [4] showed that a micro-sphere immersed in water and trapped in an optical harmonic potential can be driven in finite-time from one equilibrium state to another. The probability distribution of the particle in and out of equilibrium remained Gaussian within the experimental accuracy.

It is therefore expedient to describe more in detail the solution of the optimal control problem in the case when the initial equilibrium distribution in one dimension is normal, i.e., Gaussian with zero mean and variance ${\beta}^{-1}$. We also assume that the final equilibrium state is Gaussian and satisfies (13) with Lagrangian map:

$$\begin{array}{c}\hfill \ell \left(\mathit{q}\right)=\sigma \phantom{\rule{0.166667em}{0ex}}\mathit{q}+h\end{array}$$

The parameters h and $\sigma $ respectively describe a change of the mean and of the variance of the distribution. We apply (13) and (32) for any $t\in [0,T]$ to derive the minimum entropy production evolution of the probability density. As a consequence of (22), the running Lagrangian map leaves Gaussian distributions invariant in form with mean value:

$$\begin{array}{c}\hfill E{\xi}_{t}=h\times \left\{\begin{array}{cc}{\displaystyle \frac{{t}^{2}}{2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})}}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[0,{t}_{1})\hfill \\ {\displaystyle \frac{(2\phantom{\rule{0.166667em}{0ex}}t-{t}_{1})}{2\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}[{t}_{1},T-{t}_{1}]\hfill \\ {\displaystyle \frac{2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})-{(T-t)}^{2}}{2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})}}\phantom{\rule{14.22636pt}{0ex}}\hfill & \phantom{\rule{14.22636pt}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\in \phantom{\rule{0.166667em}{0ex}}(T-{t}_{1},T]\hfill \end{array}\right.\end{array}$$

and variance:

$$\begin{array}{c}\hfill V{\xi}_{t}=\left\{\begin{array}{cc}{\displaystyle \frac{{\left(2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})+(\sigma -1)\phantom{\rule{0.166667em}{0ex}}{t}^{2}\right)}^{2}}{4\phantom{\rule{0.166667em}{0ex}}\beta \phantom{\rule{0.166667em}{0ex}}{t}_{1}^{2}\phantom{\rule{0.166667em}{0ex}}{(T-{t}_{1})}^{2}}}\hfill & t\in [0,{t}_{1})\hfill \\ {\displaystyle \frac{(2\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})+(\sigma -1)(2\phantom{\rule{0.166667em}{0ex}}t-{t}_{1}){)}^{2}}{4\phantom{\rule{0.166667em}{0ex}}\beta \phantom{\rule{0.166667em}{0ex}}{(T-{t}_{1})}^{2}}}\hfill & t\in [{t}_{1},T-{t}_{1}]\hfill \\ {\displaystyle \frac{(2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})+(\sigma -1)(2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})-{(T-t)}^{2}){)}^{2}}{4\phantom{\rule{0.166667em}{0ex}}\beta \phantom{\rule{0.166667em}{0ex}}{t}_{1}^{2}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{(T-{t}_{1})}^{2}}}\hfill & t\in (T-{t}_{1},T]\hfill \end{array}\right.\end{array}$$

Finally, we find that the Eulerian representation (33) of the current velocity at ${\chi}_{t}=\mathit{q}$ is:

$$\begin{array}{c}\hfill v(\mathit{q},t)=\left\{\begin{array}{cc}{\displaystyle \frac{2\phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}(h+\mathit{q}\phantom{\rule{0.166667em}{0ex}}(\sigma -1\left)\right)}{2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})+(\sigma -1)\phantom{\rule{0.166667em}{0ex}}{t}^{2}}}\hfill & t\in [0,{t}_{1})\hfill \\ {\displaystyle \frac{2\phantom{\rule{0.166667em}{0ex}}(h+\mathit{q}(\sigma -1\left)\right)}{2\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})+(\sigma -1)\phantom{\rule{0.166667em}{0ex}}(2\phantom{\rule{0.166667em}{0ex}}t-{t}_{1})}}\hfill & t\in [{t}_{1},T-{t}_{1}]\hfill \\ {\displaystyle \frac{2(T-t)(h+\mathit{q}(\sigma -1\left)\right)}{2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})+(\sigma -1)(2\phantom{\rule{0.166667em}{0ex}}{t}_{1}\phantom{\rule{0.166667em}{0ex}}(T-{t}_{1})-{(T-t)}^{2})}}\hfill & t\in (T-{t}_{1},T]\hfill \end{array}\right.\end{array}$$

From (34)–(36), we can derive explicit expressions for all of the thermodynamic quantities governing the energetics of the optimal transition. In particular, we obtain the drift in the Langevin–Smoluchowski dynamics (1) by inverting (8) as in [7]:

$$\begin{array}{c}\hfill \left({\partial}_{\mathit{q}}U\right)(\mathit{q},t)=-\phantom{\rule{0.166667em}{0ex}}v(\mathit{q},t)+\frac{\mathit{q}-E{\xi}_{t}}{V{\xi}_{t}}\end{array}$$

The minimum entropy production is:
with:
the value of the minimum entropy production appearing in the refinement of the second law [7].

$$\begin{array}{c}\hfill E{\int}_{0}^{{t}_{\mathit{f}}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{v}^{2}({\xi}_{t},t)=\frac{T\phantom{\rule{0.166667em}{0ex}}(3\phantom{\rule{0.166667em}{0ex}}T-4\phantom{\rule{0.166667em}{0ex}}{t}_{1})}{3\phantom{\rule{0.166667em}{0ex}}{(T-{t}_{1})}^{2}}{\mathcal{E}}_{\infty}\end{array}$$

$$\begin{array}{c}\hfill {\mathcal{E}}_{\infty}=\frac{{h}^{2}\phantom{\rule{0.166667em}{0ex}}\beta +{(\sigma -1)}^{2}}{\beta \phantom{\rule{0.166667em}{0ex}}T}\end{array}$$

In Figure 1, we plot the evolution of the running average values of the work done on the system, the heat released and the entropy production during the control horizon. In particular, Figure 1a illustrates the first law of thermodynamics during the control horizon. A transition between Gaussian equilibrium states occurs without any change in the internal energy of the system. The average heat and work must therefore coincide at the end of the control horizon. The theoretical results are consistent with the experimental results of [4].

## 7. Optimally-Controlled Nucleation and Landauer Bound

The form of the bound (22) and running Lagrangian map Formula (32) reduce the computational cost of the solution of the optimal entropy production control to the determination of the Lagrangian map (13). In general, the conditions presiding over the qualitative properties of the Lagrangian map have been studied in depth in the context of optimal mass transport [8]. We refer to [11,41] respectively for a self-contained overview from respectively the mathematics an physics slant.

For illustrative purposes, we revisit here the stylized model of nucleation analyzed in [7]. Specifically, we consider the transition between two equilibria in one dimension. The initial state is described by the symmetric double well:

$$\begin{array}{c}\hfill {\mathrm{p}}_{\iota}\left(\mathit{q}\right)={Z}_{\iota}^{-1}exp-\beta \phantom{\rule{0.166667em}{0ex}}\frac{{({\mathit{q}}^{2}-{\overline{\mathit{q}}}^{2})}^{2}}{{\sigma}^{2}}\end{array}$$

In the final state, the probability is concentrated around a single minimum of the potential:

$$\begin{array}{c}\hfill {\mathrm{p}}_{\mathit{f}}\left(\mathit{q}\right)={Z}_{\mathit{f}}^{-1}exp-\beta \frac{{(\mathit{q}-\overline{\mathit{q}})}^{2}((\mathit{q}-\overline{\mathit{q}})+\overline{\mathit{q}}\phantom{\rule{0.166667em}{0ex}}(3\phantom{\rule{0.166667em}{0ex}}\mathit{q}-\overline{\mathit{q}}))}{{\sigma}^{2}}\end{array}$$

In the foregoing expressions, $\sigma $ is a constant ensuring the consistency of the canonical dimensions.

We used the ensuing elementary algorithm to numerically determine the Lagrangian map. We first computed the median $z\left(1\right)$ of the assigned probability distributions and then evaluated first the left and then right branch of the Lagrangian map. For the left branch, we proceeded iteratively in $z\left(k\right)$ as follows:

- Step 1
- We renormalized the distribution restricted to $[-\infty ,z(k\left)\right]$.
- Step 2
- We computed the $0.9$ quantile $z(k+1)<z\left(k\right)$ of the remaining distribution.
- Step 3
- We solved the ODE:$$\begin{array}{c}\hfill \frac{\mathrm{d}\ell}{\mathrm{d}\mathit{q}}=\frac{{\mathrm{p}}_{\iota}\left(\mathit{q}\right)}{{\mathrm{p}}_{\mathit{f}}\left(\ell \left(\mathit{q}\right)\right)}\end{array}$$

We skipped Step 3 whenever the difference $\left|z\right(k)-z(k-1\left)\right|$ turned out to be smaller than a given threshold ‘resolution’. We plot the results of this computation in Figure 2.

Once we know the Lagrangian map, we can numerically evaluate the running Lagrangian map (32) and its spatial derivatives. In Figure 3, we report the evolution of the probability density in the control horizon for two reference values of the switching time.

Figure 4 illustrates the the corresponding evolution of the current velocity.

The qualitative behavior is intuitive. The current velocity starts and ends with a vanishing value; it catches up with the value for ${t}_{1}\downarrow 0$, i.e., when the bound on acceleration tends to infinity, in the bulk of the control horizon. There, the displacement described by the running Lagrangian map occurs at a speed higher than in the ${t}_{1}\downarrow 0$ case. The overall value of the entropy production is always higher than in the ${t}_{1}\downarrow 0$ limit. From (32), we can also write the running values of average heat released by the system. The running average heat is:

$$\begin{array}{c}\hfill \mathit{q}\left(t\right)=-\frac{1}{\beta}{\int}_{\mathbb{R}}{\mathrm{d}}^{d}\mathit{q}\phantom{\rule{0.166667em}{0ex}}{\mathrm{p}}_{\iota}\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}ln\frac{\mathrm{d}{\chi}_{t}\left(\mathit{q}\right)}{\mathrm{d}\mathit{q}}+{\int}_{0}^{t}\mathrm{d}s\phantom{\rule{0.166667em}{0ex}}{\int}_{\mathbb{R}}{\mathrm{d}}^{d}\mathit{q}\phantom{\rule{0.166667em}{0ex}}{\mathrm{p}}_{\iota}\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}{\nu}_{t}^{2}\left(\mathit{q}\right)\end{array}$$

and the running average work:

$$\begin{array}{c}\hfill W\left(t\right)={\int}_{\mathbb{R}}\mathrm{d}\mathit{q}\phantom{\rule{0.166667em}{0ex}}{\mathrm{p}}_{\iota}\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}F({\chi}_{t}\left(\mathit{q}\right),t)+{\int}_{0}^{t}\mathrm{d}s\phantom{\rule{0.166667em}{0ex}}{\int}_{\mathbb{R}}{\mathrm{d}}^{d}\mathit{q}\phantom{\rule{0.166667em}{0ex}}{\mathrm{p}}_{\iota}\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}{\nu}_{t}^{2}\left(\mathit{q}\right)\end{array}$$

with:

$$\begin{array}{c}\hfill F({\chi}_{t}\left(\mathit{q}\right),t)=-{\int}_{0}^{\mathit{q}}\mathrm{d}y\frac{\mathrm{d}{\chi}_{t}}{\mathrm{d}y}\left(y\right)\phantom{\rule{0.166667em}{0ex}}{\nu}_{t}\left(y\right)-\frac{1}{\beta}{\int}_{\mathbb{R}}{\mathrm{d}}^{d}\mathit{q}\phantom{\rule{0.166667em}{0ex}}{\mathrm{p}}_{\iota}\left(\mathit{q}\right)\phantom{\rule{0.166667em}{0ex}}ln\frac{\mathrm{d}{\chi}_{t}\left(\mathit{q}\right)}{\mathrm{d}\mathit{q}}\end{array}$$

The second summand on the right-hand side of (39) fixes the arbitrary constant in the Helmholtz potential in the same way as in the Gaussian case.

In Figure 5, we plot the running average work, heat and entropy production.

## 8. Comparison with the Valley Method Regularization

An alternative formalism to study transitions between equilibrium states in the Langevin–Smoluchowski limit was previously proposed in [25]. As in the present case, Ref. [25] takes advantage of the possibility to map the stochastic optimal control problem into a deterministic one via the current velocity formalism. Physical constraints on admissible controls are, however, enforced by adding to the entropy production rate a penalty term proportional to the squared current acceleration. In terms of the entropy production functional (17), we can couch the regularized functional of [25] into the form:
${\delta}_{\chi}\mathcal{E}$ stands for the variation of $\mathcal{E}$ with respect to the running Lagrangian map. The idea behind the approach is the “valley method” advocated by [26] for instanton calculus. The upshot is to approximate field configurations satisfying boundary conditions incompatible with stationary values of classical variational principles by adding extra terms to the action functional. The extra term is proportional to the squared first variation of the classical action. Hence, it vanishes whenever there exists a classical field configurations matching the desired boundary conditions. It otherwise raises the order of the time derivative in the problem, thus permitting one to satisfy extra boundary conditions.

$$\begin{array}{c}\hfill \mathcal{A}=\mathcal{E}+\epsilon \phantom{\rule{0.166667em}{0ex}}{\tau}^{2}\phantom{\rule{0.166667em}{0ex}}{\parallel {\delta}_{\chi}\mathcal{E}\parallel}^{2}\end{array}$$

Optimal control problems are well posed if terminal costs are pure functionals of the boundary conditions. The rationale for considering valley method-regularized thermodynamic functionals is to give a non-ambiguous meaning to the optimization of functionals whenever naive formulations of the problem yield boundary conditions or terminal costs as the functional of the controls.

Contrasted with the approach proposed in the present work, [25] has one evident drawback and one edge. The drawback is that the quantities actually minimized are no longer the original thermodynamic functionals. The edge is that the resulting optimal protocol has better analyticity properties. In particular, the running Lagrangian map takes the form:

$$\begin{array}{c}\hfill {\chi}_{t}=\mathit{q}+\frac{\ell \left(\mathit{q}\right)-\mathit{q}}{T-2\phantom{\rule{0.166667em}{0ex}}\tau \phantom{\rule{0.166667em}{0ex}}\sqrt{\epsilon}\phantom{\rule{0.166667em}{0ex}}tanh\frac{T}{2\phantom{\rule{0.166667em}{0ex}}\tau \phantom{\rule{0.166667em}{0ex}}\sqrt{\epsilon}}}\left(t-\tau \phantom{\rule{0.166667em}{0ex}}\sqrt{\epsilon}\phantom{\rule{0.166667em}{0ex}}\frac{sinh\frac{2\phantom{\rule{0.166667em}{0ex}}t-T}{2\phantom{\rule{0.166667em}{0ex}}\tau \phantom{\rule{0.166667em}{0ex}}\sqrt{\epsilon}}+sinh\frac{T}{2\phantom{\rule{0.166667em}{0ex}}\tau \phantom{\rule{0.166667em}{0ex}}\sqrt{\epsilon}}}{cosh\frac{T}{2\phantom{\rule{0.166667em}{0ex}}\tau \phantom{\rule{0.166667em}{0ex}}\sqrt{\epsilon}}}\right)\end{array}$$

In Figure 6a, we compare the qualitative behavior of the universal part of the running Lagrangian map predicted by the valley method and by the bound (21) on admissible current accelerations. The corresponding values of the running average entropy production are in Figure 6b.

The upshot of the comparison is the weak sensitivity of the optimal protocol to the detail of the optimization once the intensity of the constraint on the admissible control (i.e., the current acceleration) is fixed. We believe that this is an important observation for experimental applications (see, e.g., the discussion in the conclusions of [24]), as the details of how control parameters can be turned on and off in general depend on the detailed laboratory setup and on the restrictions by the available peripherals.

## 9. Conclusions and Outlooks

We presented a stylized model of engineered equilibration of a micro-system. Owing to explicit integrability modulo numerical reconstruction of the Lagrangian map, we believe that our model may provide a useful benchmark for the devising of efficient experimental setups. Furthermore, extensions of the current model are possible, although at the price of some complications.

The first extension concerns the form of the constraint imposed on admissible protocols. Here, we showed that choosing the current acceleration constraint in the form of (22) greatly simplifies the determination of the switching times. It also guarantees that optimal control with only two switching times exists for all boundary conditions if we allow accelerations to take sufficiently large values. The non-holonomic form of the constraint (21) may turn out to be restrictive for the study of transitions for which admissible controls are specified by given forces. If the current velocity formalism is still applicable to these cases, then the design of optimal control still follows the steps we described here. In particular, uniformly-accelerated Lagrangian displacement at the end of the control horizon correspond to the first terms of the integration of the Newton law in Peano–Picard series. The local form of the acceleration may then occasion some qualitative differences in the form of the running Lagrangian map. Furthermore, the analysis of the realizability conditions of the optimal control may also become more involved.

A further extension is optimal control when constraints on admissible controls are imposed directly on the drift field appearing in the stochastic evolution equation. Constraints of this type are natural when inertial effects become important and the dynamics is governed by the Langevin–Kramers equation in the so-called under-damped approximation. In the Langevin–Kramers framework, finding minimum entropy production thermodynamic transitions requires instead a full-fledged formalism of stochastic optimal control [42]. Nevertheless, it is possible also in that case to proceed in a way analogous to the one of the present paper by applying the stochastic version of the Pontryagin principle [43,44,45].

## Acknowledgments

The authors thank Sergio Ciliberto for useful discussions. The work of KS was mostly performed during his stay at the department of Mathematics and Statistics of the University of Helsinki. P.M.-G. acknowledges support from Academy of Finland via the Centre of Excellence in Analysis and Dynamics Research (Project No. 271983) and the AtMath Collaboration at the University of Helsinki http://wiki.helsinki.fi/display/AtMath/Atmospheric+Mathematics.

## Author Contributions

Both authors made substantial contributions to the paper.

## Conflicts of Interest

The authors declare no conflict of interest.

## Appendix A. Evaluation of Kullback–Leibler Divergences

Let us consider first the drift-less process:
with initial data (2). If we denote by ${\mathrm{P}}_{\omega}$ the path-space Wiener measure generated by (A1) in $[{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]$, the Girsanov formula yields:

$$\begin{array}{c}\hfill \mathrm{d}{\mathbf{\xi}}_{t}=\sqrt{\frac{2}{\beta}}\phantom{\rule{0.166667em}{0ex}}\mathrm{d}{\mathbf{\omega}}_{t}\end{array}$$

$$\begin{array}{c}\hfill \frac{\mathrm{d}\mathrm{P}}{\mathrm{d}{\mathrm{P}}_{\omega}}=exp-\frac{\beta}{2}{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\left(\mathrm{d}{\mathbf{\xi}}_{t}\xb7{\partial}_{{\mathbf{\xi}}_{t}}U+\mathrm{d}t{\displaystyle \frac{\parallel {\partial}_{{\mathbf{\xi}}_{t}}{U\parallel}^{2}}{2}}\right)\end{array}$$

The Kullback–Leibler divergence is defined as:

$$\begin{array}{c}\hfill \mathcal{K}\left(\mathrm{P}\right||{\mathrm{P}}_{\omega})=E{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}ln\frac{\mathrm{d}\mathrm{P}}{\mathrm{d}{\mathrm{P}}_{\omega}}\end{array}$$

The expectation value is with respect the measure $\mathrm{P}$ generated by (1):

$$\begin{array}{c}{\displaystyle \mathcal{K}(\mathrm{P}\parallel {\mathrm{P}}_{\omega})=-\frac{\beta}{2}E{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\left(\mathrm{d}{\mathbf{\xi}}_{t}\xb7{\partial}_{{\mathbf{\xi}}_{t}}U+\mathrm{d}t{\displaystyle \frac{\parallel {\partial}_{{\mathbf{\xi}}_{t}}{U\parallel}^{2}}{2}}\right)}\\ \hspace{1em}\hspace{1em}=-\frac{\beta}{2}E{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\left((\mathrm{d}{\mathbf{\xi}}_{t}+\mathrm{d}t{\partial}_{{\mathbf{\xi}}_{t}}U)\xb7{\partial}_{{\mathbf{\xi}}_{t}}U-\mathrm{d}t{\displaystyle \frac{\parallel {\partial}_{{\mathbf{\xi}}_{t}}{U\parallel}^{2}}{2}}\right)\end{array}$$

The last expression readily recovers (14) as $\mathrm{d}{\mathbf{\xi}}_{t}+\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{\partial}_{{\mathbf{\xi}}_{t}}U$ is a Wiener process with respect to $\mathrm{P}$.

To show that the entropy production is proportional to the Kullback–Leibler divergence between the path-space measures of (1) and (16), we observe that:

$$\begin{array}{c}\hfill \frac{\mathrm{d}{\mathrm{P}}_{R}}{\mathrm{d}{\mathrm{P}}_{\omega}}=exp\frac{\beta}{2}{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\left(\mathrm{d}{\mathbf{\xi}}_{t}\stackrel{{\scriptscriptstyle 1}}{\xb7}{\partial}_{{\mathbf{\xi}}_{t}}U-\mathrm{d}t{\displaystyle \frac{\parallel {\partial}_{{\mathbf{\xi}}_{t}}{U\parallel}^{2}}{2}}\right)\end{array}$$

The stochastic integral is evaluated in the post-point prescription, as the Radon–Nikodym derivative between backward processes must be a martingale with respect to the filtration of future event (see, e.g., [47] for an elementary discussion). We then avail ourselves of the time reversal invariance of the Wiener process to write:

$$\begin{array}{c}{\displaystyle \frac{\mathrm{d}\mathrm{P}}{\mathrm{d}{\mathrm{P}}_{R}}=\frac{{\mathrm{p}}_{\iota}\left({\mathbf{\xi}}_{{t}_{\iota}}\right)}{{\mathrm{p}}_{\mathit{f}}\left({\mathbf{\xi}}_{{t}_{\mathit{f}}}\right)}exp-\beta {\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\left(\mathrm{d}{\mathbf{\xi}}_{t}\stackrel{{\scriptscriptstyle 1/2}}{\xb7}{\partial}_{{\mathbf{\xi}}_{t}}U\right)}\hfill \\ \hspace{1em}\hspace{1em}=exp-\beta {\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\left(\mathrm{d}{\mathbf{\xi}}_{t}\stackrel{{\scriptscriptstyle 1/2}}{\xb7}{\partial}_{{\mathbf{\xi}}_{t}}\left(U+\frac{1}{\beta}ln\mathrm{p}\right)+\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{\partial}_{t}ln\mathrm{p}\right)\hfill \end{array}$$

Finally, the definition:
recovers (15) since the probability conservation entails:
whilst the properties of the Stratonovich integral [31] yield:

$$\begin{array}{c}\hfill \mathcal{K}(\mathrm{P}\parallel {\mathrm{P}}_{R})=E{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}ln\frac{\mathrm{d}\mathrm{P}}{\mathrm{d}{\mathrm{P}}_{R}}\end{array}$$

$$\begin{array}{c}\hfill E{\partial}_{t}ln\mathrm{p}=0\end{array}$$

$$\begin{array}{c}\hfill E{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\mathrm{d}{\mathbf{\xi}}_{t}\stackrel{{\scriptscriptstyle 1/2}}{\xb7}{\partial}_{{\mathbf{\xi}}_{t}}\left(U+\frac{1}{\beta}ln\mathrm{p}\right)=-E{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}{\parallel \mathit{v}\parallel}^{2}\end{array}$$

## Appendix B. Current Velocity and Acceleration in Terms of the Generator of the Stochastic Process

The current velocity is the conditional expectation along the realizations of (1) of the time symmetric conditional increment:

$$\begin{array}{c}\hfill \mathit{v}(\mathit{q},t)=\underset{\tau \downarrow 0}{lim}\frac{E({\mathbf{\xi}}_{t+\tau}-{\mathbf{\xi}}_{t-\tau}|{\mathbf{\xi}}_{t}=\mathit{q})}{2\phantom{\rule{0.166667em}{0ex}}\tau}\end{array}$$

A relevant feature of the time symmetry is that the differential can be regarded as the result of the action of a generator including only first order derivatives in space:
where:

$$\begin{array}{c}\hfill \mathit{v}({\mathbf{\xi}}_{t},t)={\overline{\mathbb{D}}}_{{\mathbf{\xi}}_{t}}{\mathbf{\xi}}_{t}\end{array}$$

$$\begin{array}{c}\hfill {\overline{\mathbb{D}}}_{{\mathbf{\xi}}_{t}}:=\frac{{\mathbb{D}}_{{\mathbf{\xi}}_{t}}+{\mathbb{D}}_{{\mathbf{\xi}}_{t}}^{*}}{2}\end{array}$$

On the right-hand side of (A3), there appear the scalar generator of (1):
and the generator of the dual process conjugated by the time-reversal of the probability density in $[{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]$ [29,31]:

$$\begin{array}{c}\hfill {\mathbb{D}}_{\mathit{q}}={\partial}_{t}-\left({\partial}_{\mathit{q}}U\right)(\mathit{q},t)\xb7{\partial}_{\mathit{q}}+\frac{1}{\beta}{\partial}_{\mathit{q}}^{2}\end{array}$$

$$\begin{array}{c}\hfill {\mathbb{D}}_{\mathit{q}}^{*}={\partial}_{t}-({\partial}_{\mathit{q}}U+\frac{2}{\beta}{\partial}_{\mathit{q}}ln\mathrm{p})(\mathit{q},t)\xb7{\partial}_{\mathit{q}}-\frac{1}{\beta}{\partial}_{\mathit{q}}^{2}\end{array}$$

The arithmetic averages of these generators readily define a first order differential operator as in the deterministic case. Analogously, we define the current acceleration as:
or equivalently:

$$\begin{array}{c}\hfill \mathit{a}(\mathit{q},t)=\underset{\tau \downarrow 0}{lim}\frac{E(\mathit{v}({\mathbf{\xi}}_{t+\tau},t+\tau )-\mathit{v}({\mathbf{\xi}}_{t-\tau},t-\tau )|{\mathbf{\xi}}_{t}=\mathit{q})}{2\phantom{\rule{0.166667em}{0ex}}\tau}\end{array}$$

$$\begin{array}{c}\hfill {\mathbf{\alpha}}_{t}=\mathit{a}({\mathbf{\xi}}_{t},t)={\overline{\mathbb{D}}}_{{\mathbf{\xi}}_{t}}^{2}{\mathbf{\xi}}_{t}\end{array}$$

Based on the above definitions, the Fokker–Planck Equation of (1) can be couched into the form:

$$\begin{array}{c}\hfill ({\partial}_{t}+{\partial}_{\mathit{q}}\xb7\mathit{v}(\mathit{q},t))\mathrm{p}(\mathit{q},t)=0\end{array}$$

## Appendix C. Pontryagin Principle

We recall the statement of Pontryagin’s principle for fixed time and fixed boundary conditions [13,51].

Maximum principle: Let the functional:
be subject to the dynamical constraint:
and the endpoint constraints:
with the parameter ${\mathbf{\alpha}}_{t}$ belonging for fixed t to a set $\mathrm{U}\subseteq {\mathbb{R}}^{n}$, the variable ${\mathbf{\xi}}_{t}$ taking values in ${\mathbb{R}}^{d}$ or in a open subset $\mathrm{X}$ of ${\mathbb{R}}^{d}$ and the time interval $[{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]$ fixed. A necessary condition for a function ${\overline{\mathbf{\alpha}}}_{t}:[{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]\mapsto \mathrm{U}$ and a corresponding solution ${\overline{\mathbf{\xi}}}_{t}$ of (A5) to solve the minimization of (A4) is that there exist a function t${\overline{\pi}}_{t}:[{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]\mapsto {\mathbb{R}}^{d}$ and a constant ${p}_{o}\le 0$, such that:

$$\begin{array}{c}\hfill \mathcal{A}={\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}L({\mathbf{\xi}}_{t},{\mathbf{\alpha}}_{t},t)\end{array}$$

$$\begin{array}{c}\hfill {\dot{\mathbf{\xi}}}_{t}=\mathbf{b}({\mathbf{\xi}}_{t},{\mathbf{\alpha}}_{t},t)\end{array}$$

$$\begin{array}{c}\hfill {\mathbf{\xi}}_{{t}_{\iota}}={\mathit{q}}_{\iota}\phantom{\rule{28.45274pt}{0ex}}\&\phantom{\rule{28.45274pt}{0ex}}{\mathbf{\xi}}_{{t}_{\mathit{f}}}={\mathit{q}}_{\mathit{f}}\end{array}$$

- $({\overline{\pi}}_{t},{\overline{p}}_{0})\ne (\mathbf{0},0)$$\forall \phantom{\rule{0.166667em}{0ex}}t\in [{t}_{\iota}\phantom{\rule{0.166667em}{0ex}},{t}_{\mathit{f}}]$ (non-triviality condition)
- for each fixed t:$$\begin{array}{c}\hfill {H}_{\star}(\mathit{q},\mathit{p},{p}_{0}t)=\underset{\mathbf{a}\in \mathrm{U}}{max}(\mathit{p}\xb7\mathit{b}(\mathit{q},\mathit{a},t)+{p}_{0}\phantom{\rule{0.166667em}{0ex}}L(\mathit{q},\mathit{a},t))\end{array}$$(maximum condition)
- $({\overline{\mathbf{\xi}}}_{t},{\overline{\mathbf{\pi}}}_{t})$ obey the equations:$$\begin{array}{c}\hfill {\overline{\dot{\overline{\xi}}}}_{t}={\partial}_{{\overline{\mathbf{\pi}}}_{t}}{H}_{\star}({\overline{\mathbf{\xi}}}_{t},{\overline{\mathbf{\pi}}}_{t}.{\overline{p}}_{0},t)\phantom{\rule{28.45274pt}{0ex}}\&\phantom{\rule{28.45274pt}{0ex}}{\overline{\dot{\overline{\pi}}}}_{t}=-{\partial}_{{\overline{\mathbf{\xi}}}_{t}}{H}_{\star}({\overline{\mathbf{\xi}}}_{t},{\overline{\mathbf{\pi}}}_{t},{\overline{p}}_{0},t)\end{array}$$(Hamilton system condition).

The proof of the maximum principles requires subtle topological considerations culminating with the application of Brouwer’s fixed point theorem. The maximum principle has, nevertheless, an intuitive content. Namely, we can reformulate the problem in an extended configuration space by adding the ancillary equation:
and looking for the stationary point of the action functional:

$$\begin{array}{c}\hfill {\dot{\zeta}}_{t}=L({\mathbf{\xi}}_{t},{\mathbf{\pi}}_{t},t)\end{array}$$

$$\begin{array}{c}\hfill {\zeta}_{{t}_{\iota}}=0\end{array}$$

$$\begin{array}{c}\hfill \tilde{A}={\zeta}_{{t}_{\mathit{f}}}+{\int}_{{t}_{\iota}}^{{t}_{\mathit{f}}}\mathrm{d}t\phantom{\rule{0.166667em}{0ex}}({\mathbf{\pi}}_{t}\xb7{\dot{\mathbf{\xi}}}_{t}+{\varphi}_{t}{\dot{\zeta}}_{t}-({\mathbf{\pi}}_{t}\xb7\mathit{b}({\mathbf{\xi}}_{t},{\mathbf{\alpha}}_{t},t)+{\varphi}_{t}L({\mathbf{\xi}}_{t},{\mathbf{\alpha}}_{t},t)\left)\right)\end{array}$$

Let us make the simplifying assumption that any pair of trajectory and control variables satisfying the boundary has a non-empty open neighborhood where linear variations are well defined. Looking for a stationary point of (A4) entails considering variations of ${\zeta}_{t}$ under the constraints ${\zeta}_{{t}_{\iota}}^{\prime}={\zeta}_{{t}_{\mathit{f}}}^{\prime}=0$. Then, it follows immediately that the stationary value of the Lagrange multiplier ${\varphi}_{t}$ must satisfy:

$$\begin{array}{c}\hfill {\dot{\overline{\varphi}}}_{t}=0\end{array}$$

This observation clarifies why the maximum principle is stated for some constant ${p}_{o}\le 0$, such that ${\varphi}_{t}={p}_{o}$. In particular, if ${p}_{o}\phantom{\rule{0.166667em}{0ex}}<\phantom{\rule{0.166667em}{0ex}}0$, we can always rescale it to ${p}_{o}=-1$ and recover the familiar form of the Hamilton equations. Moreover, the maximum principle coincides with the Hamilton form of the stationary action principle if $\mathit{b}={\mathit{\alpha}}_{t}$ and L is quadratic in ${\mathit{\alpha}}_{t}$. If instead, there exist stationary solutions for ${p}_{0}=0$, they describe abnormal controls.

Abnormal controls do not occur in the optimization problem considered in the main text. In the push regions where the acceleration is non-vanishing abnormal control drive the Lagrange multiplier ${\theta}_{t}$ away from zero, thus, they are not compatible with the occurrence of switching times between push and no-action regions. Looking for abnormal control in the no-action region yields the requirement that all Lagrange multipliers vanish against the hypothesis of the maximum principle.

## References

- Blickle, V.; Bechinger, C. Realization of a micrometre-sized stochastic heat-engine. Nat. Phys.
**2011**, 8, 143–146. [Google Scholar] - Roßnagel, J.; Abah, O.; Schmidt-Kaler, F.; Singer, K.; Lutz, E. Nanoscale heat engine beyond the carnot limit. Phys. Rev. Lett.
**2014**, 112, 030602. [Google Scholar] [CrossRef] [PubMed] - Liang, S.; Medich, D.; Czajkowsky, D.M.; Sheng, S.; Yuan, J.Y.; Shao, Z. Thermal noise reduction of mechanical oscillators by actively controlled external dissipative forces. Ultramicroscopy
**2000**, 84, 119–125. [Google Scholar] [CrossRef] - Martínez, I.A.; Petrosyan, A.; Guéry-Odelin, D.; Trizac, E.; Ciliberto, S. Engineered swift equilibration of a Brownian particle. Nat. Phys.
**2016**, 12, 843–846. [Google Scholar] [CrossRef] [PubMed] - Trepagnier, E.H.; Jarzynski, C.; Ritort, F.; Crooks, G.E.; Bustamante, C.J.; Liphardt, J. Experimental test of Hatano and Sasa’s nonequilibrium steady-state equality. PNAS
**2004**, 101, 15038–15041. [Google Scholar] [CrossRef] [PubMed] - Jacobs, K. Stochastic Processes for Physicists: Understanding Noisy Systems; Cambridge University Press: Cambridge, UK, 2010. [Google Scholar]
- Aurell, E.; Gawȩdzki, K.; Mejía-Monasterio, C.; Mohayaee, R.; Muratore-Ginanneschi, P. Refined Second Law of Thermodynamics for fast random processes. J. Stat. Phys.
**2012**, 147, 487–505. [Google Scholar] [CrossRef] - Villani, C. Optimal Transport: Old and New; Grundlehren der mathematischen Wissenschaften; Springer: Berlin, Germany, 2009. [Google Scholar]
- Benamou, J.D.; Brenier, Y. A computational fluid mechanics solution to the Monge-Kantorovich mass transfer problem. Numer. Math.
**2000**, 84, 375–393. [Google Scholar] [CrossRef] - Brenier, Y.; Frisch, U.; Hénon, M.; Loeper, G.; Matarrese, S.; Mohayaee, R.; Sobolevskiǐ, A. Reconstruction of the early Universe as a convex optimization problem. Mon. Not. R. Astron. Soc.
**2003**, 346, 501–524. [Google Scholar] [CrossRef] - De Philippis, G.; Figalli, A. The Monge–Ampère equation and its link to optimal transportation. Bull. Amer. Math. Soc.
**2014**, 51, 527–580. [Google Scholar] [CrossRef] - Alemany, A.; Ribezzi, M.; Ritort, F. Recent progress in fluctuation theorems and free energy recovery. AIP Conf. Proc.
**2011**, 1332, 96–110. [Google Scholar] - Liberzon, D. Calculus of Variations and Optimal Control Theory: A Concise Introduction; Princeton University Press: Princeton, NJ, USA, 2012. [Google Scholar]
- Sekimoto, K. Langevin equation and thermodynamics. Progr. Theor. Phys. Suppl.
**1998**, 130, 17–27. [Google Scholar] [CrossRef] - Schrödinger, E. Über die umkehrung der naturgesetze. Sitzungsberichte der Preussischen Akademie der Wissenschaften, Physikalische Mathematische Klasse
**1931**, 8, 144–153. (In German) [Google Scholar] - Aebi, R. Schrödinger Diffusion Processes; Probability and Its Applications; Birkhäuser: Basel, Switzerland, 1996; p. 186. [Google Scholar]
- Muratore-Ginanneschi, P. On the use of stochastic differential geometry for non-equilibrium thermodynamics modeling and control. J. Phys. A
**2013**, 46, 275002. [Google Scholar] [CrossRef] - Arnaudon, M.; Cruzeiro, A.B.; Léonard, C.; Zambrini, J.C. An entropic interpolation problem for incompressible viscid fluids. arXiv, 2017; arXiv:1704.02126. [Google Scholar]
- Landauer, R. Irreversibility and heat generation in the computing process. IBM J. Res. Dev.
**1961**, 5, 183–191. [Google Scholar] [CrossRef] - Bennett, C.H. The thermodynamics of computation—A review. Int. J. Theor. Phys.
**1982**, 21, 905–940. [Google Scholar] [CrossRef] - Dillenschneider, R.; Lutz, E. Memory erasure in small systems. Phys. Rev. Lett.
**2009**, 102, 210601. [Google Scholar] [CrossRef] [PubMed] - Bérut, A.; Arakelyan, A.; Petrosyan, A.; Ciliberto, S.; Dillenschneider, R.; Lutz, E. Experimental verification of Landauer’s principle linking information and thermodynamics. Nature
**2012**, 483, 187–189. [Google Scholar] [CrossRef] [PubMed] - Koski, J.V.; Maisi, V.F.; Pekola, J.P.; Averin, D.V. Experimental realization of a Szilard engine with a single electron. Proc. Natl. Acad. Sci. USA
**2014**, 111, 13786–13789. [Google Scholar] [CrossRef] [PubMed] - Jun, Y.; Gavrilov, M.; Bechhoefer, J. High-precision test of Landauer’s principle in a feedback trap. Phys. Rev. Lett.
**2014**, 113, 190601. [Google Scholar] [CrossRef] [PubMed] - Aurell, E.; Mejía-Monasterio, C.; Muratore-Ginanneschi, P. Boundary layers in stochastic thermodynamics. Phys. Rev. E
**2012**, 85, 020103(R). [Google Scholar] [CrossRef] [PubMed] - Aoyama, H.; Kikuchi, H.; Okouchi, I.; Sato, M.; Wada, S. Valley views: Instantons, large order behaviors, and supersymmetry. Nucl. Phys. B
**1999**, 553, 644–710. [Google Scholar] [CrossRef] - Zwanzig, R. Nonequilibrium Statistical Mechanics; Oxford University Press: New York, NY, USA, 2001; p. 240. [Google Scholar]
- Lebowitz, J.L.; Spohn, H. A Gallavotti-Cohen Type Symmetry in the large deviation functional for stochastic dynamics. J. Stat. Phys.
**1999**, 95, 333–365. [Google Scholar] [CrossRef] - Nelson, E. Dynamical Theories of Brownian Motion, 2nd ed.; Princeton University Press: Princeton, NJ, USA, 2001; p. 148. [Google Scholar]
- Fényes, I. Eine wahrscheinlichkeitstheoretische Begründung und Interpretation der Quantenmechanik. Z. Phys.
**1952**, 132, 81–106. (In German) [Google Scholar] [CrossRef] - Nelson, E. Quantum Fluctuations; Princeton Series in Physics; Princeton University Press: Princeton, NJ, USA, 1985; p. 146. [Google Scholar]
- Qian, H. Mesoscopic nonequilibrium thermodynamics of single macromolecules and dynamic entropy-energy compensation. Phys. Rev. E
**2001**, 65, 016102. [Google Scholar] [CrossRef] [PubMed] - Shannon, C.E. A mathematical theory of communication. Bell Syst. Tech. J.
**1948**, 27, 379, 623–656. [Google Scholar] [CrossRef] - Bertini, L.; Sole, A.D.; Gabrielli, D.; Jona-Lasinio, G.; Landim, C. Macroscopic fluctuation theory. Rev. Mod. Phys.
**2015**, 87, 593–636. [Google Scholar] [CrossRef] - Dai Pra, P. A stochastic control approach to reciprocal diffusion processes. Appl. Math. Optim.
**1991**, 23, 313–329. [Google Scholar] [CrossRef] - Roelly, S.; Thieullen, M. A characterization of reciprocal processes via an integration by parts formula on the path space. Probab. Theory Relat. Fields
**2002**, 123, 97–120. [Google Scholar] [CrossRef] - Kullback, S.; Leibler, R. On information and sufficiency. Ann. Math. Stat.
**1951**, 22, 79–86. [Google Scholar] [CrossRef] - Jiang, D.Q.; Qian, M.; Qian, M.P. Mathematical Theory of Nonequilibrium Steady States; Lecture Notes in Mathematics; Springer: Berlin, Germany, 2004; p. 276. [Google Scholar]
- Chétrite, R.; Gawȩdzki, K. Fluctuation relations for diffusion processes. Commun. Math. Phys.
**2008**, 282, 469–518. [Google Scholar] [CrossRef] - Jordan, R.; Kinderlehrer, D.; Otto, F. The variational formulation of the Fokker–Planck equation. SIAM J. Math. Anal.
**1998**, 29, 1–17. [Google Scholar] [CrossRef] - Gawȩdzki, K. Fluctuation relations in stochastic thermodynamics. arXiv, 2013; arXiv:1308.1518. [Google Scholar]
- Muratore-Ginanneschi, P.; Schwieger, K. How nanomechanical systems can minimize dissipation. Phys. Rev. E
**2014**, 90, 060102(R). [Google Scholar] [CrossRef] [PubMed] - Bismut, J.M. An introductory approach to duality in optimal stochastic control. SIAM Rev.
**1978**, 20, 62–78. [Google Scholar] [CrossRef] - Kosmol, P.; Pavon, M. Lagrange approach to the optimal control of diffusions. Acta Appl. Math.
**1993**, 32, 101–122. [Google Scholar] [CrossRef] - Rogers, L.C.G. Duality in constrained optimal investment and consumption problems: A synthesis. In Paris-Princeton Lectures on Mathematical Finance; Bank, P., Baudoin, F., Carmona, R., Föllmer, H., Rogers, L.C.G., Touzi, N., Soner, M., Eds.; Springer: Berlin, Germany, 2003; Vol. 1814, pp. 95–131. [Google Scholar]
- Cunuder, A.L.; Martinez, I.; Petrosyan, A.; Guéry-Odelin, D.; Trizac, E.; Ciliberto, S. Fast equilibrium switch of a micro mechanical oscillator. Appl. Phys. Lett.
**2016**, 109, 113502. [Google Scholar] [CrossRef] - Meyer, P.A. Géométrie différentielle stochastique, II. Séminaire de Probabilités de Strasbourg
**1982**, 16, 165–207. (In German) [Google Scholar] - Maes, C.; Redig, F.; Moffaert, A.V. On the definition of entropy production, via examples. J. Math. Phys.
**2000**, 41, 1528–1554. [Google Scholar] [CrossRef] - Gradenigo, G.; Puglisi, A.; Sarracino, A. Entropy production in non-equilibrium fluctuating hydrodynamics. J. Phys. Chem.
**2012**, 137, 014509. [Google Scholar] [CrossRef] [PubMed] - Gradenigo, G.; Puglisi, A.; Sarracino, A.; Villamaina, D.; Vulpiani, A. Out-of-equilibrium generalized fluctuation-dissipation relations. In Nonequilibrium Statistical Physics of Small Systems: Fluctuation Relations and Beyond; Klages, R., Just, W., Jarzynski, C., Eds.; Wiley: Weinheim, Germany, 2013; Chapter 9. [Google Scholar]
- Agrachev, A.A.; Sachkov, Y. Control Theory from the Geometric Viewpoint; Encyclopaedia of Mathematical Sciences: Control Theory and Optimization; Springer: Berlin/Heidelberg, Germany, 2004. [Google Scholar]

**Figure 1.**First Figure 1a and second law Figure 1b of thermodynamics for the same transition between Gaussian states as in [4]. The initial state is a normal distribution with variance ${\beta}^{-1}$. The final distribution is Gaussian with variance ${\beta}^{-1}/2$. The condition $K\left(\mathit{q}\right)\propto \left|\ell \right(\mathit{q})-\mathit{q}|$ ensures that the probability density remains Gaussian at any time in the control horizon $t\in [0,1]$. The proportionality factor is chosen such that ${t}_{1}=0.3$ in (32). The behavior of the variance (inset of Figure 1a) is qualitatively identical to the one observed in [4] (Figure 2). The behavior of the average work and heat also reproduces the one of Figure 3 of [4]. (

**a**) Work (continuous curve, blue on-line) and heat release (dashed curve, yellow on-line) during the control horizon. Inset: time evolution of the variance of the process; (

**b**) Entropy production (continuous curve, blue on-line) and heat release (dashed curve, yellow on-line) during the control horizon.

**Figure 2.**Initial (solid curve, blue on-line) and final (dashed curve, blue on-line) probability distribution of the state of the system for $\beta =112$$\sigma =1$ and $\overline{\mathit{q}}=1/2$. The evaluation of the Lagrangian map occasions numerical stiffness in the region in between the two minima. (

**a**) Boundary conditions for the nucleation problem; (

**b**) Lagrangian map; (

**c**) Numerical derivative of the Lagrangian map.

**Figure 3.**Probability density snapshots at different times within the control horizon. The plots are for$\mathit{T}=1$ and switching time ${t}_{1}\phantom{\rule{3.33333pt}{0ex}}=\phantom{\rule{3.33333pt}{0ex}}{10}^{-6}$ (dashed interpolation curve, yellow on-line) and ${t}_{1}=0.3$ (continuous interpolation curve, blue on-line) $\overline{\mathit{q}}=0.5$, $\sigma =1$ and $\beta =112$. We plot the Lagrangian map in the interval $\overline{\mathit{q}}\in [-2,2]$.

**Figure 4.**Current velocity snapshots at different times within the control horizon. The plots are for $\mathit{T}=1$ and switching time ${t}_{1}\phantom{\rule{3.33333pt}{0ex}}=\phantom{\rule{3.33333pt}{0ex}}{10}^{-6}$ (continuous interpolation, yellow on-line) and $t=0.3$ (points, blue on-line).

**Figure 5.**First and second law of thermodynamics for the optimally-controlled nucleation transition. All parameters are as in Figure 2. The qualitative picture is the same as in the Gaussian case, Figure 1, with the running average work above the running average heat. The numerical values yield, however, almost overlapping curves. The running average entropy production in Figure 5b is strictly monotonic in the control horizon. The entropy production rate vanishes at the boundary highlighting the reaching of an equilibrium state when the switching time is ${t}_{1}=0.3$. (

**a**) First law of thermodynamics for the optimally-controlled nucleation. Continuous curve (blue on-line) running average work. Dashed curve (yellow on-line) running average heat; (

**b**) Running average entropy production. The continuous curve (blue on-line) is obtained for switching time at ${t}_{1}=0.3$, the dashed curve (yellow on-line) for ${t}_{1}\phantom{\rule{3.33333pt}{0ex}}=\phantom{\rule{3.33333pt}{0ex}}{10}^{-6}$.

**Figure 6.**Qualitative comparison of universal part of the running Lagrangian maps (32) (continuous curve, blue on line) and (40) (dashed curve, orange on line), Figure 6a. In (40), we choose $\tau =1$, $\epsilon =0.3$. Figure 6b evinces, as to be expected, the qualitatively equivalent behaviors of the entropy production for finite value (${t}_{1}=0.3$) of the switching time. The dashed green line is computed from (40). The continuous blue line is the lower bound for the transition as predicted by [7]. (

**a**) $\frac{{\chi}_{t}-\mathit{q}}{\ell \left(\mathit{q}\right)-\mathit{q}}$; (

**b**) Running entropy production.

© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).