SECOND-ORDER ANALYSIS OF FOKKER–PLANCK ENSEMBLE OPTIMAL CONTROL PROBLEMS

. Ensemble optimal control problems governed by a Fokker–Planck equation with space-time dependent controls are investigated. These problems require the minimisation of objective functionals of probability type and aim at determining robust control mechanisms for the ensemble of trajectories of the stochastic system deﬁning the Fokker–Planck model. In this work, existence of optimal controls is proved and a detailed analysis of their characterization by ﬁrst-and second-order optimality conditions is presented. For this purpose, the well-posedness of the Fokker–Planck equation, and new estimates concerning an inhomogeneous Fokker–Planck model are discussed, which are essential to prove the necessary regularity and compactness of the control-to-state ma p appearing in the ﬁrst-and second-order analysis


Introduction
This paper is devoted to the analysis of problems of optimal control of ensembles of trajectories of stochastic drift-diffusion models from a statistical perspective. The notion of ensemble controls was proposed by R.W. Brockett in [14][15][16], while considering different feedback control strategies and the corresponding trade-off in implementation and performance. In this statistical approach, the Fokker-Planck (FP) equation, corresponding to the given stochastic model, governs the evolution of the entire ensemble of trajectories of the model (with a distribution of initial conditions), and an expected-value cost functional accommodates all possible stochastic realizations, thus allowing the design of closed-loop control mechanisms.
Recently, Brockett's research programme has received much impetus through novel theoretical and numerical work focusing on deterministic models with random initial conditions and the corresponding Liouville equation [5,6], and in the case of a linear Boltzmann equation [7]. The modelling and simulation of FP ensemble optimal control problems has been investigated in view of their large applicability [12,[34][35][36]. However, in comparison to the amount of work on FP control problems with quadratic objectives [2,11,23], much less effort has been put in the analysis of FP ensemble optimal control problems. On the other hand, in the former case, only very recently a detailed investigation of second-order optimality conditions of FP problems with time-dependent controls has been presented by M.S. Aronna and F. Tröltzsch [4]. The motivation for this analysis is manifold, as illustrated in, e.g., [19,20], and essential for exploring, in particular, stability and approximation issues. For this reason, we would like to contribute to the further advance of FP ensemble optimal control problems with the second-order analysis presented in this paper.
Fokker-Planck ensemble optimal control problems represent a new framework for designing robust controls of stochastic models that appear in different scientific disciplines. In the field of epidemic problems, stochastic models are of great interest because they take into account the fact that biological actions and human behaviour are subject to random fluctuations [25,26,42]. Stochastic systems also appear in the modelling and control of collective motion in biological systems -such as the movement of groups of bacteria or herds of animalsas well as in pedestrian motion and traffic flows [10,[34][35][36]. In these and many other works, the focus is on drift-diffusion models as follows dX t = B[u](t, X t ) dt + σ(t, X t ) dW t , X |t=0 = X 0 , t 0, (1.1) where X t ∈ R n is a continuous-time stochastic process, dW t ∈ R n a Wiener process, and X 0 a given ndimensional random variable. With B[u] we denote the drift including a control mechanism, and σ represents a variable dispersion matrix.
In the framework of stochastic control theory [9], the objective to be minimized subject to (1.1) is the following expected-value functional where R[u] = R[u](t, x) is usually called the running cost, and T = T (x) is referred to as the terminal observation.
We remark that the state of a stochastic process can be completely characterized by the shape of its statistical distribution, which is represented by the corresponding probability density function (PDF) that we denote with p = p(t, x). Further, we have a fundamental result in statistical mechanics showing that the evolution of the PDF associated to X t is modelled by the following FP problem In this problem, the FP equation (1.3) has an advection term that corresponds to the drift and the diffusion matrix a = 1 2 σ σ. The initial data is given by the initial PDF p 0 of X 0 . Further, we assume that the process is bounded and conserved in a bounded domain Ω ⊂ R n , which results in the flux-zero boundary conditions (1.4), where the vector probability density flux F has the components F j (t, x) := n i=1 ∂ xi a ij (t, x) p(t, x) − B[u] j (t, x) p(t, x) , j = 1, . . . , n, andn denotes the outward normal unit vector on ∂Ω. We can see that in passing from trajectories to PDFs, the space of the state X has become the space of an independent variable x with the same dimension.
Our analysis focuses on the following cost functional Notice that the first two terms in J(p, u) correspond to (1.2) and define, for an appropriate choice of R [u], an ensemble cost functional as discussed by Brockett. However, we have added an additional term corresponding to a H 1 -cost of the control that is not subject to averaging. This additional term plays a crucial role in our investigation, while in the last section of this paper, we consider variants of (1.5) with γ = 0 that accommodate different Brockett's ensemble functionals. Our FP ensemble optimal control problems are formulated as the minimisation of (1.5) subject to the differential constraint given by (1.3)-(1.4), and space-time dependent controls with admissible values in convex compact sets. While we do not investigate the case of additional constraints on the state p or the control u, for these cases we refer to [38,39] for a first-order analysis devoted to parabolic and hyperbolic models, and to [30] for the case of a semilinear elliptic equation.
Our analysis of the Fokker-Planck ensemble optimal control problem follows the work in [4], where a detailed first-and second-order analysis for time dependent n-dimensional L 2 -controls u = u(t) and quadratic objectives is presented. However, in our ensemble setting, we introduce a different functional framework that allows to accommodate space-time dependent controls and makes possible to perform second-order analysis. The main difficulty of the analysis of the optimal control problem (1.3)-(1.5) is treating the flux term div (B[u](t, x) p(t, x)) due to its bilinear form and the control being subject to differentiation, which leads to results with lower regularity for the control-to-state map.
The paper is organized as follows. The next section discusses existence and regularity of weak solutions to our Fokker-Planck problem. We also point out the properties of these solutions as PDF functions. In Section 3, in view of our first-and second-order analysis, we discuss a related inhomogeneous FP equation and present L ∞ -estimates concerning its solution.
In Section 4, we define and investigate the FP control-to-state operator and show its continuity, Fréchet differentiability and compactness on proper sets. In Section 5, we introduce the reduced cost functional and prove existence of optimal controls in the given admissible control sets. In Section 6, we discuss the characterization of these optimal controls by first-order optimality conditions. For this purpose, we introduce and analyze a FP adjoint equation and discuss the Fréchet derivative of the reduced cost functional in order to formulate the first-order necessary optimality conditions. Section 7 is devoted to the analysis of necessary and sufficient second-order optimality conditions for our FP ensemble optimal control problems. In Section 8, we discuss extension of our results to FP control problems with variants of Brockett's ensemble cost functional. These extension accommodate different settings that have appeared in the scientific literature, including Brockett's approach to minimal attention feedback control. A section of conclusion completes this work.

Notation and general assumptions
Let n ∈ N = N\{0} denote the dimension of x and let Ω ⊂ R n be a bounded domain with a Lipschitz boundary ∂Ω. For arbitrary but fixed T > 0, we define Ω T := ]0, T [ ×Ω and denote for a normed space Y and 1 p ∞ the Bochner-spaces by L p (0, T ; Y ) and C([0, T ]; Y ). The norms of the Lebesgue spaces L p (0, T ) and L p (Ω) are denoted, as usual, by · L p (0,T ) and · L p (Ω) and we write · p if the domain of integration is clear from the context. Furthermore, we define the L p -norm of a vector valued function u ∈ L p (Ω) m = L p (Ω; R m ) for later conveniences as u L p (Ω;R m ) = u p = ( m i=1 u i p p ) 1/p and u ∞ = m i=1 u i ∞ . As usual, H 1 (Ω T ) denotes the real Hilbert space of L 2 (Ω T )-functions with weak derivatives in L 2 (Ω T ) with the following scalar product and norm for f, g ∈ H 1 (Ω T ) In passing, we introduce for f defined on Ω T the derivatives with respect to t, x and (t, x) For m-dimensional vector valued functions u, we consider for later conveniences ∇u or Du as mn or m(n + 1) dimensional vector. If f is defined on ]0, T [ we emphasize this by writing d dt instead of ∂ t for the derivative. In all cases it is clear from the context if the derivatives are meant to be in the classical, weak or distributional sense. Furthermore, we denote by div f (x) := n i=1 ∂ xi f (x) the divergence of f . Integrals and the dependencies of functions can be abbreviated if the dependencies are clear from the context. As an example, for f defined on Ω T we write Ω T f (t, x) dt dx = Ω T f dt dx and Ω f (t, x) dx = Ω f (t) dx and so on. We also use the common notation with dots to emphasize the dependence of variables, for example the notation f (t) = f (t, ·) interprets f : Ω T → R as a function defined on Ω for some fixed t ∈ ]0, T [ . We choose the following affine linear structure on the the drift

Analysis of the Fokker-Planck problem
This section is devoted to the analysis of solutions to our FP problem (1.3)-(1.4). The results presented in this section are mainly extensions of well-known results for different FP problems [4,11] and parabolic problems [22] to our case given by (2.3)-(2.4).
We assume a dispersion σ ∈ W 1,∞ (Ω T ; R n×n ), and require that σ is full rank. Consequently, the diffusion matrix (a ij ) is coercive in the sense that there exists θ > 0 such that We also assume that the drift B[u] : Ω T → R n is an affine linear function of the m-dimensional control u as follows where c ∈ L ∞ (Ω T ) n and the matrix valued function M ∈ L ∞ (Ω; R n×m ) are given. This structure appears in, e.g., [35] in the context of optimal control of crowd motion. In this case, B[u](t, x) = u(t, x) + c(t, x), where c represents a given velocity field and u models a velocity deviation. The form (2. 2) also appears in an epidemiological context in modelling the rate of infections, where c and M characterize the dynamics of the disease, and each component of u takes the role of a mitigation measure, cf. [17,18,25]. In the epidemiological context, also a state dependent diffusion is used to model uncertainty in the dynamics. Further, in [8] ecological reaction-diffusion problems also coupled with FP equations are considered, and the following dispersion coefficient, among others, is discussed: Now, we suppose u ∈ L ∞ (Ω T ), and investigate a weak formulation of (1.3)-(1.4). For this purpose, notice that the FP equation can be written in flux form as ∂ t p = ∇ · F . Thus, applying Green's formula and using the boundary conditions (1.4) yields for a test function ψ ∈ H 1 (Ω) the following This result gives rise to the following bilinear flux-operator 3) The well-definedness of (2.3) is shown in Lemma 2.2 below. Consequently, given an initial state p 0 = p |t=0 on Ω, we have the following weak solution concept for (1. and if f ∈ L 2 (Ω) then f, · H = f, · L 2 (Ω) .
Furthermore, recall the continuous embedding W (0, T ) ⊂ C([0, T ]; L 2 (Ω)), which gives meaning to the expression p |t=0 ∈ L 2 (Ω). We also remark that the first equation in (2.4) is equivalent to the Bochner-space formulation that is used frequently throughout this papeṙ p + F(p, ·) = 0 in L 2 (0, T ; H 1 (Ω) ) (2.6) and the well-known distributional formulation In order to show existence of a unique weak solution, we need certain a priori bounds. Since the diffusion does depend on x, we need to exploit the coercivity of the diffusion matrix and to this aim, we rewrite the bilinear flux-operator as follows Proof. We use the ellipticity (2.1) of σ with ξ := ∇p and obtain f.a.
Next, we use the ε-Young's inequality ac εa 2 + c 2 /(4ε), which holds for a, c ∈ R and ε > 0 arbitrary, and choose a = |∇p|, c = |p| and ε = θ/(2 b ∞ ). Thus, we conclude Finally, adding θ 2 Ω |p(x)| 2 dx to both sides of (2.10) yields the assertion with constants β := θ/2 and γ : In order to show boundedness, let p, ψ ∈ H 1 (Ω) and obtain The two properties of the bilinear form F given in Lemma 2.2 yield existence of a unique solution to (2.4) in the following way. Theorem 2.3. For every initial state p 0 ∈ L 2 (Ω) it holds: a) There exists a weak solution p ∈ W 1,2 (0, T ; H 1 (Ω) ) ∩ L 2 (0, T ; H 1 (Ω)) of the Fokker-Planck problem with flux-zero boundary conditions and p(0) = p 0 in the sense of Definition 2.1. b) There exists some C > 0 only depending on σ, b and Ω T such that Proof. The existence of weak solutions can be shown with a standard Galerkin approach. For the convenience of the reader, we prove the necessary a priori estimates, even though the results are well-known.
Let p denote a weak solution. Due to the regularity of p, there exists one representative in C([0, T ]; L 2 (Ω)), which is fixed from now on. This yields the following well-known identities, which are used frequently throughout this work, cf. [21], For a.e. τ ∈ [0, T ], we can choose p(τ ) ∈ H 1 (Ω) as test function to obtain with (2.11), Definition 2.1 and the weak coercivity of F t , the following estimate Since t → p(t) L 2 is continuous, we have by Grönwall's inequality In order to verify the L 2 (0, T ; H 1 (Ω))-bound we notice with Lemma 2.2, (2.11) and (2.12) that a.e. t) and the boundedness of F t to obtain Consequently, the L 2 (0, T ; H 1 (Ω) )-bound follows from the L 2 (0, T ; H 1 (Ω))-bound of p and the proof of b) is complete.
In order to verify uniqueness, assume that p,p ∈ C([0, T ]; L 2 (Ω)) are both weak solutions to the same initial state p 0 . Once again with (2.11) and Lemma 2.2 we have Thus, applying Grönwall's lemma gives the assertion and the proof is complete.
In Lemma 2.2 and Theorem 2.3, we have stated properties that are typical for many parabolic problems. However, in the following corollary, we underline the probabilistic nature of weak solutions to a specific formulation of our Fokker-Planck problem.
Corollary 2.4. Let p 0 ∈ L 2 (Ω) be a probability distribution function, i.e., i) Ω p 0 (x) dx = 1 and ii) p 0 0 a.e. on Ω and let p be the unique weak solution in C([0, T ]; L 2 (Ω)). Then for all t ∈ [0, T ], p(t) ∈ L 2 (Ω) does also have these properties, in particular, We say that the Fokker-Planck problem with flux-zero boundary conditions is conservative.
Proof. First notice that due to the flux zero boundary condition, the test function appears only as a gradient in the bilinear form F. Hence, the conservation of the total probability follows from the definition of a weak solution if we choose ψ = 1 ∈ H 1 (Ω) as a test function But sinceṗ(t) is only a H 1 (Ω) -function and since the following argument appears multiple times in this paper we carefully prove the last equal sign. First, recall the continuous embedding and the fundamental theorem of calculus for Banach space valued functions Hence, the last equal sign in (2.15) follows with a density argument: Let Taking the limit on both sides proves the conservation of the total probability. In order to show the non-negativity of p, we consider its negative part Note that in general p − does not belong to W 1,2 (0, T ; H 1 (Ω) ), nevertheless an integration-by-parts formula still holds and we refer to [40] for a proof. This implies This yields with p − (0) = 0 and the weak coercivity of F that for every t ∈ [0, T ] 0 which in turn provides p(t) 0 a.e. on Ω.
With a standard interpolation estimate for Bochner-spaces, we obtain Rearranging both equations to τ and r yields the upper bounds in the first line. The second embedding is the case τ = r.

