# Penalty function method for the minimal time crisis problem

Kenza Boumaza, Térence Bayen, Alain Rapaport

► To cite this version:

Kenza Boumaza, Térence Bayen, Alain Rapaport. Penalty function method for the minimal time crisis problem. ESAIM: Proceedings and Surveys, 2021, 71, pp.21-32. 10.1051/proc/202171103. hal-03148618

HAL Id: hal-03148618

https://hal.inrae.fr/hal-03148618

Submitted on 22 Feb 2021

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# PENALTY FUNCTION METHOD FOR THE MINIMAL TIME CRISIS PROBLEM

K. BOUMAZA<fnref n="1" />, T. BAYEN<fnref n="2" /> AND A. RAPAPORT<fnref n="3" />

**Abstract.** In this note, we propose a new method to approximate the minimal time crisis problem using an auxiliary control and a penalty function, and show its convergence to a solution to the original problem. The interest of this approach is illustrated on numerical examples for which optimal trajectories can leave and enter the crisis set tangentially.

**Résumé.** Dans cette note, nous proposons une nouvelle méthode pour approcher le problème du temps de crise en introduisant un contrôle additionnel et une fonction de pénalisation. Nous montrons la convergence des solutions approchées vers une solution du problème original. L'intérêt de cette approche est illustrée sur un exemple numérique pour lequel les trajectoires optimales peuvent entrer ou sortir tangentiellement de l'ensemble de crise.

## 1. INTRODUCTION

The minimal time of crisis problem was introduced in [12] in the context of viability theory (see [1]). It consists in minimizing the time spent by a solution of a controlled dynamics outside a given closed set K (representing typically some constraints). It has been mainly studied in the context of ordinary differential equations (ODEs). Notice however that a similar approach has been proposed for linear parabolic partial differential equations (see [8, 9]) in connection with practical applications.

In the context of ODEs, the objective function of the time of crisis can be expressed via the indicator function of the complementary of the set K, which is discontinuous with respect to the state variable, therefore the Pontryagin Maximum Principle (PMP) cannot be directly applied to compute an optimal control. On the other hand, the application of the Hybrid Maximum Principle (HMP) [10] can be used to express necessary optimality conditions (see e.g. [3-6, 13]), but under a certain "transverse crossing condition" of the set K (see also [13]). This condition requires that optimal trajectories enter and leave the set K non tangentially. In this work, our main aim is to present a different approach to the time crisis problem, approximating its solutions. This will allow us to bypass the discontinuity of the indicator function as well as the use of the transverse crossing condition.

Our methodology relies on the introduction of an additional control function and on the definition of an auxiliary optimal control problem with mixed state-control constraint, whose solutions exactly coincide with the ones of the time crisis problem. This new problem is then approximated thanks to a penalty function which is our main purpose in this paper.

<footnote n="1">¹ MISTEA, Univ. Montpellier, INRAE, Institut Agro (UMR 729), 34060 Montpellier, France. kenza.boumaza@inrae.fr</footnote>

<footnote n="2">² Avignon Université, Laboratoire de Mathématiques d'Avignon (EA 2151), 84018 Avignon, France. terence.bayen@univ-avignon.fr</footnote>

<footnote n="3">³ MISTEA, Univ. Montpellier, INRAE, Institut Agro (UMR 729), 34060 Montpellier, France. alain.rapaport@inrae.fr</footnote>
The paper is structured as follows. In Section 2, we introduce an auxiliary optimal control problem where the discontinuity of the integrand with respect to the state is formulated using a new control with values in {$\pm 1$} and a mixed state-control constraint. Next, we show that it is equivalent to the time crisis problem. Because of this new constraint, we then introduce a penalty method and study properties of the value function associated with this approximated problem as well as properties of the regularization arising from the penalty function. In Section 3, we prove convergence properties, namely that the sequence of value functions converges to the value function associated with the time crisis problem. As well, convergence of optimal solutions of the regularized problem to an optimal solution of the original problem is also provided (although the velocity set is non-convex). Finally, these convergence results are illustrated in Section 4 on two academic examples for which optimal trajectories can enter and leave the crisis set $K$ tangentially.

## 2. A NEW FORMULATION

### 2.1. Statement of the problem

Given a set $K \subset \mathbb{R}^n$, a positive number $T$, a set $U \subset \mathbb{R}^m$ and a map $f: \mathbb{R}^n \times U \to \mathbb{R}^n$ that fulfill the following assumptions:

(H1) The set $U$ is a non-empty compact subset of $\mathbb{R}^m$,

(H2) The map $f: \mathbb{R}^n \times U \to \mathbb{R}^n$ is continuous w.r.t $(x, u)$, locally Lipschitz w.r.t $x$ and satisfies the linear growth condition there exist $c_1 > 0$ and $c_2 > 0$ such that for all $x \in \mathbb{R}$ and all $u \in U$, one has

