1. Introduction
Hamilton-Jacobi equations are well-know partial differential equations (PDEs) that have been successfully used to model moving interfaces. In fact, they are the basis of a widely-studied family of methods usually referred to as level set methods [
1]. Hamilton-Jacobi equations are useful not only for the purpose of modeling dynamic fronts, but also to solve optimal control problems over finite and infinite horizons [
2], with a number of different applications (see, e.g., [
3,
4,
5]). In this paper, we propose a novel approach to construct optimal propagating fronts with propagation speed selected in order to minimize a suitable cost functional accounting for a desired front behavior. Sufficient conditions of optimality given by a system of nonlinear Hamilton-Jacobi equations are derived that can be numerically solved when it is difficult to find analytic solutions [
6,
7,
8].
The propagation of fronts or boundaries separating two regions, either curves in two dimensions or surfaces in three dimensions, is a topic that has gained a lot of attention in the last decades. In fact, modeling the motion of fronts is crucial in different research areas such as, for instance, fluid dynamics and image processing (see, e.g., [
9,
10,
11,
12] and the references therein). The methods available in the literature for this task are usually catalogued as Lagrangian front tracking and Eulerian front capturing approaches. Front tracking ones are Lagrangian since they rely on the discretization of the front by means of a mesh. A number of points is positioned along the front, and such points are then moved by using ordinary differential equations (ODEs) [
13,
14]. Lagrangian methods turn out to be quite efficient and precise in applications with fronts characterized by small deformations, but their performances degrade in case of changes of topology, when they need re-meshing upon strong deformations of the boundary. Instead, front capturing methods are Eulerian since the boundary is represented implicitly on fixed grids. Level set methods are an important family of Eulerian approaches that overcome the aforementioned limits of Lagrangian techniques. In such methods, the front is described by the zero level set of a multidimensional function [
9]. The possibility to easily account for changes of topology is one of their main features. The most known methods are those based on the normal flow equation (in which the propagation speed is directed towards the normal to the front) and the mean curvature flow equation (in which the speed is proportional to the curvature of the front in all points). In other words, they differ on the choice of the velocity field in the Hamilton-Jacobi equation.
The literature on the optimal control of infinite-dimensional systems (see [
15] for an introduction) is vast and with a special emphasis on fluid flows [
16,
17,
18], where the problems are addressed in abstract Banach spaces. By contrast, the literature regarding the control of moving fronts is at the very beginning. The control of level sets resulting from a two-phase Stefan problem is investigated in [
19,
20]. In [
21], an original prey-predator model is presented with a predator front modeled as a curve that moves depending on the prey density. More recently, in [
22,
23,
24], the problem of finding the normal velocity to the front described by level sets of a normal flow equation is attacked with the goal of minimizing a given performance index. After proving the existence of a solution to such a problem, the extended Ritz method is proposed to find suboptimal solutions [
7,
25]. Such solutions take on the structure of neural networks depending on neural weights, i.e., a set of parameters that need to be tuned. Then, the Gauss-Newton descent method can be used to find an optimal value for the weights, and the resulting algorithm may be viewed as neural learning based on the extended Kalman filter (EKF) [
22,
24].
As compared with such works, the present paper provides some advances. A new solution paradigm is proposed for the finite-horizon optimal control problem originally proposed in [
23,
24]. More specifically, sufficient conditions of optimality are rigorously established that require the solution of a system of Hamilton-Jacobi PDEs [
26]. Similar conditions are proved for the extension of the same problem to an infinite horizon. Since analytic solutions of such problems are almost impossible to find, approximate solutions are searched for by using a numerical scheme based on the method proposed in [
27]. The resulting approach is compared with that of [
24,
28] both in terms of computational time and ability to optimize the cost functional, thus highlighting the effectiveness of the proposed technique.
The rest of this paper is structured as follows. The main results concerning the considered problems are presented in
Section 2.
Section 3 describes the numerical results obtained in two case studies. Conclusions and prospect of future work are discussed in
Section 4.
The following notation will be adopted throughout the paper. We define
, where
and
. Let
be a real linear normed space of functions with norm
. Given a functional
,
F is Fréchet differentiable in
if there exists a functional
such that
where
,
is the Fréchet derivative of
, and
is a remainder of order higher than one, i.e.,
Finally, let
for any real vector
x.
2. Optimal Moving Fronts
In this section, we focus on how moving fronts can be described by level set methods. Toward this end, let
and
be a compact space domain of dimension
q and
a given time horizon (in the case of infinite horizon problems, we consider the time domain
). A moving front is a curve in two dimensions (
) or a surface in three dimensions (
) that separates two regions, associated to the zero level set of a function
. The boundary
is given at time
t by the points such that
, where
s is the arc-length parameter of the initial curve
.
Figure 1 displays fronts at time instants
and
together with the corresponding functions
. After differentiating with respect to
t, we obtain
where
is the Lagrangian particle velocity representing the direction of propagation of the front at the point
, and ∇ is the gradient with respect to space. From now on, we refer only to the normal flow equation, in which
is chosen proportional to the normal to the front, i.e.,
where
u is the propagation speed. After replacing (
2) in (
1), we obtain the normal flow equation:
Equation (
3) is associated to initial conditions
, i.e.,
for all
. Usually,
is the signed distance to the initial front. The level set
of the function
is a set-valued mapping
, where
.
We deal with the optimal control of (
3) via a suitable choice of
u. In other words, our aim is to drive the propagating front associated to a certain level set of
as desired. In practice, the speed function
u is considered as a control action depending on time and space, i.e.,
. Let us denote by
the set of admissible control functions, such as the set of measurable bounded functions. This set is made of the smooth functions
such that there exist solutions to the Cauchy problem for (
3). Let
be the space of functions
where such a problem is formulated.
The evolution over time and space of a level set of
may be related to a performance indicator depending on the interior or the boundary of the interface (see, e.g., [
20]). In this respect, we focus on a cost functional quantifying performances of the control policy, as follows:
where
and
is a final penalty term, which we want to minimize subject to the normal flow equation in (
3).
More generally, let us consider the running-time cost functional
with
and the functionals
and
, which, in the case of (
4), are given by
and
with a little abuse of notation. Such functionals are assumed to be continuous in their arguments, i.e.,
and
u for
L as well as
for
K. Our goal is to find the control policy
that minimizes
with (
3) as a constraint. Thus, we define
for
.
Under mild conditions, the existence of viscosity solutions to (
5) is shown ([
24], Theorem 2, p. 905). Such a result is not constructive, but, by restricting the search to smooth solutions, the following holds.
Theorem 1. Assume that there exists a continuously differentiablewithandwithsuch thatwithand, whereis the Fréchet derivative ofwith respect to ϕ andis the partial time derivative of V. Then, Proof. The proof is in line with [
29], Theorem 1, p. 6. In more detail, using
since
and
in general, from (
6) and (
7) we obtain
for all
, and hence (
8) holds by choosing
. □
Let us focus on such a result by considering a simple example.
Example 1. Consider a one-dimensional problem on the domainwithand. For the sake of simplicity, we search for an optimal control policy that depends only on time, i.e.,. Moreover, we focus on a quadratic cost According to Theorem 1, a sufficient condition of optimality is given bytogether with the related normal flow equation. Thus, we getand Ifand, we can easily verify that the solution of (9) is given byand. The finite-horizon problem considered so far can be extended to an infinite horizon setting by dealing with discounted cost functionals such as
where
and
is bounded for all
. The following result holds.
Theorem 2. Assume that there exists a continuously differentiablewithandsuch thatwithand, whereis the Fréchet derivative ofwith respect to ϕ. Then,with. Proof. It is grounded on the theoretical framework reported in [
2], which deals with the Hamilton-Jacobi-Bellman approach to the solution of infinite-horizon optimal control problems for systems described by ODEs. We will briefly sketch the demonstration by referring to [
2] for details. Notice that
for all
and, after a simple change of integration variable,
Following ([
2], Proposition 2.5, p. 102), according to the principle of dynamic programming, the function
is optimal if and only if the pair
is optimal, i.e.,
. If we perturb the optimal solution in the interval
, it follows an increase of
, i.e.,
. Using
with
denoting the remainder of order higher than one, we obtain
and, after computing the derivative of
and after multiplying for
, we get (
11) with (
12) for (
13) to hold. □
Remark 1. After selecting the desired shape in Ω as the zero level setof a given reference function, the goal is that of handling the zero level setassociated to the solutionto matchas much as possible. Thus, a convenient choice of the cost functional to minimize is the symmetric difference between such level sets, i.e.,where Δ stands for the symmetric difference operator, i.e.,, while η is an outer measure on(see Figure 2). Though the proposed approach can deal with other performance indexes under the required assumptions (i.e., smoothness and, in the case of Theorem 2, the boundedness of), the choice of the cost strongly depends on the goal of matching the required shapes and thus it reduces to adopt a measure of the symmetric difference between level sets. Unfortunately, it is difficult to find an expression for the minimizer in (
7) or (
12) (especially when we search for control laws that depend on both space and time) and obtain the exact analytic solution of (
6) or (
11) in general. Thus, numerical methods are well-suited to finding approximate solutions, as shown in the next section, where we deal with two case studies.
3. Numerical Results
In this section, we present the simulation results obtained in solving optimal control problems concerning the tracking of reference curves both in two and three dimensions (2D and 3D, for short). Specifically, we will search for a mapping
that drives the zero level set
of the solution
of (
3) in order to match the zero level set
of the function
by using the cost functional
with
denoting the approximate Heaviside step function, i.e.,
where
modulates the smoothness of the approximation.
The solution of (
6) with (
7) was found by the approach presented in [
27] (see also [
30]), where the minimization in (
7) was obtained by using the
fmincon routine of the Matlab Optimization Toolbox. We refer to such a solution procedure as Guo-Sun numerical optimization (GSNO) method. For the purpose of comparison, we considered also the approach presented in [
24], where the extended Ritz method is adopted to find parametrized approximate solutions by using a Gauss-Newton descent method. Such a method is treated by using a computationally efficient algorithm based on the extended Kalman filter (see [
24] for details), thus it will be briefly referred to as EKF-based optimization (EKFO).
We considered two case studies in 2D and 3D. As regards the 2D example, we focused on a space domain
, discretized using a regular grid of
points for the numerical solution of (
3). The time interval was fixed to
. The sampling time
was chosen equal to
, i.e., the simulation was completed after 50 time steps. Concerning the 3D case, we adopted a domain
sampled with a grid made of
nodes. The time interval for the simulation was
using a time step
, i.e., the simulation was performed in 30 time steps. In both case studies, we fixed
τ to 10
−2 in (
15).
Concerning the EKFO, we chose one-hidden-layer feedforward neural networks with sigmoidal activation functions as parameterized approximating functions. In particular, we tested various numbers of basis functions, i.e., we considered n = 5, 10, and 15 neurons. Such numbers ensured sufficient accuracy with quite simple approximating structures. All the results were averaged on 50 randomly-chosen initial weights. Similarly, we randomly generated the initial points of the fmincon routine of the GSNO. We used a personal computer with a 2.6 GHz Intel Xeon CPU with 64 GB of RAM running Windows 10 to perform the simulations.
Figure 3 and
Figure 4 show the results gained by using the GSNO with the reference and simulated fronts at different time instants.
Table 1 reports the means of the optimal cost
J° and of the computational time
required to perform the computations with the GSNO and EKFO over 50 trials.
Figure 5 displays the boxplots of the cost
J° and of the computational time
obtained with 10 neurons. As compared with the EKFO, the GSNO is computationally much less demanding, especially in the 3D case study. In terms of resulting optimal cost, the results given by EKFO and GSNO are quite close.