An inhomogeneous Fokker-Planck problem
In this section, in preparation of our analysis of optimality conditions, we discuss an inhomogeneous FP equation with a right-hand side belonging to the space L 2 (0, T ; H 1 (Ω) ). The presence of a source term leads to the fact that the FP solution is no longer a PDF and Corollary 2.4 does not hold in general.
The main result of this section is the L ∞ -estimate given in Theorem 3.2, which is essential for the upcoming analysis of the FP ensemble optimal control problem. Although new, this result is known to be true for similar parabolic equations and we were able to use the available techniques of the proof to our case; see [13,41].
As in the previous section, we have the general assumptions and B[u], F, b are given by (2.2), (2.8), (2.9).
Let g ∈ L 2 (0, T ; H 1 (Ω) ) and p 0 ∈ L 2 (Ω). Then there exists a unique weak solution p ∈ W (0, T ) of the inhomogeneous Fokker-Planck problem in the sense of Definition 2.1, such that there exists a null set N ⊂ [0, T ] with with initial condition p(0) = p 0 a.e. on Ω. Additionally, there exists some C > 0 only depending on Ω T , σ, c, M, u ∞ such that Proof. Due to the linearity of the Fokker-Planck equation, the proof can be easily deduced from the proof of Theorem 2.3.
The following L ∞ -estimate is crucial for the second-order analysis and is shown with a De-Giorgi Iteration.
with flux-zero boundary conditions and p(0) = p 0 a.e. on Ω. Let the source term be of the form Then there exist some γ, C > 0 depending only on the initial state, the dispersion and the drift, such that Remark: If n = 3 we know that p ∈ L η (Ω T ) with η < 10 3 . On the other hand, q > 4(n+2) n+4 = 20 7 which is smaller than 10 3 and hence in (3.4) p q C p 0 2 for n ∈ {1, 2, 3}.
Proof. We fix a pointwise defined representative of p ∈ W (0, T ) that is in C([0, T ]; L 2 (Ω)) and for any γ > 0, λ > p 0 ∞ , we define the C([0, T ]; L 2 (Ω))-functions Notice that f ∈ W (0, T ), f λ is non-negative on Ω T and positive on the measurable set and an integration-by-parts formula holds, cf. [40]. We remark that the (n + 1)-dimensional volume of M λ does not depend on the choice of the pointwise defined representative of p. Furthermore, we can assume that vol M λ > 0 for all λ > p 0 ∞ , otherwise the assertion is already shown.