$$|f(x, u)| \leq c_1|x| + c_2, \quad (1)$$

we consider for any $\tau \in [0, T]$ and $y \in \mathbb{R}^n$, the following optimal control problem ("minimal time crisis")

$$\inf_{u \in \mathcal{U}} \int_{\tau}^{T} 1_{K^c}(x_{u, \tau, y}(t)) dt, \quad (TC)$$

where $x_{u, \tau, y}(\cdot) : [\tau, T] \to \mathbb{R}^n$ (simply denoted by $x(\cdot)$ hereafter) is the unique solution to the Cauchy problem

$$\dot{x}(t) = f(x(t), u(t)), \quad \text{a.e. } t \in [\tau, T], \quad x(\tau) = y, \quad (2)$$

associated with a control $u \in \mathcal{U}$, the set of all measurable controls $u: [0, T] \to U$. We also assume the following hypotheses to be satisfied:

(H3) For any $x \in \mathbb{R}^n$, the set $F(x) := \{f(x, u); u \in U\}$ is a non-empty convex subset of $\mathbb{R}^n$.

(H4) The set $K$ is a non-empty closed subset of $\mathbb{R}^n$ described by

$$K := \{x \in \mathbb{R}^n; \varphi(x) \leq 0\},$$

where $\varphi: \mathbb{R}^n \to \mathbb{R}$ is a locally Lipschitz continuous function that takes value in $\mathbb{R}$.

Note that the existence of an optimal solution to this problem is standard (see, e.g., [4, Proposition 2.1]). Since the integrand defining (TC) is discontinuous, we cannot apply the Pontryagin Maximum Principle (PMP) that requires data to be Lipschitz continuous w.r.t. the variable $x$. There exist many ways to approximate the indicator function with a sequence of Lipschitz continuous functions (see, e.g., [16]) in such a way to obtain a sequence of optimal trajectories converging to an optimal solution of the original problem. With Lipschitz data, one can use different numerical techniques, such as direct methods, or the Hamilton-Jacobi-Bellman (HJB)
equation (to obtain a sequence of Lipschitz continuous value functions, from which one can construct a sequence of optimal trajectories). If one approximates the indicator function with more regular functions, say $C^1$, then the (classical) PMP can be used to characterize a sequence of optimal trajectories. Here, we discuss another way to represent the discontinuity of the indicator function with the use of an additional control, taking advantage that in classical optimal control theory, control functions are naturally sought among measurable functions (thus discontinuous).

## 2.2. Formulation with mixed constraint

Let $\mathcal{V}$ be the set of all measurable controls $v: [0, T] \to \Omega$ where $\Omega := \{\pm 1\}$, and consider the mixed state-control constraint

$$v(t)\varphi(x(t)) - |\varphi(x(t))| = 0 \quad \text{a.e. } t \in [\tau, T], \qquad (3)$$

where $x(\cdot)$ is any admissible solution, and $v(\cdot)$ any control function in $\mathcal{V}$. We define a new optimal control problem with mixed state-control constraint

$$\inf_{(u,v) \in \mathcal{U} \times \mathcal{V}} \int_{\tau}^{T} \left( \frac{1+v(t)}{2} \right) dt \quad \text{subject to the constraint (3),} \qquad (\text{TCR})$$

for the controlled dynamics (2). Note that, given any admissible solution $(x(\cdot), u(\cdot), v(\cdot))$ satisfying the constraint (3), one has

$$v(t) = \operatorname{sign}(\varphi(x(t))),$$

provided that $\varphi(x(t)) \neq 0$, and $v(t) \in \Omega$ if $\varphi(x(t)) = 0$. It is known that the lack of regularity of the integrand w.r.t. the state is bothersome, whereas it is common for an optimal control to be discontinuous w.r.t. $t$. In this new formulation, the lack of regularity of the integrand defining (TC) has been replaced by the addition of the new control variable $v$ that only takes two values +1 and -1 together with the mixed state-control constraint (3). We now prove that problems (TC) and (TCR) are equivalent.

**Lemma 2.1.** Let $u^* \in \mathcal{U}$. Then $(x^*, u^*)$ is an optimal solution of (TC) if and only if $(x^*, v^*, u^*)$ is an optimal triple for Problem (TCR), where $v^* \in \mathcal{V}$ is defined for any $t \in [\tau, T]$ as

$$v^*(t) := \begin{cases} \operatorname{sign}(\varphi(x^*(t))) & \text{if } \varphi(x^*(t)) \neq 0, \\ -1 & \text{otherwise.} \end{cases} \qquad (4)$$

*Proof.* Notice first that for any admissible solution $x^*$, the control $v^*$ defined by (4) satisfies the constraint (3) and thus one has

$$\int_{\tau}^{T} \left( \frac{1 + v^{*}(t)}{2} \right) dt = \int_{\tau}^{T} \mathbb{1}_{K^{c}}(x^{*}(t)) dt .$$

Therefore, if $(x^*, u^*, v^*)$ is an optimal triple for (TCR), then the pair $(x^*, u^*)$ is also optimal for (TC). Conversely, let $(x^*, u^*)$ be an optimal solution of (TC), and suppose by contradiction that there exists an optimal pair $(\bar{u}, \bar{v}) \in \mathcal{U} \times \mathcal{V}$ for Problem (TCR) such that

$$\int_{\tau}^{T} \left( \frac{1 + \bar{v}(t)}{2} \right) dt < \int_{\tau}^{T} \mathbb{1}_{K^{c}}(x^{*}(t)) dt .$$

Let $\bar{x}$ be its associated trajectory. Since $(\bar{x}, \bar{v})$ satisfies the constraint (3), it follows that one has

$$\bar{v}(t) = \operatorname{sign}(\varphi(\bar{x}(t))) \quad \text{a.e. } t \in [\tau, T] \quad \text{s.t. } \varphi(\bar{x}(t)) \neq 0.$$
Hence, we deduce that

$$ \int_{\tau}^{T} 1_{K^{c}}(\bar{x}(t))dt \leq \int_{\tau}^{T} \left(\frac{1+\bar{v}(t)}{2}\right) dt, $$

which contradicts the optimality of $x^*$ and concludes the proof. □

## 2.3. Approximation with a penalty function

The penalty method is a common technique in optimization to approximate constrained optimization problems with a sequence of unconstrained optimization problems [11, 14, 15, 18]. In this section, we apply a penalty approach to (TCR). Let us start by introducing the following penalty function $P: \mathbb{R}^n \times \mathbb{R} \to \mathbb{R}_+$ associated with the constraint (3) as follows:

$$ P(x, v) := (v\varphi(x) - |\varphi(x)|)^2, $$

and the following auxiliary optimal control problem defined by