Remark:
The assumption q > 4(n+2) n+4 for the case n 3 can be weakened if g 2 = 0 and if we find better estimates for the gradient of p. For example, it is well-known hat one obtains the regularity p ∈ L 2 (0, T ; H k (Ω)) with more assumptions on the Fokker-Planck problem. Since we do not need this for the second-order analysis, we will not go into this any further. Theorem 3.2 immediately gives L ∞ -solutions for the Fokker-Planck problem if we consider controls u and initial data p 0 from L ∞ (Ω) with dimension n ≤ 3. Even more far-reaching consequences are, as we show in Lemma 4.2, that even the weak L 2 -convergence of controls is enough to obtain the convergence of the corresponding solutions in W (0, T ).

The Fokker-Planck control-to-state map
In this section, we analyse the mapping of a control u to its corresponding state p solving our Fokker-Planck problem. For this analysis we follow [4] to show the well-definedness and differentiability. Moreover, we obtain compactness of the FP control-to-state map for time and space dependent controls. This is done by using the L ∞ -estimates given by Theorem 3.2.
In the following, we assume the given initial state p 0 ∈ L ∞ (Ω) to be a probability density function with state dimension n ≤ 3; see Corollary 2.4. Furthermore, let u min , u max : Ω T → R m be measurable and bounded such that ∅ = U ad , U H ad with and define In order to give meaning to Fréchet-differentiability on the admissible sets, we assume that the interior of U ad (and U H ad ) with respect to · ∞ (and · U ) is non-empty. Moreover, we add the control vector u to the notation of the bilinear flux and write F[u] instead of just F.
The operator G maps any admissible control to the associated state and is therefore referred to as the controlto-state operator.
Existence and uniqueness of G follow directly from Theorem 2.3 and the expression G(u)(0) ∈ L 2 (Ω) is well defined. Next, we discuss further properties of the control-to-state map G, that is, Fréchet-differentiability, Lipschitz-continuity and compactness.
We start with the Fréchet-differentiability on L ∞ (Ω T ) m and U . We follow [4] and consider the functional First, we see that both components of H are arbitrarily often continuously Fréchet-differentiable on W (0, T ) × L ∞ (Ω T ) m . Now, observe that H was defined such that H(p, u) = (0, 0) iff p is a solution of the Fokker-Planck problem with drift u and initial PDF p 0 . Hence, H(G(u), u) = (0, 0) for all u ∈ L ∞ (Ω T ) m . Next, we recall the implicit function theorem on Banach spaces. In order to apply this theorem, we have to show that the mapping is an isomorphism. But this follows immediately from Corollary (3.1), specifically, the injectivity follows by the uniqueness and the surjectivity by the existence result. Hence, the implicit function theorem is applicable for any starting points (p, u) ∈ W (0, T ) × L ∞ (Ω T ) m with H(p, u) = (0, 0). Finally, we can deduce that G is continuously Fréchet-differentiable in u ∈ L ∞ (Ω T ) m , if we apply this theorem in (G(u), u). This yields a continuously Fréchet-differentiable functionG with H(G(u), u) = (0, 0) on a open neighbourhood u ∈Ũ ⊂ L ∞ (Ω T ) m . By uniquness,G = G onŨ , and since u was chosen arbitrarily, we obtain the differentiability of G on L ∞ (Ω T ) m .
Furthermore, differentiating H(G(u), u) = 0 with respect to u gives an implicit formula for G (u), namely We notice that all of the above can be done analogously if we replace L ∞ (Ω T ) m with U . For the upcoming first-and second-order analysis, it is essential that (4.10) is an inhomogeneous Fokker-Planck problem and the source term f lin [u, v] takes the form above. Now, let us summarize our previous and some further results with the following lemma: where C = C(Ω T , σ, c, M, u ∞ ). b) G is locally Lipschitz-continuous on L ∞ (Ω T ) m w.r.t the W (0, T )-norm, i.e., c) For u ∈ L ∞ (Ω T ) m and for any sequence Proof. In order to prove estimate (4.11), we recall that z is a solution of the Fokker-Planck problem with initial state zero and right-hand side f lin [u, v]. Thus, we can apply the estimate (3.2) from Corollary 3.1 and observe for ψ ∈ H 1 (Ω) Similarly, we show the last assertion and set z k := G(u) − G(u k ) = G (u)v k , v k := u − u k for k ∈ N. According to (4.11), z k is uniformly bounded in W (0, T ) and therefore there exists some z ∈ L 2 (0, T ; H 1 (Ω T )) and ζ ∈ L 2 (0, T ; H 1 (Ω) ) such that for a subsequence For convenience, we prove thatż = ζ: let φ ∈ C ∞ c ( ]0, T [ ) and ψ ∈ H 1 (Ω) and we interpret the L 2 (0, T ; H 1 (Ω))function z as L 2 (0, T ; H 1 (Ω) )-function. On the one hand, we have by the weak convergence in L 2 (0, T ; H 1 (Ω) ) that (for a subsequence) On the other hand, we have for the fact that we can interchange the integral and the continuous function ·, ψ H can be shown straight forwardly by an approximation with simple functions. Since ψ ∈ H 1 (Ω) was arbitrary, this implies with (4.14) and (4.15) that Finally,ż = ζ in L 2 (0, T ; H 1 (Ω) ) follows from the fact that (4.17) holds for every φ ∈ C ∞ c ( ]0, T [ ). Now, we can show that f lin [u k , v k ] → 0 in L 2 (0, T ; H 1 (Ω) ), which yields z k → 0 in W (0, T ) according to Corollary 3.1. Recall the fact that for any dual 1 < p, q < ∞ and reflexiv banach space X we have that L p (0, T ; X ) and L q (0, T ; X) are isometric isomorph. Hence, for ϕ ∈ L 2 (0, T ; H 1 (Ω)) we have (we omit the (t, x) argument in the second line) The first term can be estimated against C(u min , u max ) G(u k ) − G(u) 2 L 2 (Ω T ) ϕ 2 L 2 (0,T ;H 1 (Ω)) and therefore converges to zero as k tends to infinity (for a subsequence). On the other hand, we must exploit the fact that G(u) ∈ L ∞ (Ω T ) and hence the mapping is linear and continuous. Consequently, due to the weak convergence of (v k ) in L 2 (Ω T ) m , the second term also tends to zero and we have shown that f lin [u k , v k ] → 0 in L 2 (0, T ; H 1 (Ω)) .