$$ \inf_{(u,v) \in \mathcal{U} \times \mathcal{V}^{\#}} \int_{\tau}^{T} \left( \frac{1+v(t)}{2} + nP(x(t), v(t)) \right) dt, \qquad (\text{TCR}_{n}^{\#}) $$

where $\mathcal{V}^{\#}$ is the set of all admissible controls $v: [0, T] \to \text{co}(\Omega)$, where $\text{co}(\Omega) := [-1, 1]$, and $x(\cdot)$ is a solution of (2). Since the mapping

$$ v \mapsto \frac{1+v}{2} + nP(x,v) $$

is convex for any $x \in \mathbb{R}^n$, the extended velocity set

$$ \left\{ \left[ \frac{1+v}{2} + nP(x,v) + w \right], (u,v,w) \in \mathcal{U} \times [-1,1] \times \mathbb{R}_+ \right\} $$

is convex for any $x \in \mathbb{R}^n$. The existence of an optimal solution for Problem (TCR$_n^\#$) follows by a direct application of Filippov's Theorem [10], under Assumptions (H1)-(H2)-(H3)-(H4). Next, $V_n: [0, T] \times \mathbb{R}^n \to \mathbb{R}$ will stand for the value function associated with (TCR$_n^\#$). For each fixed $n \in \mathbb{N}$, Problem (TCR$_n^\#$) is a classical optimal control problem of Bolza type with Lipschitz bounded data, for which its value function $V_n$ is then locally Lipschitz continuous over $[0, T] \times \mathbb{R}$ (see, e.g., [2]). In addition, $V_n$ is the unique viscosity solution to the following HJB equation

$$ \partial_t V(t, y) + \sup_{(u,v) \in \mathcal{U} \times \text{co}(\Omega)} H_n(x, \nabla_y V(t, y), u, v) = 0, \quad (t, y) \in [0, T] \times \mathbb{R}^n, \qquad (5) $$

with the boundary condition

$$ V(T, y) = 0, \quad y \in \mathbb{R}^n, \qquad (6) $$

where the Hamiltonian $H_n: \mathbb{R}^n \times \mathbb{R}^n \times \mathbb{R}^m \times \mathbb{R} \to \mathbb{R}$ is defined as

$$ H_n(x, p, u, v) := p \cdot f(x, u) - \left( \frac{1+v}{2} + nP(x,v) \right). $$

By maximizing the Hamiltonian w.r.t. $v$, the expression of a maximizer $v_n$ is given by

$$ v_n(x) = \max \left( -1, \text{sign}(\varphi(x)) - \frac{1}{4n\varphi(x)^2} \right), \quad x \in \mathbb{R}^n, n \in \mathbb{N}^*. $$
One can also check, thanks to the above expression of $v_n$, that the following inequality holds

$$ \frac{1+v_n(x)}{2} + nP(x, v_n(x)) \le 1, \quad x \in \mathbb{R}^n, n \in \mathbb{N}^*. $$

Without any loss of generality, we can then write $V_n$ as

$$ V_n(\tau, y) = \inf_{(u,v) \in \mathcal{U} \times \mathcal{V}^*} \int_{\tau}^{T} \min \left( 1, \frac{1+v(t)}{2} + nP(x(t), v(t)) \right) dt. $$

Let us now introduce a slight variation of the previous optimal control problem in which controls $v(\cdot)$ are with values in $\Omega$, and not in $\text{co}(\Omega)$:

$$ \inf_{(u,v) \in \mathcal{U} \times \mathcal{V}} \int_{\tau}^{T} \min \left( 1, \frac{1+v(t)}{2} + nP(x(t), v(t)) \right) dt, \quad (\text{TCR}_n) $$

and for which, we denote by $\bar{V}_n$ the associated value function. By using a similar argumentation as above, one can show that $\bar{V}_n$ is the unique viscosity solution of the following HJB equation

$$ \partial_t V(t, y) + \sup_{(u,v) \in \mathcal{U} \times \Omega} \bar{H}_n(x, \nabla_y V(t, y), u, v) = 0, \quad (t, y) \in [0, T] \times \mathbb{R}^n, \quad (7) $$

with the boundary condition (6) and the Hamiltonian $\bar{H}_n$ defined as

$$ \bar{H}_n(x, p, u, v) := p \cdot f(x, u) - \min \left( 1, \frac{1+v}{2} + nP(x, v) \right). $$

Note that the extended velocity set associated with this optimal control problem is not convex, due the fact that we consider controls $v$ taking values $-1$ or $1$ only. Therefore, one cannot apply Filippov's Theorem to ensure the existence of an optimal solution. To investigate the behavior of $(V_n)$, let $V: [0, T) \times \mathbb{R}^n \to \mathbb{R}$ be the value function associated with the auxiliary Problem (TCR) defined as

$$ V(\tau, y) = \inf_{(u,v) \in \mathcal{U} \times \mathcal{V}} \int_{\tau}^{T} \left( \frac{1+v(t)}{2} \right) dt \quad \text{under constraint (3).} $$

**Proposition 2.1.** For each $n \in \mathbb{N}$ and for each $(\tau, y) \in [0, T) \times \mathbb{R}^n$, one has the following inequality

$$ V_n(\tau, y) \le \bar{V}_n(\tau, y) \le V(\tau, y). \quad (8) $$

Moreover, the problem (TCR$_n$) admits an optimal solution for any $n \in \mathbb{N}$.

*Proof.* Let $(x^*, u^*)$ be an optimal pair for Problem (TC). According to Lemma 2.1, the triple $(x^*, u^*, v^*)$, where $v^*$ is defined by (4), is optimal for Problem (TCR). It follows that one has $P(x^*(t), v^*(t)) = 0$ for any $t \in [\tau, T]$, which gives $\bar{V}_n(\tau, y) \le V(\tau, y)$ for any $n$. Clearly, since Problem (TCR$_n$) is sought for the same criterion than Problem (TCR$_n^*$), but for a smaller set of control functions, we get the inequality $V_n \le \bar{V}_n$ for any $n \in \mathbb{N}$.

Consider now Problem (TCR$_n$). By maximizing the Hamiltonian $\bar{H}_n$ w.r.t. $v$ (with values $\pm 1$ only), one obtains the expression of a maximizer $\bar{v}_n$, for each $n \in \mathbb{N}$, as follows

$$ \bar{v}_n(x) = \begin{cases} 1 & \text{if } \varphi(x) > \frac{1}{2\sqrt{n}}, \\ -1 & \text{otherwise.} \end{cases} $$
By replacing $v$ into $(TCR_n)$ with the expression of $\bar{v}_n(x)$, one obtains the optimal control problem

$$ \inf_{u \in \mathcal{U}} \int_{\tau}^{T} Q_n(\varphi(x(t))) dt, \qquad (TCR'_{n}) $$

with

$$ Q_n(z) := \begin{cases} 0 & \text{if } z \le 0, \\ 4nz^2 & \text{if } 0 < z \le \frac{1}{2\sqrt{n}}, \\ 1 & \text{if } \frac{1}{2\sqrt{n}} < z, \end{cases} \qquad (9) $$

which is classical Bolza problem with Lipschitz data, for which the value function is the unique viscosity solution of the HJB equation (7) with boundary condition (6). By uniqueness of solutions of (7)-(6) in the class of Lipschitz functions, we deduce that its value function coincides with $\bar{V}_n$ for any $n \in \mathbb{N}$. Moreover, Problem $(TCR'_n)$ admits an optimal pair $(x_n, u_n)$, thanks to Filippov's Theorem (under Assumptions (H1) to (H4)). Then, the triple $(x_n, u_n, v_n)$, where $v_n(t) := \bar{v}_n(x_n(t))$ for any $t \in [\tau, T]$, is optimal for Problem $(TCR_n)$. $\square$

## 2.4. Discussion in terms of regularization of the indicator function

We give next some properties of this approach in terms of regularization of the indicator of $K^c$ defining the time crisis function. Indeed, Problems $(TCR_n^#)$ and $(TCR_n)$ amount to consider two different regularizations of the indicator function, considering that an optimal control function $v(\cdot)$ has to maximize the corresponding Hamiltonian at almost any $t$, and that its maximizing expression can be merely replaced in the integrand. One can straightforwardly show the following results.

**Proposition 2.2.** Define the function

$$ Q_n^\#(z) := \begin{cases} 0 & \text{if } z \le 0, \\ 4nz^2 & \text{if } 0 < z \le \frac{1}{2\sqrt{2n}}, \\ 1 - \frac{1}{16nz^2} & \text{if } \frac{1}{2\sqrt{2n}} < z. \end{cases} $$

Then, one has for Problem $(TCR_n^#)$

$$ \max_{v \in [-1,1]} - \left( \frac{1+v}{2} + nP(x,v) \right) = -Q_n^\#(\varphi(x)), $$

and for Problem $(TCR_n)$, one has

$$ \max_{v \in \{-1,1\}} - \left( \min \left( 1, \frac{1+v}{2} + nP(x,v) \right) \right) = -Q_n(\varphi(x)) $$

where $Q_n(\cdot)$ is defined in (9).

At this step, one can observe the following properties:

(1) One has $Q_n^\#(\varphi(x)) \le Q_n(\varphi(x)) \le 1_{K^c}(x)$ for any $x$ and $Q_n(\varphi(x)) = 1_{K^c}(x)$ when $\varphi(x) \notin [0, \frac{1}{2\sqrt{n}}]$, while $Q_n^\#(\varphi(x)) < 1_{K^c}(x)$ for any $x \in K^c$ (see Fig. 1). Therefore, the criterion of Problem $(TCR_n)$ gives a much better estimate of the time crisis than $(TCR_n^#)$ for any admissible trajectory.
(2) $Q_n^\#$ is differentiable. Provided that $\varphi$ is differentiable, one can then use the (regular) PMP to characterize optimal pairs $(x_n, u_n)$ for Problem (TCR$_n^\#$) considering the single control $u$. On the opposite, $Q_n$ is not differentiable at $z = \frac{1}{2\sqrt{n}}$. However, it is possible to use the PMP provided that the Problem (TCR$_n$) is considered as a problem with two controls $u$ and $v$, since the function $P$ is differentiable w.r.t. $x$.

<figure><img src="image_2.png" /><figcaption>FIGURE 1. Example of graphs of the functions $Q_n^\#$ and $Q_n$ (for $n = 5$).</figcaption></figure>

These facts justify the interest of considering Problem (TCR$_n$) (with two controls) instead of (TCR$_n^\#$), as an approximation procedure of Problem (TC), strengthened by the fact that this problem admits optimal solutions despite the lack of convexity of its augmented velocity set. However, the consideration of Problem (TCR$_n^\#$) has been useful to justify the choice of the bounded penalization $\min(1, \frac{1+v}{2} + nP(x, v))$ instead of the unbounded one given by $\frac{1+v}{2} + nP(x, v)$ in the criterion. From a purely numerical viewpoint, having to consider only two possible values for the control $v$ can be an advantage if one considers numerical schemes based on dynamic programming, as we did in examples in Section 4.

### 3. CONVERGENCE RESULTS

We now provide convergence results of solutions to the penalized optimal control problems (namely (TCR$_n$) and (TCR$_n^\#$)) to an optimal solution of (TC).

**Proposition 3.1.** The functions $V_n$, resp. $\bar{V}_n$, converge pointwise to the function $V$ in $[0, T] \times \mathbb{R}^n$. Moreover, any optimal sequence $x_n$, resp. $\bar{x}_n$, for Problem (TCR$_n^\#$), resp. (TCR$_n$), converges, up to a sub-sequence, uniformly to an optimal solution $x^*$ of Problem (TC), and their derivatives weakly to $\dot{x}^*$ in $L^2(\tau, T; \mathbb{R}^n)$.

*Proof.* Since for each $(\tau, y) \in [0, T] \times \mathbb{R}^n$, the sequence $(V_n(\tau, y))_n$ is non-decreasing, bounded above, and Lipschitz continuous, it converges pointwise to some function $V_\infty(\tau, y) \le V(\tau, y)$. It can be also observed that Problem (TCR$_n^\#$) can be equivalently rewritten as a Mayer problem in $\mathbb{R}^{n+2}$:

$$V_n(\tau, y) = \inf_{(u,v) \in \mathcal{U} \times \mathcal{V}^\#} l(T) + np(T),$$

subject to the augmented dynamics

$$\left\{
\begin{array}{l}
\dot{x}(t) = f(x(t), u(t)), \quad x(\tau) = y \\
\dot{l}(t) = \frac{1+v(t)}{2}, \quad l(\tau) = 0 \\
\dot{p}(t) = (v(t)\varphi(x(t)) - |\varphi(x(t))|^2), \quad p(\tau) = 0
\end{array}
\right.
\quad (10)$$
Under hypotheses (H1) up to (H4), Filippov's Theorem gives the existence of an optimal solution $(x_n, l_n, p_n)$ associated with a pair of controls $(u_n, v_n) \in \mathcal{U} \times \mathcal{V}^{\#}$, for any $n \in \mathbb{N}$. Then, from the standard compactness properties of trajectories (see, e.g., [10, Theorem 1.11]), there exists a sub-sequence, also denoted $(x_n, l_n, p_n)$, and a pair of controls $(u^*, v^*) \in \mathcal{U} \times \mathcal{V}$ such that $(x_n, l_n, p_n)$ uniformly converges to a solution of (10) denoted by $(x^*, l^*, p^*)$ and associated with the control $(u^*, v^*)$. In addition, the sequence $(\dot{x}_n, \dot{l}_n, \dot{p}_n)$ weakly converges to $(\dot{x}^*, \dot{l}^*, \dot{p}^*)$ in $L^2(\tau, T; \mathbb{R}^n)$. Let us now show that the pair $(x^*, u^*)$ is optimal.

First, note that one has

$$0 \le l_n(T) + np_n(T) \le V(\tau, y), \quad n \in \mathbb{N}$$

where $l_n, p_n$ are non-negative functions. Therefore, $p_n(T)$ has to converge to 0 when $n$ tends to $+\infty$, which implies $p^*(T) = 0$. Since $p^*$ is absolutely continuous with $p^*(\tau) = 0$ and satisfies $\dot{p}^* \ge 0$ a.e., we deduce that the function $p^*$ is identically null. Then, one has the equality

$$p^*(T) - p^*(\tau) = \int_{\tau}^{T} (v^*(t)\varphi(x^*(t)) - |\varphi(x^*(t))|)^2 dt = 0,$$

from which we deduce

$$v^*(t)\varphi(x^*(t)) - |\varphi(x^*(t))| = 0 \quad \text{a.e. } t \in [\tau, T].$$

Thus, $(x^*, v^*)$ satisfies the constraint (3) and we conclude that one has

$$V_{\infty}(\tau, y) = l^*(T) = \int_{\tau}^{T} \frac{1 + v^*(t)}{2} dt \ge V(\tau, y).$$

(by definition of $V$) which proves the equality $V_{\infty}(\tau, y) = V(\tau, y)$ and that $(x^*, u^*)$ is optimal for Problem (TC).

Consider now Problem (TCR$_n$). From Proposition 2.1, we obtain that $\bar{V}_n$ converges pointwise to the function $V$ as well, and the existence of a sequence of optimal trajectories $\bar{x}_n$ for Problem (TCR$_n$), with associated controls $(\bar{u}_n, \bar{v}_n)$ in $\mathcal{U} \times \mathcal{V} \subset \mathcal{U} \times \mathcal{V}^{\#}$. Let now $(\bar{l}_n, \bar{p}_n)$ be the solution of (10) associated with those controls. Using again the compactness properties of trajectories of the solutions of (10) for controls in $\mathcal{U} \times \mathcal{V}^{\#}$, we obtain the uniform convergence of $(\bar{x}_n, \bar{l}_n, \bar{p}_n)$, up to a sub-sequence, to a certain<fnref n="1" /> $(x^*, l^*, p^*)$ and we conclude as before that $x^*$ is optimal for Problem (TC). □

**Remark 3.1.** The "strong-weak" compactness of the set of trajectories does not in general provide the convergence of controls. Nevertheless, here, one can see that optimal controls $(v_n)$ for Problem (TCR$_n^\#$) or Problem (TCR$_n$) converge a.e. to $v^*$ defined in (4) (up to a sub-sequence). Indeed, since $\dot{p}_n$ weakly converges to zero and $\dot{p}_n \ge 0$ a.e., it converges a.e. to zero (up to a sub-sequence). It follows that $\int_{\tau}^{T} (1 + v_n(t))/2 dt \to \int_{\tau}^{T} (1 + v^*(t))/2 dt = V(\tau, y)$, and from Lemma 2.1, $v^*$ is then given by (4).

## 4. NUMERICAL EXAMPLES

We provide two examples illustrating numerically the convergence of approximated optimal solutions (to the penalized problem) to an optimal solution of the minimal time crisis problem. These two examples have the particularity that the optimal trajectories enter and leave tangentially to the set $K$, which does not allow the use of the HMP. Moreover, in the second example, the optimal trajectory stays on the boundary of $K$ for a non-null duration. As controlled dynamics, we consider the planar system, as in [4]

$$\begin{cases} \dot{x}_1(t) = -x_2(t)(2 + u(t)), \\ \dot{x}_2(t) = x_1(t)(2 + u(t)), \end{cases} \quad (11)$$

<footnote n="1">¹Note that the limits of $(x_n, l_n, p_n, u_n, v_n)$ and $(\bar{x}_n, \bar{l}_n, \bar{p}_n, \bar{u}_n, \bar{v}_n)$ in the appropriate topology may not be the same.</footnote>
with initial condition $(x_1(0), x_2(0)) = (0, 1)$ and $u(t)$ taking values in $[-1, 1]$, but here with different sets $K$. The function $\varphi$ (defining $K$) is given by:

$$ \text{Example 1:} \quad \varphi(x_1, x_2) = x_1^2 + 4 \min(0, x_2)^2 - 1 $$

$$ \text{Example 2:} \quad \varphi(x_1, x_2) = x_1^2 + \max(-\frac{1}{2}, x_2, 2x_2)^2 - 1 $$

In the first example, the initial condition lies inside the set $K$ whereas it is outside of $K$ in the second one. Both examples highlight the possibility of entering or leaving the set $K$ tangentially (see Fig. 2).

<figure><img src="image_3.png" /><figcaption>FIGURE 2. Illustration of a trajectory entering and leaving the set $K$ tangentially for the first example (left) and the second (right).</figcaption></figure>

In the present context, we introduce the so-called *myopic strategy* (see [5, 6]) defined as the feedback

$$ u[x] = \begin{cases} +1 & \text{if } x \notin K, \\ -1 & \text{if } x \in K. \end{cases} \qquad (12) $$

Roughly speaking, taking $u = +1$ outside $K$ drives the state as fast as possible inside $K$ whereas taking $u = -1$ in $K$ allows the system to spent as much time as possible in $K$. This feedback clearly minimizes the time spent by the trajectory outside the set $K$ in both example. The corresponding trajectories and time crisis can then serve as a test of numerical methods solving Problem (TCR$_n^#$) or Problem (TCR$_n$) for different values of $n$. We have used here the BocopHJB software (see [7, 17]) which solves the HJB equation (but other numerical methods could be used) to compare the optimal solution of Problem (TC) with the approximated solutions.

For numerical purposes we took $\tau = 0$, $T = 5$ in both examples. Numerical results are depicted in Fig. 3, Fig. 4. We can see the convergence of the approximated trajectories to the myopic solution, which illustrates our convergence results. One can also observe the convergence of controls $u_n$, although we are not able to prove it here. As expected, the solution of Problem (TCR$_n$) is closer to the optimal solution, compared to the solution of Problem (TCR$_n^#$) (in particular in the first example). Finally, optimal values for the various costs are reported in Table 1. This highlights the interest of choosing $v \in \{\pm 1\}$ despite the lack of convexity.
<figure><img src="image_4.png" /><figcaption>FIGURE 3. Example 1. (1): Problem (TCR$_{n}^{#}$), (2): Problem (TCR$_{n}$) (a), (b): trajectories $x_{1,n}, x_{2,n}$, (c): controls $u_n$ ($-n = 10, -n = 100, -n = 1000, $ — myopic solution)</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>FIGURE 4. Example 2. (1): Problem (TCR$_{n}^{#}$), (2): Problem (TCR$_{n}$) (a), (b): trajectories $x_{1,n}, x_{2,n}$, (c): controls $u_n$ ($-n = 10, -n = 100, -n = 1000, $ — myopic solution)</figcaption></figure>
<table><tr><td>(1)</td><td>TCR<sub>n</sub><sup>#</sup></td><td>TCR<sub>n</sub></td><td>TC</td></tr><tr><td>n = 10</td><td>1.076</td><td>1.13126</td><td>1.38333</td></tr><tr><td>n = 100</td><td>1.19337</td><td>1.26485</td><td>1.38333</td></tr><tr><td>n = 1000</td><td>1.32697</td><td>1.3516</td><td>1.38333</td></tr></table>

<table><caption>TABLE 1. Costs of the optimal trajectories. (1): Example 1. (2): Example 2.</caption><tr><td>(2)</td><td>TCR<sub>n</sub><sup>#</sup></td><td>TCR<sub>n</sub></td><td>TC</td></tr><tr><td>n = 10</td><td>1.72829</td><td>1.7746</td><td>1.98333</td></tr><tr><td>n = 100</td><td>1.90914</td><td>1.96223</td><td>1.98333</td></tr><tr><td>n = 1000</td><td>1.95686</td><td>1.96378</td><td>1.98333</td></tr></table>

## 5. CONCLUSION

In this note, we have proposed a new smoothing procedure for the minimal time crisis problem by introducing an additional control $v$ with values in $\{\pm 1\}$, replacing the original problem with discontinuous integrand by a regular optimal control problem involving a mixed state-control constraint. We have then used a penalty method to avoid to deal with this constraint. This has led us to the study of a sequence of unconstrained optimal control problems. We have proved the convergence of the value function and optimal trajectories of the regularized problem to the solution to the original problem. Our numerical examples illustrate these results and validate the good performance of the proposed method. We observed that considering an additional control with only two possible values is quite efficient from a numerical view point, despite the lack of convexity of the augmented velocity set. This regularization technique authorizes trajectories to leave and enter a set $K$ without requiring a transverse condition on optimal paths nor convexity of the set $K$. In a future work, we shall investigate necessary optimality conditions of (TC) using this approach.

## ACKNOWLEDGEMENTS

The authors wish to thank A. Désilles for fruitful discussions and for helpful comments, and the support of the LabEx 'NUMEV' incorporated into the I-Site 'MUSE' (Montpellier). The first author thanks the Algeria-France program AVERROES for her PhD grant.

## REFERENCES

[1] J.-P. Aubin. *Viability theory*. Systems & Control: Foundations & Applications. Birkhäuser Boston, Inc., Boston, MA, 1991.

[2] M. Bardi and I. Capuzzo-Dolcetta. *Optimal Control and Viscosity Solutions of Hamilton-Jacobi-Bellman Equations*. Birkhäuser, Boston, 1997.

[3] T. Bayen and L. Pfeiffer. Second-Order Analysis for the Time Crisis Problem. *Journal of Convex Analysis*, 27(1):141–165, 2020.

[4] T. Bayen and A. Rapaport. About Moreau-Yosida regularization of the minimal time crisis problem. *Journal of Convex Analysis*, 23(1):263–290, April 2016.

[5] T. Bayen and A. Rapaport. About the minimal time crisis problem. *ESAIM: Proceedings and surveys*, 57:1–11, 2017.

[6] T. Bayen and A. Rapaport. Minimal time crisis versus minimum time to reach a viability kernel: A case study in the prey-predator model. *Optimal Control Applications and Methods*, 40(2):330–350, 2019.

[7] F. Bonnans, D. Giorgi, B. Heymann, P. Martinon, and O. Tissot. BocopHJB 1.0.1 – User Guide. Sept. 2015.

[8] J. F. Bonnans, V. Gaudrat, and C. Saguez. A domain control approach to state constrained control problems. *Notes in Control and Information Sciences*, (100):72–90, 1988.

[9] J. F. Bonnans, C. Moreno, and C. Saguez. Contrôle de domaines temporels. *INRIA research report*, 1984.

[10] F. H. Clarke. *Functional Analysis, Calculus of Variations and Optimal Control*. Springer Verlag, London, 2013.

[11] R. Courant. Variational methods for the solution of problems of equilibrium and vibrations. *Bull. Amer. Math. Soc.*, 49(1):1–23, 01 1943.

[12] L. Doyen and P. Saint-Pierre. Scale of viability and minimal time of crisis. *Set-Valued Analysis*, 5:227–246, 09 1997.

[13] T. Haberkorn and E. Trélat. Convergence results for smooth regularizations of hybrid nonlinear optimal control problems. *SIAM Journal on Control and Optimization*, 49(4):1498–1522, 2011.

[14] K. Okamura. Some Mathematical Theory of the Penalty Method for Solving Optimum Control Problems. *SIAM J. on Control, Series A*, 2(3):317–331, 1965.

[15] D. L. Russell. Penalty functions and bounded phase coordinate control. *SIAM J. on Control, Ser. A*, 2(3):409–422, 1964.

[16] A.I. Smirnov. Necessary optimality conditions for a class of optimal control problems with discontinuous integrand (translated from russian). *Proceedings of the Steklov Institute of Mathematics*, 262:213–230, 2008.
[17] Inria Saclay Team Commands. Bocop: an open source toolbox for optimal control. http://bocop.org, 2017.

[18] A.-Q. Xing and C.-L. Wang. Applications of the exterior penalty method in constrained optimal control problems. *Optimal Control Applications and Methods*, 10(4):333–345, 1989.