A FP ensemble optimal control problem
In this section, we consider the following functional (Ω) and R[u] := α · u + β on Ω T . If we assume γ = 0 then J shall be defined on W (0, T ) × L ∞ (Ω T ) m , else on W (0, T ) × U . In this section, both cases γ = 0 and γ > 0 are discussed, whereas we are restricted to the case γ > 0 for the second-order analysis in Section 7.
Our FP ensemble optimal control problem requires to minimize (5.1) subject to the differential constraint given by the FP problem (1.3)-(1.4). Thus, we introduce the reduced functional and hence we consider two FP optimal control problems with control constraints given by Proof. The proof is divided in three steps and we always start with the case γ = 0.
Step 1: First we need to make sure thatĴ is bounded from below. On one hand, we can estimate G(u) in where C = C(Ω T , σ, c, M, u ∞ ). On the other hand, u ∈ U ad implies the boundedness of u ∞ C(u min , u max ) and since α i , β ∈ L ∞ (Ω T ) and T ∈ L 2 (Ω) it follows that The case γ > 0 is done analogously.
Step 2: Thus, there exists a minimizing sequences u k k∈N ⊂ U ad such thatĴ(u k ) → I as k → ∞. Now observe that u k ∞ is uniformly bounded by u min , u max and that U ad ⊂ L 2 ∩ L ∞ (Ω T ) m is closed w.r.t · L 2 (Ω T ) . This implies the existence of some u ∈ U ad such that (for a subsequence) u k u in L 2 (Ω T ). Hence, according to Lemma 4.2 c) the sequence of corresponding states G(u k ) converges to G(u) in W (0, T ).
If γ > 0 the minimizing sequence is in U ad ∩ H 1 (Ω T ) m and bounded because for k ∈ N γ 2 u k 2 where C = C(Ω T , σ, c, M, α, β, T , p 0 ). In both cases γ = 0 and γ > 0, the weak lower semicontinuity ofĴ, which is shown in Step 3, implies and the assertion is proven.
Step 3: Recall that and that u k u in L 2 (Ω T ) already implies G(u k ) → G(u) in W (0, T ) for a subsequence. For the last term, we can obviously use the weak lower semicontinuity of the H 1 -norm, since in the case γ > 0, the estimate (5.6) implies u k u in H 1 (Ω T ) for a subsequence. Further, G(u k ) → G(u) in C([0, T ]; L 2 (Ω)) and T ∈ L 2 (Ω) yield the convergence for the second term. Concerning the difficult part of the first term, we add ±α · u k G(u) to obtain as k tends to infinity for a subsequence and the weak lower semicontinuity ofĴ is proven.
Once existence of optimal controls are established, we are interested in necessary and sufficient conditions for local optimality. Furthermore, we introduce the corresponding optimality system.

Optimality systems and first-order conditions
We say thatū ∈ U ad (orū ∈ U H ad ) is a local minimum ofĴ in the normed subspace The differentiability of the reduced cost functionalĴ allows us to introduce the following first-order necessary optimality conditionĴ Now, we introduce the Lagrange functional L(p, u, q) =Ĵ(u) + ∂ t p − div F, q L 2 (Ω T ) , and consider (formally) its stationary points. The first-order necessary conditions for u solution to (5.3) are given by where the so-called adjoint operator is defined as follows and q is the solution to the adjoint problem (6.4). Next, we analyze the optimality system (6.3), (6.4), (6.5) and (6.3), (6.4), (6.6). We prove existence of sufficiently regular solutions to the adjoint problem (6.4) and show the well-definedness of (6.5) and (6.6). Furthermore, we establish a criterion whether or not we have equality in (6.5), cf. Corollary 6.4 b).
Similar optimality systems are considered in [4,34]. We derive the weak formulation of the adjoint problem straight forwardly: Let q be a solution to (6.4) and let ψ ∈ C 1 (Ω). Integrating by parts for the diffusion term combined with the Neumann-boundary conditions, we have formally for t ∈ [0, T ] This leads to the following concept of weak solutions to the adjoint problem.
Proof. This follows similarly to the first section after the time transformation t → T − t; notice that This result implies on the one hand the existence of weak solutions of (6.4) and on the other hand we have for u, v ∈ L ∞ (Ω T ) m and p = G(u) Next, we show why the first-order condition (6.2) can be formulated as (6.5) or (6.6), respectively.
First, we derive an important connection between the linearized state equation and the adjoint system of the Fokker-Planck problem. Recall that z : in L 2 (0, T ; H 1 (Ω) ) (6.10) z(0) = 0, a.e. on Ω, (6.11) where the right-hand side of the linearized equation is (6.12) which follows by testing the weak formulations of z and q, cf. (6.10) and (6.7), with the H 1 (Ω)-functions q(t) and z(t). We remark that, due to the regularity z, q ∈ W (0, T ), it holds that This relation helps us rewriting the derivative of the reduced cost functionalĴ in (6.2). We have where q is the corresponding weak solution of the adjoint problem (6.7), (6.8) with control u. Then the Fréchetderivative ofĴ at u is given bŷ 14) Proof. First, recall that and hence for v ∈ U (if γ > 0) or v ∈ L ∞ (Ω T ) m (if γ = 0) we obtain with (6.12) and z : This gives an explicit first-order optimality condition: a) Let γ > 0 and letū ∈ U H ad be a local minimum ofĴ in U . Then Proof. Equations (6.16) and (6.17) are immediately obtained by rewriting (6.2) with (6.14) and (6.15), respectively. The other assertion in b) follows with a proof by contradiction by testing (6.17) with proper u ∈ L ∞ (Ω T ) m .
Proof. This assertion follows from an application of Theorem 2.2 in [19]; the regularity condition can be shown with standard techniques, cf. Theorem 6.6 of [4].
Next, we prove a sufficient condition for a controlū to be locally optimal, cf. Theorem 7.2. We only consider the case γ > 0 and controls in U H ad . Therefore, we exploit the following theorem by Casas and Tröltzsch [19]; slightly adapted to our case. In passing, let us introduce L(H 1 (Ω T ) m ) and B(H 1 (Ω T ) m ), which denote the space of (bi)linear, continuous ad . Assume that the reduced cost functionalĴ : U → R satisfies the following assumptions: (A1)Ĵ is of class C 2 in U H ad . Moreover, for every u ∈ U H ad there exist continuous extensionŝ (A3)ū satisfies the first-and second-order necessary conditionŝ The sets are defined as follows Sū := {λ(u −ū) : λ > 0 and u ∈ U H ad }, (cone of feasible directions) where Sū H 1 denotes the closure of Sū with respect to the norm · H 1 (Ω T ) . Then we have local H 1 -optimality atū in the sense that there exists ε > 0 and δ > 0 such that Proof. We prove by contradiction and assume that (7.1) does not hold. Hence, we find a sequence (u k ) ⊂ U H Moreover, we define v k := (u k −ū)/ u k −ū H 1 for k ∈ N and thus v k H 1 = 1. Consequently, there exists some v ∈ H 1 (Ω T ) m such that, for a subsequence, Now if we can show with the help of (A1)-(A3) that v = 0, we would obtain the contradiction using assumption (A2.3). To this end, we show that v ∈ Cū andĴ (ū)v 2 = 0 which implies v = 0 due to (A3.2). v ∈ Cū: Since (v k ) is a subset of the convex set Sū, we invoke Mazur's Lemma and find a convex combinations that converges strongly to v in H 1 (Ω T ) m . Thus, the closedness of Sū . In order to shoŵ J (ū)v = 0, we exploit the necessary first-order condition (A3.1) in the first line and use the mean value theorem with proper coefficients (θ k ) k∈N ⊂ [0, 1] in the second line to obtain Now thanks to Assumption (A2.1), both terms on the left hand side converge toĴ (ū)v as k tends to infinity, which proves the assertionĴ (ū)v = 0. J (ū)v 2 = 0: Once again, we can find (θ k ) ⊂ [0, 1] such that by a Taylor expansion inū, and hence after dividing by u k −ū 2 H 1 , we obtain Now, we apply the strong Assumptions (A2.2) in order to confirm v = 0, and finally (A2.3) gives the desired contradiction Let us explain why we are restricted to γ > 0 and controls from H 1 (Ω T ). On the one hand, we need some L 2 -norm on the controls inĴ such thatĴ satisfies assumption (A2.3); notice that this is exactly the assumption which gives the desired contradiction in the proof of Theorem 7.2. On the other hand, replacing H 1 (Ω T ) with L 2 (Ω T ) leads to v k v only in L 2 and we are -in general -no longer able to verify (A2.2). This is due to the fact that v appears on the right hand side of the differential equations which implicitly yield the derivatives of the control-to-state map and certain integrability of it is necessary for L ∞ -estimates, see Theorem 7.3. Now, our aim is to show that our reduced cost functionalĴ, given by (5.2) for the case γ > 0, does fulfil the assumptions of Theorem 7.2.
Proof. The first assertion can be verified with Theorem 3.2 as follows: In view of (3.3), observe that the righthand sides f lin [u, v] and f quad [u, v] have the correct shape if we define g 1 = 0 and g 2 := −p i M v i for z i and g 2 := −2z i M v i for w i . Hence, it holds for any q > 4(n+2) n+4 if n = 3 and q > 2 if n ∈ {1, 2} that With the L ∞ -estimate for z 1 at hand, we immediately obtain the estimate for p 1 − p 2 ∞ by choosing v 1 = u 1 − u 2 ; recall that z 1 = G (u 1 )v 1 = p 1 − p 2 , cf. Lemma 4.2.
Next, we show the third estimate and define δz := z 1 − z 2 . Similarly to the proof of Lemma 4.2, we obtain that δz ∈ W (0, T ) solves again a Fokker-Planck problem with drift u 1 and some right-hand side f lin δ in L 2 (0, T ; H 1 (Ω) ). For any ψ ∈ H 1 (Ω) and a.e. on [0, T ], we find that According to Corollary 3.1, we need to bound f lin δ in L 2 (0, T ; H 1 (Ω) ) for the W (0, T )-estimate. Almost everywhere on [0, T ] we obtain the following estimate The L ∞ -estimate is obtained with Theorem 3.2 if we bound the g 2 term of the right-hand side, i.e. f lin δ (ψ) = Ω T g 2 · ∇ψ, in the L q (Ω T )-norm as follows The same procedure can be done with δw := w 1 − w 2 ∈ W (0, T ) in order to obtain the Lipschitz estimates for G . For any ψ ∈ H 1 (Ω) and a.e. on [0, T ], we find that and hence for u, v 1 , v 2 ∈ Û We summarize our results and extend the bilinear form J (u) to U . with C = C(Ω T , σ, c, M, p 0 ∞ , u min , u max ) > 0 and as k tends to infinity we obtain as desired. Next, we can prove the following limit In this case, we aim to minimize the following functional with given u min , u max : [0, T ] → R m measurable and bounded such that U T ad = ∅. We remark that in (8.4), the time derivative of the control is due to Brockett's concept of minimum attention control aim at penalizing large variation of the control, cf. [14].
For this setting, all the important properties of the control-to-state map corresponding to the drift (8.3) can be shown analogously to the previous sections. In particular, existence of optimal controls follows immediately: We pick a minimizing sequence (u k ) ⊂ U T ad , show u k u in H 1 (0, T ) and obtain J(u k , G(u k )) > −∞ and G(u k ) → G(u) in W (0, T ) for a subsequence. Proving weak lower semicontinuity is easier, since all p k , p are PDFs, and we have Ω T γ 1 2 |u(t)| 2 + γ 2 2 |Du(t)| 2 p(t, x) dt dx = T 0 γ 1 2 |u(t)| 2 + γ 2 2 |Du(t)| 2 dt. (8.5) This proves the existence of an optimal control in U T ad . Our second-order analysis can be applied analogously with the L ∞ -convergences of the Fréchet-derivatives of G(u k ) and using the trick of (8.5) to verify assumptions (A1) and (A2) from Theorem 7.2. This implies H 1 -local uniqueness; see Corollary 7.6.

Conclusion
This work was devoted to the investigation of ensemble optimal control problems governed by a Fokker-Planck equation. These problems require the minimisation of objective functionals of probability type and aim at determining robust space-time control mechanisms for the ensemble of trajectories of the stochastic system defining the Fokker-Planck model. In this work, existence of optimal controls was proved and detailed analysis of first-and second-order optimality conditions characterizing these controls was presented.