# Time-optimal control of piecewise affine bistable gene-regulatory networks

Nicolas Augier, Agustín Gabriel Yabo

► To cite this version:

Nicolas Augier, Agustín Gabriel Yabo. Time-optimal control of piecewise affine bistable gene-regulatory networks. International Journal of Robust and Nonlinear Control, 2022, 54 (5), pp.205-210. 10.1002/rnc.6012 . hal-03289633v2

HAL Id: hal-03289633

https://hal.science/hal-03289633v2

Submitted on 9 Jan 2023

**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
# Time-optimal control of piecewise affine bistable gene-regulatory networks†

Nicolas Augier | Agustín Gabriel Yabo

Université Côte d'Azur, Inria, INRAE,
CNRS, Sorbonne Université, Sophia
Antipolis, France

**Correspondence**

*Agustín Gabriel Yabo.
Email: agustin.yabo@inria.fr

**Present Address**

Inria Sophia Antipolis Méditerranée
2004, route des Lucioles BP 93
06902 Sophia Antipolis Cedex
France

**Summary**

We study the minimal-time problem for a piecewise affine bistable switch. Motivated by applications in synthetic biology and biotechnology, the aim is to minimize the time needed for this system to achieve transitions between its two stable steady states. The latter represents the two possible states of a *genetic toggle switch*, a synthetic flip-flop device playing a fundamental role in biocomputing and gene therapy. Results show that a time-optimal transition between states should pass by an undifferentiated state, which is well known in cell biology for its importance in fate differentiation of cells. In order to characterize the capacity of the system to achieve transitions, we provide a lower bound on the minimal time, whose knowledge becomes relevant when considering realistic systems involving subsystems evolving on different time scales. Then, we show numerical simulations of optimal trajectories illustrating the structure of the bang-bang optimal control for different scenarios.

**KEYWORDS:**

genetic regulatory systems, hybrid systems, biological systems, hybrid optimal control, genetic toggle switch, bistable switch

## 1 | INTRODUCTION

Understanding complex biological phenomena has become of great interest in the last decades for the scientific community. In the context of synthetic biology, numerous fields of study have been employed to better comprehend and re-engineer the interactions within biological systems¹. Such is the case of control theory, widely used to explain regulatory mechanisms in nature²,³, but also to artificially act upon them for biotechnological purposes⁴,⁵,⁶. A classical example is the metabolism of cells, described by multiple regulatory mechanisms forming complex networks. In this framework, the interaction between genes is a crucial subject of study⁷, whose typical behaviors can be described by positive and negative feedback loops⁸,⁹,¹⁰,¹¹,¹². The dynamics of these loops have been extensively analyzed, both from experimental and theoretical perspectives, and are known to present either multistability or oscillatory behaviors. From a mathematical modeling perspective, such a systems can be modeled through dynamical systems of several variables, where the positivity or negativity is given by the parity of negative interactions forming the loop.

Among all existing patterns, the simplest positive feedback loop is the two-dimensional bistable system, which is commonly used to represent the so-called *genetic toggle switch*. The latter is a synthetic flip-flop device first implemented experimentally

<footnote>†This work was partially supported by ANR project Maximic (ANR-17-CE40-0024-01), Inria IPL Cosy and Labex SIGNALIFE (ANR-11-LABX-0028-01). We acknowledge the support of the FMJH Program PGMO and the support to this program from EDF-THALES-ORANGE.</footnote>

<footnote n="0">⁰Abbreviations: OCP, optimal control problem; PMP, pontryagin's maximum principle; HMP, hybrid maximum principle</footnote>
in *E. coli* through the genes *lacI* and *tetR* mutually repressing each other¹³. The state of the device is determined by the con-
centration of the genes in the boolean form (low, high) and (high, low). This allows genetic toggle switches to act as biological
memory units capable of storing 1 bit of information, by sustaining one of the two possible states through time¹⁴, which offers
a biosynthetic alternative to the classical electronic flip-flop. Since its creation, understanding how to regulate bistable systems
in a reliable manner (e.g. by suppressing undesirable oscillations¹⁵ or achieving transitions between states¹⁶,¹⁷,¹⁸) has become
highly relevant for their vast implications in biotechnology and biocomputing.

In practice, the state of a genetic toggle switch can be controlled by externally catalyzing or inhibiting the synthesis rate of the
genes. This is done by introduction of a plasmid, which are essentially small circular DNA molecules that can be constructed to
include an inducible promoter of the studied gene, thus affecting the synthesis rate of messenger RNA. Thus, the transcription
rate can be directly modified by aggregation of an inducer. In *E. coli*, this is done by externally adding the diffusible molecules
IPTG<fnref n="1" /> and aTc<fnref n="2" />, which are known to repress the *lacI* and *tetR* genes, respectively ¹³.

Motivated by this experimental scheme, some authors proposed exact control strategies based on a piecewise affine model
of the bistable system¹⁷. As discussed in the work, the importance of studying the phenomenon through qualitative models
arises from the constraints related to the experimental setup, both in measuring the state and in acting on the system. The
proposed model is characterized by the existence of an "undifferentiated state", where no gene is predominant, and from which
the system can evolve towards one of the two attractors. Mathematically, the instability of this state appears as a Filippov non-
smooth "saddle" singularity¹⁹. From a biological point of view, such a state plays a key role in cell decision making and cell
fate differentiation²⁰. Its role in fate commitment has also motivated experimental studies aiming at stabilizing genetic toggle
switches around this undifferentiated point²¹,²².

Whereas most of the theoretical work in the subject has been dedicated to externally producing state transfers²³, the time
efficiency of state switches has received little or no attention from the community. Indeed, one of the key issues in these genetic
devices is the time needed to induce a transfer between its two stable states, due to its importance when studying more complex
networks of systems involving different time scales. In particular, the latter becomes a major constraint in the framework of
biological signal processing²⁴. Genetic toggle switches operate at the level of gene transcription and translation, whose duration
and timescales are the main factor delaying the availability of the proteins when facing a switch between steady states. In this
context, the minimization of a state switch, which is directly linked to the production of the non-expressed protein, becomes
highly relevant. Recent works²⁵ showed the importance of accelerating transitions times (and minimizing inducer usage) in
artificially engineered bistable systems in order to obtain less costly (and therefore, more sustainable) chemical production
schemes. Thus, in this paper, we investigate the time-optimal control strategies for the aforementioned bistable system. Our
aim is to induce transitions between the two stable steady states in minimal time. Many complex systems are known to involve
bistable processes²⁶,²⁷. Hence, the reduction of the time needed for such transfers could allow experimentalists to speed up
certain chemical reactions or to artificially increase bacterial growth rate, thus improving yield in biotechnological processes.
In a different setting²⁸,²⁹, the time efficiency of bistable systems switches in two-level quantum systems was studied, so as to
induce efficient transitions between two quantum states.

In addition to the biological relevancy of the subject, the resulting OCP (Optimal Control Problem) yields very interesting
results in the framework of Hybrid Optimal Control. The steady states of the piecewise linear system cannot be reached in finite
time due to the lack of controllability in certain regions, and so one has to consider a relaxed OCP with "partial targets", that is,
driving a given protein to a certain fixed value larger than its corresponding threshold. In this regard, we show that time-optimal
strategies for such a problem have a very specific geometric description. When the initial state is far enough from the target, that
is below a curve called *separatrix*, we show by an adaptation of the HMP (Hybrid Maximum Principle) to our setting that the
optimal control consists in a concatenation of two bang arcs, and the optimal trajectories follow:

* a first phase in which the system reaches the separatrix;

* a second phase where the system slides along this curve, until reaching the "undifferentiated" point of the biological system in finite time;

* a third phase, where the system leaves this curve, slides along a second fixed curve and reaches its target.

These two curves correspond to the stable and unstable manifolds of the undifferentiated saddle-type singularity, and the point
where the dynamics achieves its transfer is nothing but the corresponding Filippov equilibrium. The latter behavior can be

<footnote n="1">¹isopropyl-β-D-thiogalactopyranoside</footnote>

<footnote n="2">²anhydrotetracycline</footnote>
compared to the turnpike phenomenon³⁰, where the optimal trajectory for a given OCP for large final times is shown to remain close to a steady-state trajectory solution of the associated static OCP. Besides its specific interest, we expect our method to open new prospects in the study of optimal control of higher dimensional genetic regulatory networks. In particular, it often occurs that trajectories belonging to a given domain may bifurcate into different domains, similarly to what happens in the toggle switch case, and some similar turnpike-like properties may hold in this case.

The paper is organized as follows: in Section 2, we present both the non-controlled system and the studied controlled system, and we provide some technical results. In Section 3, we introduce the time-optimal control problem and we adapt the HMP to our setting. In Section 4, we present the main results, that prove the qualitative features of the optimal trajectories mentioned above. In Section 6, we give a lower bound for the minimal time, then characterizing the minimal transfer time between the two states of the toggle switch model. In Section 7, we provide numerical results implemented with Bocop³¹, an open-source toolbox for solving OCPs. Additionally, we perform a numerical comparison between the trajectories of the relaxed OCP and the original OCP, that suggests that the results also hold for the original one.

## 2 | BISTABLE-SWITCH MODEL

### 2.1 | Free dynamics

Consider two variables $x_1$ and $x_2$ which represent two genes mutually inhibiting each other. The individual dynamics, defined in Filippov sense, is the following

$$ \begin{cases} \dot{x}_1 = -\gamma_1 x_1 + k_1 s^{-}(x_2, \theta_2), \\ \dot{x}_2 = -\gamma_2 x_2 + k_2 s^{-}(x_1, \theta_1), \end{cases} \qquad (1) $$

where for $j \in \{1, 2\}$, $x_j \in \mathbb{R}_+$, and for $\theta \in \mathbb{R}$, $s^{-}(\cdot, \theta) : \mathbb{R} \to \mathbb{R}$ is such that

$$ s^{-}(x, \theta) = \begin{cases} 1 & \text{if } x < \theta, \\ 0 & \text{if } x > \theta. \end{cases} $$

It is assumed that $s^{-}(x) \in [0, 1]$ for $x = \theta$. The positive constants $(\gamma_j)_{j \in \{1, 2\}}$, $(k_j)_{j \in \{1, 2\}}$ correspond, respectively, to the degradation and the production rates of each variable. It is classical¹⁷ that the domain $K = [0, k_1/\gamma_1] \times [0, k_2/\gamma_2]$ is forward invariant by the dynamics of Equation (1). From now on, we consider only solutions evolving in $K$. Define the regular domains

$$ \begin{align*} B_{00} &= \{(x_1, x_2) \in \mathbb{R}^2 \mid 0 < x_1 < \theta_1, 0 < x_2 < \theta_2\}, \\ B_{01} &= \{(x_1, x_2) \in \mathbb{R}^2 \mid 0 < x_1 < \theta_1, \theta_2 < x_2 < \frac{k_2}{\gamma_2}\}, \\ B_{10} &= \{(x_1, x_2) \in \mathbb{R}^2 \mid \theta_1 < x_1 < \frac{k_1}{\gamma_1}, 0 < x_2 < \theta_2\}, \\ B_{11} &= \{(x_1, x_2) \in \mathbb{R}^2 \mid \theta_1 < x_1 < \frac{k_1}{\gamma_1}, \theta_2 < x_2 < \frac{k_2}{\gamma_2}\}, \end{align*} $$

which are defined as open sets in accordance with the HMP approach to be applied in Section 3.3. Equation (1) restricted to a regular domain $B_{ij}$ is an affine dynamical system on $\mathbb{R}^2$ having an asymptotically stable equilibrium, called focal point for system (1). Each region $B_{ij}$ for $i, j \in \{0, 1\}$ has a focal point

$$ \phi_{ij} = (\bar{x}_i, \bar{x}_j) $$

corresponding to

$$ \bar{x}_i = \frac{k_i}{\gamma_i} s^{-}(\bar{x}_j, \theta_j). $$

Thus, system (1) has two locally asymptotically stable steady states

$$ \phi_{10} = \left( \frac{k_1}{\gamma_1}, 0 \right) \in \bar{B}_{10}, $$

$$ \phi_{01} = \left( 0, \frac{k_2}{\gamma_2} \right) \in \bar{B}_{01}, $$

and an unstable Filippov equilibrium point at $(\theta_1, \theta_2)$. Figure 1 illustrates the dynamics of the system for a given set of parameters.
<figure><img src="image_2.png" /><figcaption>**FIGURE 1** Stream plot with free dynamics given by Equation (1). System parameters are $\gamma_1 = 1.1$, $\gamma_2 = 1.7$, $\theta_1 = 0.6$, $\theta_2 = 0.4$, $k_1 = k_2 = 1$.</figcaption></figure>

## 2.2 | Controlled dynamics and some related properties

We write the controlled dynamics assuming that the synthesis rates of each gene can be externally catalyzed or inhibited (e.g. through the introduction of inducible promoters of a given gene), as indicated in the previous section. Mathematically, this is represented by the control input $u$ acting directly on the synthesis rate of each gene, in a multiplicative form. Then, the controlled system, defined in Filippov sense, is

$$ \begin{cases} \dot{x}_1 = -\gamma_1 x_1 + u(t)k_1 s^{-}(x_2, \theta_2), \\ \dot{x}_2 = -\gamma_2 x_2 + u(t)k_2 s^{-}(x_1, \theta_1), \end{cases} \qquad (S) $$

where the control $u(\cdot) \in L^\infty([0, t_f], [u_{\min}, u_{\max}])$, with $0 < u_{\min} < 1 \le u_{\max}$. This system is motivated by the one introduced in¹⁷, which assumed the same control input $u$ for the two variables. The latter aims to model a simple qualitative control, easier to implement in a molecular biology setting than the case with two distinct control variables. We make the following assumptions on the parameters of the system (for more details, see¹⁷).

**Assumption 1.** The parameters $(\gamma_j)_j$ and $(k_j)_j$ satisfy

$$ \theta_j < \frac{k_j}{\gamma_j}, \quad j \in \{1, 2\}; \quad \frac{\theta_2}{\theta_1} > \frac{k_2 \gamma_1}{k_1 \gamma_2}; \quad \frac{\theta_2}{\theta_1} < \frac{k_2}{k_1}. $$

This assumption is based on intrinsic conditions of the parameters of the non-controlled system, and allows to find a control strategy driving the solution of Equation (S) from $B_{10}$ to $B_{01}$, as well as from $B_{01}$ to $B_{10}$. Note that it implies $\gamma_1 < \gamma_2$, and that the case where $\frac{\theta_2}{\theta_1} > \frac{k_2 \gamma_1}{k_1 \gamma_2}$ and $\frac{\theta_2}{\theta_1} < \frac{k_2}{k_1}$ can be treated analogously by permutation of $x_1$ and $x_2$.

### 2.2.1 | Separatrix

Now define the separatrix, which is a curve playing a fundamental role in the global dynamics of both the open-loop system (1) and the controlled system (S). For a fixed value of $u(t) \equiv u \in [u_{\min}, u_{\max}]$, the separatrix ($S_u$) is defined as the stable manifold of the Filippov equilibrium $(\theta_1, \theta_2)$ for Equation (S) restricted to $B_{00}$. In the coordinates $(x_1, x_2) \in B_{00}$, for $u \ge 1$, the separatrix
$(S_u)$ can be written as the curve of equation

$$x_2 = \alpha(x_1, u) = \frac{k_2 u}{\gamma_2} - \left( \frac{k_2 u}{\gamma_2} - \theta_2 \right) \left( \frac{\frac{k_1 u}{\gamma_1} - x_1}{\frac{k_1 u}{\gamma_1} - \theta_1} \right)^{\frac{\gamma_2}{\gamma_1}}$$

Using the latter, we define the regions

$$\begin{align*} (S_u)^+ &= \left\{ (x_1, x_2) \in \mathbb{R}^2 \mid 0 < x_1 < \theta_1, \alpha(x_1, u) < x_2 < \frac{k_2}{\gamma_2} \right\}, \\ (S_u)^- &= \left\{ (x_1, x_2) \in \mathbb{R}^2 \mid 0 < x_2 < \theta_2, \alpha(x_1, u) > x_2, x_1 < \frac{k_1}{\gamma_1} \right\}, \end{align*}$$

such that the domain $\bar{K}$ is divided into

$$\bar{K} = (\overline{S_u})^+ \cup (\overline{S_u})^- \cup \overline{B_{11}}, \quad (2)$$

as shown in Figure 2. The solutions of Equation (S) having initial conditions in $(S_u)^-$ (respectively, $(S_u)^+$) reach $B_{10}$ (respectively,

<figure><img src="image_3.png" /><figcaption>FIGURE 2 Division of the domain $\bar{K}$ as defined in (2), with a vector field defined by a constant control $u < 1$.</figcaption></figure>

$B_{01}$) in finite time. Moreover, $B_{10}$ (respectively, $B_{10}$) is included in the bassin of attraction of $\phi_{10}$ (respectively, $\phi_{01}$). Notice that, for a fixed value of $u(t) \equiv u \in [u_{min}, u_{max}]$, the solutions of Equation (S) having initial conditions in $(S_u)$ reach the Filippov point $(\theta_1, \theta_2)$ in finite time. Once having reached this point, the solution of Equation (S) is then defined by differential inclusion in the Filippov sense. Roughly speaking, there exist several solutions that will reach either $B_{01}$ or $B_{10}$ (see$^{17}$, Appendix for more precise informations about Filippov solutions of such a system).

### 2.2.2 | Lower separatrix

Now we define the lower separatrix, which will be useful in Section 6.
**Definition 1.** For $(\gamma_j)_{j \in \{1,2\}}$ and $(k_j)_{j \in \{1,2\}}$ satisfying Assumption 1, define the lower separatrix $(\tilde{S}_u)$ as the straight line of equation

$$x_2 = \beta(x_1, u) = \frac{k_2 u}{\gamma_1} - \left( \frac{k_2 u}{\gamma_1} - \theta_2 \right) \left( \frac{\frac{k_1 u}{\gamma_1} - x_1}{\frac{k_1 u}{\gamma_1} - \theta_1} \right).$$

**Lemma 1.** Let $(\gamma_j)_{j \in \{1,2\}}$ and $(k_j)_{j \in \{1,2\}}$ satisfy Assumption 1 and $u \ge 1$, and let $\bar{x}_1$ be the unique $x_1 \in [0, \theta_1]$ such that $\beta(x_1, u) = 0$. Then for every $x_1 \in [\bar{x}_1, \theta_1]$ and $u \ge 1$, we have $\beta(x_1, u) \le \alpha(x_1, u)$, that is, $(\tilde{S}_u)$ is below $(S_u)$ for every $x_1 \in [\bar{x}_1, \theta_1]$.

*Proof.* For every $x_1 \in [0, \theta_1]$ and $u \ge 1$, define $X(x_1) = \frac{\frac{k_1 u}{\gamma_1} - x_1}{\frac{k_1 u}{\gamma_1} - \theta_1}$. We have easily that $\beta(x_1, u) = 0$ if and only if $x_1 = \bar{x}_1$, where $\bar{x}_1 \in [0, \theta_1]$ is such that $X(\bar{x}_1) = \frac{k_2 u/\gamma_1}{k_2 u/\gamma_1 - \theta_2}$. Evaluating in the expression of $\alpha$ at $x_1 = \bar{x}_1$, we have

$$\alpha(\bar{x}_1, u) = \frac{k_2 u}{\gamma_2} - \left( \frac{k_2 u}{\gamma_2} - \theta_2 \right) \left( \frac{k_2 u/\gamma_1}{k_2 u/\gamma_1 - \theta_2} \right)^{\frac{\gamma_2}{\gamma_1}}$$

Using the fact that $\gamma_2 > \gamma_1$ under Assumption 2.2.1, one can prove by a direct differentiation that the function

$$x \mapsto \frac{\left( \frac{k_2 u}{\gamma_1} - x \right)^{\frac{\gamma_2}{\gamma_1}}}{\frac{k_2 u}{\gamma_2} - x}$$

is non-decreasing on $[0, \theta_2]$, and that $x_1 \mapsto \alpha(x_1, u)$ is concave for $x_1 \in [0, \theta_1]$. Hence, we have

$$\left( \frac{\frac{k_2 u}{\gamma_1}}{\frac{k_2 u}{\gamma_1} - \theta_2} \right)^{\frac{\gamma_2}{\gamma_1}} \le \frac{\frac{k_2 u}{\gamma_2}}{\frac{k_2 u}{\gamma_2} - \theta_2},$$

and we can deduce $\alpha(\bar{x}_1, u) \ge 0$. Provided that $\alpha(\theta_1, u) = \beta(\theta_1, u) = \theta_2$, we deduce that $\alpha(x_1, u) \ge \beta(x_1, u)$, for every $x_1 \in [\bar{x}_1, \theta_1]$. $\square$

# 3 | TIME-OPTIMAL TRANSFER

## 3.1 | Problem formulation

The state of a genetic toggle switch is determined by gene expression in the boolean form (low, high) and (high, low), and so the objective in this work is to achieve a transition from one boolean state to the other in minimal time. In the mathematical context, the latter translates into finding trajectories that drive the solution $(x_1(t), x_2(t))$ of Equation (S) towards the steady states $\phi_{01}$ and $\phi_{10}$ of Equation (1) in minimum time (where these states correspond to the differentiated states aforementioned). However, due to the lack of controllability in direction $x_1$ (respectively, $x_2$) of Equation (S) restricted to $B_{01}$ (respectively, $B_{10}$), one has to relax the problem. More precisely, the steady state $\phi_{01}$ (respectively, $\phi_{10}$) cannot be reached in finite time, because $u$ does not act on $x_1$ in the domain $B_{01}$ (respectively, $x_2$ in the domain $B_{10}$). Thus, we will be first interested in driving $x_2(t)$ towards an arbitrary value $x_2(t_f) = x_2^f > \theta_2$ (for instance, the value $x_2^f = k_2/\gamma_2$ corresponding to the $x_2$-component of the steady state $\phi_{01}$), with the constraint that at the final time, $x_1(t_f)$ belongs to the interval $[0, \theta_1)$. This target choice ensures that, at the final time, the gene $x_2$ is strongly expressed while the gene $x_1$ is weakly expressed. The symmetric problem, which is equivalent, consists in driving $x_1(t)$ towards an arbitrary value $x_1(t_f) = x_1^f > \theta_1$, with the constraint that at the final time, $x_2(t_f)$ belongs to
the interval $[0, \theta_2)$. Fix $x_1^0 \ge \theta_1$, $x_2^0 \le \theta_2$, $x_2^f \ge \theta_2$, and consider the minimization problem

$$ \left\{
\begin{array}{l}
\text{minimize } t_f \ge 0, \\
x(t) = (x_1(t), x_2(t)) \text{ is subject to (S)}, \\
x(0) = (x_1^0, x_2^0), \\
x_2(t_f) = x_2^f, \\
x_1(t_f) \in [0, \theta_1), \\
u(\cdot) \in [u_{\min}, u_{\max}].
\end{array}
\right.
\qquad (\text{OCP}) $$

## 3.2 | Reachability of the terminal state

A fundamental aspect of OCPs with fixed terminal state is the existence of a solution. Such a matter is directly linked to the reachability and controllability analysis of the dynamical system, which are often hard to conduct analytically. In this work, we provide sufficient conditions for the feasibility of the proposed trajectory, and we show that a simple piecewise constant control strategy¹⁷ achieves the objective, serving as a candidate to (OCP). This strategy drives asymptotically the system from an initial state in $B_{01}$ to $\phi_{10}$ (or $B_{10}$ to $\phi_{01}$ for the symmetric problem). One can show that, under Assumption 1, there exist $u_{\min} < \theta_1\gamma_1/k_1$ and $u_{\max} \ge 1$ such that

$$ \Phi^*(u_{\min}) \in (S_{u_{\max}})^+, $$

with

$$ \Phi^*(u_{\min}) \doteq \left( \frac{u_{\min} k_1}{\gamma_1}, \frac{u_{\min} k_2}{\gamma_2} \right). \qquad (3) $$

In previous works¹⁷, Section 3, authors proved the existence of $\bar{u}_{\min}$, $\bar{u}_{\max}$ such that for every $u_{\min}$, $u_{\max}$ such that $0 \le u_{\min} \le \bar{u}_{\min} \le \bar{u}_{\max} \le u_{\max}$, we have $\Phi^*(u_{\min}) \in (S_{u_{\max}})^+$. The latter condition is satisfied for $\bar{u}_{\min}$, $\bar{u}_{\max}$ when there exists $\delta < \frac{\theta_1 k_2}{\theta_2 k_1} - 1$ and $\epsilon > 0$ small enough such that

$$ \bar{u}_{\max} > \max \left\{ 1, \frac{(1 + \delta)\gamma_2 \frac{\theta_2}{k_2} - \gamma_1 \frac{\theta_1}{k_1}}{\delta} \right\}, $$

and

$$ 0 < \bar{u}_{\min} < \min \left\{ \frac{\gamma_1}{k_1}\theta_1, \frac{\gamma_2}{k_2}\theta_2, (1 - \epsilon)x_1^* \frac{\gamma_1}{k_1} \right\}, $$

where $x_1^* \in (0, \theta_1)$ is the unique solution of $\alpha(x_1^*, u_{\max}) = 0$. Concerning the symmetric problem, one can show the existence of another choice of $u_{\min} < \theta_1\gamma_1/k_1$ and $u_{\max} \ge 1$ such that $\Phi^*(u_{\min}) \in (S_{u_{\max}})^-$. Due to the symmetry of both problems, we will focus on the first case, and state the following assumption.

**Assumption 2.** Bounds $u_{\min}$ and $u_{\max}$ are chosen such that $0 \le u_{\min} \le \bar{u}_{\min} \le \bar{u}_{\max} \le u_{\max}$, so that $\Phi^*(u_{\min}) \in (S_{u_{\max}})^+$.

Based on the solution developed in previous works¹⁷, we first propose an input control constrained to two possible values $\{u_{\min}, u_{\max}\}$ corresponding to the low and high synthesis control. The control law is expressed in terms of the state and time as

$$ u(x, t) = \begin{cases} u_{\min} & \text{if } x \in B_{10}, \\ u_{\min} & \text{if } t \in [0, t_s), x \in B_{00}, \\ u_{\max} & \text{if } t \in [t_s, \infty), x \in B_{00}, \\ u_{\max} & \text{if } x \in B_{01}. \end{cases} \qquad (4) $$

for $t_s > 0$ sufficiently large. During the first phase with $u \equiv u_{\min}$, every focal point of the system belongs to $B_{00}$, hence the solution $x(t)$ of Equation (S) converges towards the point $\Phi^*(u_{\min}) \in B_{00}$ when $t \to \infty$. During the second phase with $u \equiv u_{\max}$,
state $x(t)$ reaches $B_{01}$ in finite time, and $x_2(t)$ converges towards $x_2^f$ in finite time. From that point, an open-loop control $u \equiv 1$ drives $x(t)$ to $\phi_{01}$ when $t \to \infty$. An example illustrating this trajectory is shown in Figure 3, where $x_2^f = k_2/\gamma_2$, matching the coordinate $x_2$ of the point $\phi_{01}$. Indeed, under Assumptions 1 and 2, and by choosing $t_s$ sufficiently large, the control strategy (4) ensures that any trajectory starting from $(x_1^0, x_2^0)$ reaches a final point meeting $x_1 \in [0, \theta_1)$ and $x_2 = x_2^f$ in finite time, which shows that the set of admissible controllers for problem (OCP) is non empty.

Notice that, while the latter strategy serves as a candidate, the set of possible controllers is not limited to bang-bang solutions. One could consider, for instance, non bang-bang strategies based on 4 with intermediate control values (e.g. replacing $u_{max}$ by $\tilde{u}_{max} < u_{max}$) which also achieve the transfer. This implies that there exist several trajectories reaching the target of Problem OCP, which motivates a study from a Pontryagin's Maximum Principle perspective.

<figure><img src="image_4.png" /><figcaption>**FIGURE 3** Optimal trajectory with $x_1^0 = 0.8$, $x_2^0 = 0.3$ and $x_2^f = k_2/\gamma_2$. System parameters are $\gamma_1 = 1.1$, $\gamma_2 = 1.7$, $\theta_1 = 0.6$, $\theta_2 = 0.4$, and $k_1 = k_2 = 1$. Control bounds are set to $u_{min} = 0.4$ and $u_{max} = 1.1$. The control switches from $u \equiv u_{min}$ to $u \equiv u_{max}$ at time $t_s (= 3$ in this case), after the state $x(t)$ has crossed the separatrix ($S_{u_{max}}$).</figcaption></figure>

## 3.3 | Hybrid optimal control problem with a fixed domain sequence

Consider two compact subsets $M_0$ and $M_1$ of $\mathbb{R}^2$, and assume $M_1$ is reachable from $M_0$ for system (S), that is, such that there exists a time $t_f > 0$, a control $u(\cdot) \in L^\infty([0, t_f], \Omega)$ and $x_0 \in M_0$ such that the solution $x(t)$ of Equation (S), defined in the Filippov sense with initial condition $x(0) = x_0$ satisfies $x(t_f) \in M_1$. Consider the problem of steering the system (S) from $M_0$ to $M_1$ in minimal time $t_f$. In order to properly define the problem, one has to choose a sequence $B$ in the set $\{B_{00}, B_{01}, B_{10}, B_{11}\}$ of regular domains, and consider $B$-admissible trajectories of Equation (S), defined as follows.

**Definition 2.** Let $B = (B_j)_{j \in \{1, \dots, k\}}$ be a sequence of regular domains. We say that a solution $x(t)$ of Equation (S) is *B-admissible* if there exists a time $T > 0$, a control $u(\cdot) \in L^\infty([0, t_f], \Omega)$, and times $t_0 = 0 < t_1 < \dots < t_k$ such that $x(t) \in B_j$ for every $t \in \Delta_j$, where $\Delta_j = (t_j, t_{j+1})$.

In particular, the previous definition excludes sliding modes along the frontier between two successive regular domains. Additionally, we require two more assumptions related to the reachability of B-admissible solutions for the general case.

**Assumption 3.** $M_0$ (respectively, $M_1$) is included in the adherence $\bar{B}_{jk}$ (respectively, $\bar{B}_{qi}$) of a regular domain, for $j, k, q, i \in \{0, 1\}$.

**Assumption 4.** Assume that there exists a time $T > 0$ and a B-admissible solution $(x(t), u(t))$ such that $x(0) \in M_0$ and $x(T) \in M_1$.
Notice that for given sets $M_0, M_1$, the choice of the sequence $B$ is not unique in general. Assume that $M_0, M_1, B$ satisfy the assumptions 3 and 4. For a fixed sequence $B = (B_j)_{j \in \{1, \dots, k\}}$, we can consider Problem (2) restricted to $B$-admissible trajectories. Necessary conditions of optimality for this problem can be directly derived from the HMP, which we will state in Theorem 1 of the following subsection.

## 3.4 | Hybrid Maximum Principle for time optimal control

In this section, we provide an adaptation of the Hybrid Maximum Principle given by Dmitruk and Kaganovich³² to the time optimal setting. Let $t_0 < t_1 < \dots < t_v$ be real numbers. Denote by $\Delta_k$ the time interval $[t_{k-1}, t_k]$. For continuous functions $x^k : [t_0, t_v] \to \mathbb{R}^n$, $k \in \{1, \dots, v\}$, define the vector

$$p = (t_0, (t_1, x^1(t_0), x^1(t_1)), \dots, (t_v, x^v(t_{v-1}), x^v(t_v))) \in \mathbb{R}^d,$$

where $d = 1+(2n+1)v$. Let $(f_k)_{k \in \{1, \dots, v\}}$ be smooth vector fields on $\mathbb{R}^n$, and $(\phi_i)_{i \in \{1, \dots, m\}}$, $(\eta_j)_{j \in \{1, \dots, q\}}$ be two families of smooth functions defined on $\mathbb{R}^{(v+1)(n+1)}$. For $t \in [t_0, t_v]$ and a collection $(U_k)_{k \in \{1, \dots, v\}}$ of subsets of $\mathbb{R}^q$, $q \ge 1$, consider the autonomous hybrid OCP

$$ \left\{ \begin{array}{l} \text{minimize } t_v - t_0, \\ \dot{x}^k(t) = f_k(x^k(t), u^k(t)), \\ u^k(t) \in U_k, \\ t \in \Delta_k, \\ k \in \{1, \dots, v\}, \\ \eta_j(p) = 0, \quad j = 1, \dots, q, \\ \phi_i(p) \le 0, \quad i = 1, \dots, m. \end{array} \right. \qquad (\text{HOCP}) $$

**Definition 3.** For a tuple $w = (t_0; t_k, x^k(t), u^k(t), k = 1, \dots, v)$ which is extremal for Problem (HOCP), define:

* the trajectory $(x(t))_{t \in [t_0, t_v]}$ which is equal to $x^k(t)$ for every $t \in \Delta_k \setminus \{t_k\}$ and $k \in \{1, \dots, v\}$;

* the adjoint trajectory $(\lambda(t))_{t \in [t_0, t_v]}$ which is equal to $\lambda^k(t)$ for every $t \in \Delta_k \setminus \{t_k\}$ and $k \in \{1, \dots, v\}$;

* the control $(u(t))_{t \in [t_0, t_v]}$ which is equal to $u^k(t)$ for every $t \in \Delta_k \setminus \{t_{k-1}\}$ and $k \in \{1, \dots, v\}$.

Define, for every $k \in \{1, \dots, v\}$, $t \in \Delta_k$,

$$H^k(x^k, \lambda^k, \lambda_0, u^k) = \langle \lambda^k, f_k(x^k, u^k) \rangle - \lambda_0.$$

**Theorem 1.** Assume that $(\tilde{x}(\cdot), \tilde{u}(\cdot), \tilde{p})$ is an optimal solution of Problem (HOCP). Then there exists

$(\alpha, \beta, \lambda(\cdot), \lambda_0),$

where $\alpha = (\alpha_1, \dots, \alpha_m) \in \mathbb{R}^m$, $\beta = (\beta_1, \dots, \beta_q) \in \mathbb{R}^q$, $\lambda = (\lambda^1, \dots, \lambda^v)$, all $\lambda^k : \Delta_k \to \mathbb{R}^n$ for $k \in \{1, \dots, v\}$ being Lipschitz functions, and a constant $\lambda_0 \ge 0$ such that:

* $(\lambda_0, \alpha, \beta) \ne 0$;

* For every $i \in \{1, \dots, m\}$, $\alpha_i \ge 0$;

* For every $i \in \{1, \dots, m\}$, $\alpha_i \phi_i(\tilde{p}) = 0$;

* For almost every $t \in \Delta_k$,

$$ \begin{aligned} \dot{x}^k &= \frac{\partial H^k}{\partial \lambda}(x^k, \lambda^k, \lambda_0, \tilde{u}), \\ \dot{\lambda}^k &= -\frac{\partial H^k}{\partial x^k}(x^k, \lambda^k, \lambda_0, \tilde{u}), \\ H^k(x^k, \lambda^k, \lambda_0, \tilde{u}) &= \max_{u \in \Omega} H^k(x^k, \lambda^k, \lambda_0, u) = 0. \end{aligned} \qquad (E) $$
Moreover, if we define $L(p) = \lambda_0(t_v - t_0) + \sum_{i=1}^{m} \alpha_i \phi_i(p) + \sum_{j=1}^{q} \beta_j \eta_j(p)$, then we have the following transversality and discontinuity conditions at times $t = t_0, \dots, t_v$:

* At the initial and final times $t_0$ and $t_v$, we have

$$ \lambda^1(t_0) = \frac{\partial L}{\partial x^1(t_0)}(\tilde{p}), $$

$$ \lambda^v(t_v) = \frac{\partial L}{\partial x^v(t_v)}(\tilde{p}). $$

* At the crossing times $(t_k)_{k \in \{1, \dots, v-1\}}$, we have, for every $k \in \{1, \dots, v-1\}$,

$$ \lambda^k(t_{k-1}) = \frac{\partial L}{\partial x^k(t_{k-1})}(\tilde{p}), $$

$$ \lambda^k(t_k) = -\frac{\partial L}{\partial x^k(t_k)}(\tilde{p}). $$

# 4 | MAIN RESULTS

We are interested in solving (OCP) among continuous B-admissible trajectories, as defined in Section 3.3. We first observe that the regular domain $B_{11}$ is repulsive, and so any B-admissible trajectory with $x(0) \in B_{10}$ and $x(t_f) \in B_{01}$ should pass through $B_{00}$, as the point $(\theta_1, \theta_2)$ cannot be reached from $B_{10}$. Thus, we fix the sequence of regular domains $B = (B_{10}, B_{00}, B_{01})$, with $M_0$ restricted to a point in $K$, and $M_1 = \{(x_1, x_2) \in K \mid x_1 \in [0, \theta_1), x_2 = x_2^f\}$ which has already been proven to be reachable in finite time, verifying assumptions 3 and 4. As previously said, the problem can be further analyzed by applying HMP. The Maximum Principle in the Hybrid framework requires to define functions $(\phi_i)_i$ and $(\eta_j)_j$ that guarantee the continuity of the trajectories and the changes of dynamics at the frontiers $x_1 = \theta_1$ and $x_2 = \theta_2^{32}$. Through its application, we obtain that (OCP) admits an optimal control which can be defined as a very simple feedback.

**Theorem 2.** The optimal strategy $u(x)$ solution of (OCP) for B-admissible trajectories is the feedback control

$$ u(x) = \begin{cases} u_{min} & \text{if } x \in (S_{u_{max}})^-, \\ u_{max} & \text{if } x \in (S_{u_{max}})^+ \cup (S_{u_{max}}). \end{cases} $$

Note that $u(x)$ is not defined in $B_{11}$ due to the lack of control in the region. Figure 4 illustrates the resulting vector field of (S) with the latter time-optimal control law. As a consequence of the latter theorem, the solutions of (OCP) for B-admissible trajectories are such that:

* the optimal control consists of two bang arcs $u \equiv u_{min}$ and $u \equiv u_{max}$, similar to the suboptimal control (4), with the switching between them occurring at the time when the trajectory reaches the separatrix $(S_{u_{max}})$;

* the optimal trajectories passes by the unstable Filippov equilibrium $(\theta_1, \theta_2)$, which is reached by its stable manifold corresponding to dynamics of Equation (S) with $u \equiv u_{max}$. Then, the Filippov equilibrium is left by its unstable manifold corresponding to the dynamics of Equation (S) with $u \equiv u_{max}$.

The proof of this result involves showing there are no singular arcs in the optimal control, and thus $u(t)$ can only be a concatenation of bang arcs. Additionally, because of the two-dimensional affine structure in each regular domain, the sign of the switching function in the Hamiltonian can switch at most once throughout the whole interval $[0, t_f]$. Consequently, the optimal control consists of at most two bang arcs ($u_{min}$ or $u_{max}$), and the problem is reduced to finding the optimal switching time between the two arcs. An example of this trajectory and optimal control is shown in Figure 5.

# 5 | PROOF OF THE MAIN RESULTS

In this section, we provide the proof for Theorem 2, which is organized as follows:

* In Section 5.1, we reduce the problem to $B = (B_{00}, B_{01})$-admissible trajectories;

* In Section 5.2, we prove that any optimal control admits no singular arcs in $B_{00}$;
<figure><img src="image_5.png" /><figcaption>**FIGURE 4** Stream plot of the controlled dynamics (S) with the feedback control of Theorem 2. System parameters are $\gamma_1 = 1.1$, $\gamma_2 = 1.7$, $\theta_1 = 0.6$, $\theta_2 = 0.4$, $k_1 = k_2 = 1$. Control bounds are set to $u_{min} = 0.5$ and $u_{max} = 1.5$.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>**FIGURE 5** Optimal trajectory with $x_1^0 = 0.8$, $x_2^0 = 0.3$ and $x_2^f = 0.7$. System parameters are $\gamma_1 = 1.2$, $\gamma_2 = 1.8$, $\theta_1 = 0.6$, $\theta_2 = 0.4$, and $k_1 = k_2 = 1$. Control bounds are set to $u_{min} = 0.5$ and $u_{max} = 1.5$. Times $t_1$ and $t_2$ are the transition times at which the state meets $x_1(t_1) = \theta_1$ and $x(t_2) = (\theta_1, \theta_2)$.</figcaption></figure>

* In Section 5.3, we show that the optimal control in $B_{00}$ consists of two bang arcs with a switching time $t_s$ such that $x(t_s) \in (S_{u_{max}})$, and we conclude the proof of Theorem 2 showing that there are no singular arcs in $B_{10}$.

## 5.1 | Reduction of the problem

Let $x(t)$ be the solution of Equation (S) such that $x(0) = x_0$ associated with an arbitrary control $u(t)$, and define the time at which the system crosses the frontier between $B_{10}$ and $B_{00}$ (respectively, between $B_{00}$ and $B_{01}$) as $t_1$ (respectively, $t_2$). We notice that the time needed to achieve a transfer between the point $(x_1(t_2), x_2(t_2)) = (x'_1, \theta_2)$ for $x'_1 < \theta_1$, and the set $\{(x_1, x_2) \in K \mid x_2 = x'_2, 0 \le x_1 \le \theta_1\}$ does not depend on $x'_1 \le \theta_1$, and by a direct property of Equation (S) restricted to $B_{01}$, we can easily prove
that the optimal control strategy for Problem (OCP) is obtained when $u(t) = u_{\max}$ for $t \ge t_2$. Moreover, if $u(t) \in [u_{\min}, u_{\max}]$ is another optimal control, then we obtain

$$ \int_{t_2}^{t_f} e^{-\gamma_2 s} (u(s) - u_{\max}) ds = 0, $$

hence $u(t) = u_{\max}$ for almost every $t \in [t_2, t_f]$. As a consequence, we can reduce the problem to solving (OCP) with $x_2^f = \theta_2$ among $B = (B_{10}, B_{00})$-admissible trajectories.

## 5.2 | Absence of singular arcs in $B_{00}$

In order to apply Theorem 1, given the choice $B = \{B_{10}, B_{00}\}$, we set $v = 2$, and we define the vector fields, for $x = (x_1, x_2) \in \mathbb{R}^2$, $u \in [u_{\min}, u_{\max}]$, by

$$ f_1(x_1, x_2, u) = \begin{pmatrix} -\gamma_1 x_1 + u k_1 \\ -\gamma_2 x_2 \end{pmatrix}, \quad f_2(x_1, x_2, u) = \begin{pmatrix} -\gamma_1 x_1 + u k_1 \\ -\gamma_2 x_2 + u k_2 \end{pmatrix}. $$

The times where changes of regular domains occur for the dynamics are denoted by $t_0 = 0 < t_1$, and the final time is $t_2 = t_f$. Notice that $t_0 = 0$ is assumed to be fixed while $t_1, t_f$ are not fixed quantities a priori. We introduce the following functions $(\eta_j)_{j \in \{1, \dots, 7\}}$, which will guarantee the B-admissibility of the trajectories $x(t)$, which are solutions of Equation (S). In accordance with Definition 3 of Section 3.4, for a trajectory $x(t)$ which is solution of Equation (S), we define $p = (t_0, (t_1, x^1(t_0), x^1(t_1)), (t_f, x^2(t_1), x^2(t_f)))$. In order to guarantee the B-admissibility and the continuity of the trajectory $x(t)$ at $t = t_1$, we define the functions

$$ \left\{ \begin{aligned} \eta_1(p) &= t_0, \\ \eta_2(p) &= x_1^1(t_0) - x_1^0, \\ \eta_3(p) &= x_2^1(t_0) - x_2^0, \\ \eta_4(p) &= x_1^1(t_1) - \theta_1, \\ \eta_5(p) &= x_1^2(t_1) - \theta_1, \\ \eta_6(p) &= x_2^1(t_1) - x_2^2(t_1), \\ \eta_7(p) &= x_2^2(t_f) - \theta_2. \end{aligned} \right. $$

As in Theorem 1, for $p = (t_0, (t_1, x^1(t_0), x^1(t_1)), (t_f, x^2(t_1), x^2(t_f)))$, $\alpha \in \mathbb{R}$, and $\beta = (\beta_1, \dots, \beta_7) \in \mathbb{R}^7$, define the Lagrangian

$$ L(p) = \alpha t_f + \sum_{j=1}^{7} \beta_j \eta_j(p). $$

For $k \in \{1, 2\}$, the Hamiltonian $H^k$ defined in Theorem 1 can be written as $H^k = H_0 + u^k H_1^k$, with $u^k \in [u_{\min}, u_{\max}]$ where, for every $x^k = (x_1^k, x_2^k) \in \mathbb{R}^2$ and $\lambda^k = (\lambda_1^k, \lambda_2^k)$,

$$ H_0(x^k, \lambda^k, \lambda_0) = -\gamma_1 x_1^k \lambda_1^k - \gamma_2 x_2^k \lambda_2^k - \lambda_0, $$

$$ H_1^k(x^k, \lambda^k) = \xi_1^k k_1 \lambda_1^k + \xi_2^k k_2 \lambda_2^k, $$

with $\xi_1^1 = 0, \xi_1^2 = 1, \xi_2^1 = 1$, and $\xi_2^2 = 1$. In this setting, the Adjoint State Equation (E) of Theorem 1 writes

$$ \left\{ \begin{aligned} \dot{\lambda}_1^k &= \gamma_1 \lambda_1^k, \\ \dot{\lambda}_2^k &= \gamma_2 \lambda_2^k, \end{aligned} \right. \qquad (AD) $$

which is independent of $k \in \{1, 2\}$. Then, we can derive conditions from Theorem 1 concerning singular arcs of Equation (OCP) along B-admissible trajectories, as defined in Section 3.3. For $k \in \{1, 2\}$, extremal singular arcs occur when the variables $(x^k(t), \lambda^k(t), \lambda_0, u^k(t))$ are extremal and satisfy

$$ H_1^k(x^k(t), \lambda^k(t)) = 0, \qquad (\text{Sing}) $$

for every $t \in [T_1, T_2]$, where $T_1 \le T_1 < T_2 \le t_f$. Along such trajectories, the vanishing condition of the k-th Hamiltonian $H^k$ becomes

$$ -\gamma_1 x_1^k(t) \lambda_1^k(t) - \gamma_2 x_2^k(t) \lambda_2^k(t) - \lambda_0 = 0, \qquad (V) $$
for every $t \in [T_1, T_2]$. Define the $B_{00}$ switching function as $\phi(t) = \text{sign}(k_1\lambda_1^2(t)+k_2\lambda_2^2(t))$ for $t \in [0, t_f]$. As a direct consequence of Theorem 1, we have the following result.

**Lemma 2.** At times $t_0 = 0$, $t_1$ and $t_f$, we have the following transversality and discontinuity conditions:

$$ 
\left\{
\begin{array}{l}
\beta_1 = -\alpha = \lambda_0, \\
\lambda_1^1(0) = \beta_2, \\
\lambda_2^1(0) = \beta_3, \\
\lambda_1^1(t_1) = -\beta_4, \\
\lambda_1^2(t_1) = \beta_5, \\
\lambda_2^1(t_1) = \lambda_2^2(t_1) = \beta_6, \\
\lambda_1^2(t_f) = 0, \\
\lambda_2^2(t_f) = -\beta_7.
\end{array}
\right.
\qquad (TD) $$

We can deduce the following property of extremal trajectories of Problem (OCP).

**Lemma 3.** Extremal trajectories of Problem (OCP) along B-admissible trajectories admit no singular arcs in $B_{00}$, that is, for $t \in [t_1, t_2]$.

*Proof.* In this case, Condition (Sing) becomes

$$ k_1\lambda_1^2(t) + k_2\lambda_2^2(t) = 0, $$

for $t \in [T_1, T_2]$. Differentiating this equality, we obtain

$$ k_1\gamma_1\lambda_1^2(t) + k_2\gamma_2\lambda_2^2(t) = 0, $$

for $t \in [T_1, T_2]$. Then we get, for $t \in [T_1, T_2]$

$$ \lambda_1^2(t)(\gamma_1 - \gamma_2) = 0. $$

Knowing that $\gamma_1 \neq \gamma_2$ by Assumption 1, we obtain $\lambda_1^2(t) = 0$ for $t \in [T_1, T_2]$, and Condition (V) implies

$$ \lambda_1^2(t) = \lambda_2^2(t) = \lambda_0 = 0. $$

Hence, by Equation (AD), we have $\lambda_1^2(t) = \lambda_2^2(t) = \lambda_0 = 0$ for every $t \in [t_1, t_f]$. Applying Theorem 1 with the functions $(\eta_j)_{j \in \{1, \dots, 7\}}$, and the Lagrangian $L$ as defined as above, we see easily that the transversality and discontinuity conditions (TD) at times $t_0 = 0$, $t_1$ and $t_f$ provide that $\alpha = \beta_j = 0$, for every $j \in \{1, \dots, 7\}$. Indeed, the condition $\lambda_1^2(t) = \lambda_2^2(t) = \lambda_0 = 0$ for every $t \in [t_1, t_f]$ implies that $\alpha = \beta_1 = \beta_5 = \beta_6 = \beta_7 = 0$. By Equation (AD), we get that $\lambda_1^2(t) = \lambda_2^2(t) = 0$ for every $t \in [0, t_f]$, so that we can deduce $\beta_3 = \beta_6 = 0$. The null Hamiltonian condition (V) then implies $\lambda_1^2(t) = 0$ for $t \in [0, t_1]$. It follows that $\beta_2 = \beta_4 = 0$, so that the nontriviality condition $(\alpha, \beta) \neq 0$ of Theorem 1 is violated. $\square$

## 5.3 | Optimality of the two bang arcs trajectory for Problem (OCP)

Because of the two-dimensional affine structure in each regular domain, the switching function $\phi$ can switch at most once throughout the whole interval $[0, t_f]$. By reachability considerations, we can deduce the following result.

**Proposition 1.** Extremal trajectories of Problem (OCP) along B-admissible trajectories are made of two bang arcs in the domain $B_{00}$, that is, there exists $t_s \ge t_1$ such that $u(t) = u_{\min}$ for $t_1 \le t \le t_s$, and $u(t) = u_{\max}$ for $t > t_s$.

*Proof.* By Equation (AD) and Lemma 3, the switching function $\phi$ switches at most once for $t \in [t_1, t_f]$. Moreover, in order to achieve a transfer between the lines $x_1^2(t_1) = \theta_1$ and $x_2^2(t_f) = \theta_2$, at least one switch is needed. Indeed, a constant control strategy $u \equiv u_{\min}$ is such that the associated solution $x(t)$ of Equation (S) converges towards $\Phi^*(u_{\min})$ when $t \to \infty$, where $\Phi^*(u_{\min})$ is defined as in Equation (3), so that $x(t) < \theta_2$ for every $t \ge t_1$. Moreover, a constant control strategy $u \equiv u_{\max}$ is such that $x(t) \in B_{10}$ for $t \ge t_1$, so that $x(t)$ is not B-admissible. $\square$

Now we prove that that the switching time $t_s$ defined in Proposition 1 for optimal trajectories of Problem (OCP) along B-admissible trajectories is such that $(x_1^2(t_s), x_2^2(t_s)) \in (S_{u_{\max}})$. First notice that, by a direct study of Equation (S) restricted to the
domain $B_{00}$, we can define $t^* > 0$ as the unique time at which the solution $(y_1(t), y_2(t))$ of Equation (S) with $u \equiv u_{\min}$ and $y_1(0) = \theta_1$ and $y_2(0) = x_2^2(t_1)$ satisfies $(y_1(t^*), y_2(t^*)) \in (S_{u_{\max}})$. In order to guarantee the conditions $x_1^2(t_f) \in [0, \theta_1]$ and $x_2^2(t_f) = \theta_2$, the time $t_s$ defined in Proposition 1 has to satisfy $t_s \ge t_1 + t^*$. We have the following result.

**Lemma 4.** Optimal trajectories of Problem (OCP) along B-admissible trajectories are such that $t_s = t_1 + t^*$ and $x_1^2(t_f) = \theta_1$.

*Proof.* We have for $t_1 \le t \le t_s$,

$$x_1^2(t) = (\theta_1 - \frac{k_1 u_{\min}}{\gamma_1})e^{-\gamma_1(t-t_1)} + \frac{k_1 u_{\min}}{\gamma_1},$$ $$x_2^2(t) = (x_2(t_1) - \frac{k_2 u_{\min}}{\gamma_2})e^{-\gamma_2(t-t_1)} + \frac{k_2 u_{\min}}{\gamma_2},$$

and for $t \ge t_s$ we have

$$x_1^2(t) = (x_1^2(t_s) - \frac{k_1 u_{\max}}{\gamma_1})e^{-\gamma_1(t-t_s)} + \frac{k_1 u_{\max}}{\gamma_1},$$ $$x_2^2(t) = (x_2^2(t_s) - \frac{k_2 u_{\max}}{\gamma_2})e^{-\gamma_2(t-t_s)} + \frac{k_2 u_{\max}}{\gamma_2}.$$

Notice that the condition $x_2^2(t_1) < \theta_2$ implies $x_2^2(t_s) < \theta_2$ and $x_1^2(t_s) < \theta_1$. By direct computations, a time $T \ge t_s$ satisfies $x_2^2(T) = \theta_2$ if and only if

$$T = T(t_s) \equiv t_s + \frac{1}{\gamma_2} \ln \left( \frac{-x_2^2(t_s) + k_2 u_{\max} / \gamma_2}{-\theta_2 + k_2 u_{\max} / \gamma_2} \right).$$

Notice that the condition $\theta_2 < \frac{u_{\max}}{\gamma_2}$ implies we can define a positive function $T: t_s \mapsto T(t_s)$. Moreover, one can prove that, for every $t_s > 0$,

$$T'(t_s) = \frac{k_2(u_{\max} - u_{\min})}{-\gamma_2 x_2^2(t_s) + k_2 u_{\max}}.$$

Using the fact that $(x_1^2(t_s), x_2^2(t_s))$ belongs to $B_{00}$, we obtain that $T$ is increasing on $\mathbb{R}^+$, and reaches its minimum in the interval $[t_1 + t^*, +\infty)$ at $t_s = t_1 + t^*$. The result follows from the definitions of $t^*$ and $(S_{u_{\max}})$ (see Section 2.2.1). $\square$

There remains to understand the structure of an optimal trajectory in the regular domain $B_{10}$, that is, when $t \le t_1$. In the next proposition, we eliminate the possibility of having singular arcs in $B_{10}$ by a direct study of the dynamics of Equation (S) associated with the application of Lemma 4.

**Proposition 2.** Optimal trajectories of Problem (OCP) along B-admissible trajectories admit no singular arc in $B_{10}$.

*Proof.* Consider the solution $\bar{x}(t) = (\bar{x}_1(t), \bar{x}_2(t))$ of Equation (S) such that $u \equiv u_{\min}$ while $\bar{x}(t) \in B_{00} \cap (S_{u_{\max}})^-$, $u \equiv u_{\max}$ while $\bar{x}(t) \in (S_{u_{\max}})$, and the solution $\bar{x}(t) = (\bar{x}_1(t), \bar{x}_2(t))$ of Equation (S) such that $u \equiv \tilde{u}(t)$ while $\bar{x}(t) \in B_{10}$ for an arbitrary control $t \mapsto \tilde{u}(t) \in [u_{\min}, u_{\max}]$, $u \equiv u_{\min}$ while $\bar{x}(t) \in B_{00} \cap (S_{u_{\max}})^-$, $u \equiv u_{\max}$ while $\bar{x}(t) \in (S_{u_{\max}})$, with same initial conditions. Hence we can define the time $\tilde{T} > 0$ (respectively, $\tilde{T}$) at which we have $\bar{x}(\tilde{T}) = (\theta_1, \theta_2)$ (respectively, $\bar{x}(\tilde{T}) = (\theta_1, \theta_2)$). In order to prove that $\tilde{T} \ge \tilde{T}$, let us first consider the time $\tilde{t}_1 > 0$ (respectively, $\tilde{t}_1 > 0$) at which $\bar{x}(t)$ (respectively, $\bar{x}(t))$ reaches the frontier between $B_{10}$ and $B_{00}$. By a direct property of Equation (S) restricted to the domain $B_{10}$, we have $\bar{x}_1(t) \ge \bar{x}_1(t)$ and $\bar{x}_2(t) = \bar{x}_2(t)$ for every $t \le \min(\tilde{t}_1, \tilde{t}_1)$. It follows that $\tilde{t}_1 \le \tilde{t}_1$ and $\bar{x}_2(\tilde{t}_1) \le \bar{x}_2(\tilde{t}_1)$. Now consider a solution $\tilde{y}(t) = (\tilde{y}_1(t), \tilde{y}_2(t))$ (respectively, $\tilde{y}(t) = (\tilde{y}_1(t), \tilde{y}_2(t))$) of Equation (S) with $u \equiv u_{\min}$ and such that $\tilde{y}_1(0) = \tilde{y}_1(0) = \theta_1$, $\tilde{y}_2(0) = \bar{x}_2(\tilde{t}_1)$ and $\tilde{y}_2(0) = \bar{x}_2(\tilde{t}_1)$. By a direct property of Equation (S), the times $\tilde{s}_1$ (respectively, $\bar{s}_1$) at which $\tilde{y}(t)$ (respectively, $\tilde{y}(t))$ reaches $(S_{u_{\max}})$ are such that $\tilde{s}_1 \ge \bar{s}_1$. Hence we can deduce $\tilde{T} = \tilde{t}_1 + \bar{s}_1 \ge \tilde{T} = \tilde{t}_1 + \bar{s}_1$, and the structure of optimal trajectories in $B_{00}$ given by Lemma 4 allows to prove that an optimal trajectory for Problem (OCP) is such that $u(t) = u_{\min}$ for almost every $t \in [0, t_1]$. In particular, optimal trajectories for Problem (OCP) have no singular arcs in $B_{10}$. $\square$

The latter proposition concludes the proof of Theorem 2. Additionally, as a direct consequence of the previous results, we obtain that for $t \in [0, t_f]$, the optimal control is made of a first bang arc with $u \equiv u_{\min}$ towards $(S_{u_{\max}})$ for $t \in [0, t_s]$, then a second bang arc with $u \equiv u_{\max}$ for $t \in [t_s, t_f]$ so that the system follows $(S_{u_{\max}})$ until reaching $(\theta_1, \theta_2)$.
Remark 1. By a direct analysis of the dynamics of Equation (S) in the regular domain $B_{00}$, one can show that the time $t^* = t_s - t_1 > 0$ is the unique non-negative solution of the equation

$$ \left( \frac{k_2 u_{\min}}{\gamma_2} - x_2^2(t_1) \right) e^{-\gamma_2 t} + k_2 \frac{u_{\max} - u_{\min}}{\gamma_2} = \left( \frac{\frac{k_2 u_{\max}}{\gamma_2} - \theta_2}{\frac{k_1 u_{\max}}{\gamma_1} - \theta_1} \right) \left( \left( \frac{k_1 u_{\min}}{\gamma_1} - \theta_1 \right) e^{-\gamma_1 t} + k_1 \frac{u_{\max} - u_{\min}}{\gamma_1} \right)^{\gamma_2/\gamma_1}. \quad (EQ) $$

The latter can be obtained by solving $y_2(t^*) = \alpha(y_1(t^*), u_{\max})$, with $y_1(t^*) = x_1^2(t_1 + t^*)$ and $y_2(t^*) = x_2^2(t_1 + t^*)$. Equation (EQ) is hard to solve explicitly in the general case where Assumption 1 is satisfied, especially because the latter assumption implies $\gamma_1 \neq \gamma_2$.

## 6 | LOWER BOUND ON THE MINIMAL TIME

The time required to perform a transition can be minimized to a certain extent, which is imposed by the dynamics of the system and the choice of control bounds, as shown in previous sections. In this section, we show there exist a lower bound to the minimal time. However, an explicit computation requires to solve Equation (EQ) analytically, which is a challenging task. In this section, we give a lower bound on the minimal time of Problem (OCP) in Proposition 3, which is uniform w.r.t. $[u_{\min}, u_{\max}) \subset [0, +\infty)$ and is a function of the parameters $(\gamma_j)_{j \in \{1,2\}}$, $(k_j)_{j \in \{1,2\}}$, $(\theta_j)_{j \in \{1,2\}}$ satisfying Assumption 1. In this purpose, we introduce an additional system which provides a lower bound for Problem (OCP). Let $[u_{\min}, u_{\max}) \subset [0, +\infty)$ be such that Assumption 2 is satisfied. Then, for every $u_{\min}, u_{\max} \ge 0$ such that $[\bar{u}_{\min}, \bar{u}_{\max}] \subset [u_{\min}, u_{\max}]$, we have $\Phi^*(u_{\min}) \in (S_{u_{\max}})^-$. Hence, the optimal control strategy for Problem (OCP) associated with such values of $u_{\min}, u_{\max}$ is given by Theorem 2.

**Definition 4.** Define the lower trajectories as the solutions of

$$ \begin{aligned} \dot{z}_1 &= -\gamma_1 z_1 + k_1 u(t) s^{-}(z_2, \theta_2) \\ \dot{z}_2 &= -\gamma_1 z_2 + k_2 u(t) s^{-}(z_1, \theta_1), \end{aligned} \quad (\tilde{S}) $$

with $u(t) \equiv u_{\min}$ for $z(t) \in (\tilde{S}_{u_{\max}})^-$, and $u(t) \equiv u_{\max}$ for $z(t) \in (\tilde{S}_{u_{\max}})^+ \cup \tilde{S}_{u_{\max}}$, where $(\tilde{S}_{u_{\max}})$ is defined as in Definition 1.

<figure><img src="image_7.png" /><figcaption>**FIGURE 6** Different trajectories starting from $x_1 = \theta_1$ with fixed control. System parameters are $\gamma_1 = 1.4$, $\gamma_2 = 2$, $\theta_1 = 0.6$, $\theta_2 = 0.4$, and $k_1 = k_2 = 1$. Control is set to $u \equiv u_{\min}$ with $u_{\min} = 0.5$. Trajectories of $(\tilde{S})$ reach its associated separatrix at the lower-bound time $T_{\text{low}}$. Vertical lines at the interception indicate $x_1(T_{\text{low}})$.</figcaption></figure>
A direct application of Lemma 1 proves that if a lower trajectory $z(t)$ is such that $z(0) \in (\tilde{S}_{u_{\max}})^-$, then $z(t)$ reaches $(\tilde{S}_{u_{\max}})$ in finite time $T_{\text{low}}(u_{\min}, u_{\max})$. Moreover, as a consequence of the condition $\gamma_2 > \gamma_1$, we obtain the following lemma.

**Lemma 5.** Consider the solution $x(t)$ of Equation (S) such that $x(0) = x_0 \in (S_{u_{\max}})^-$, where $u$ is defined as in Theorem 2, and the solution $z(t)$ of Equation $(\tilde{S})$ such that $z(0) = x_0$. Then we have $x_1(t) \le z_1(t)$ and $x_2(t) \le z_2(t)$, for every $t \in [0, T_{\text{low}}(u_{\min}, u_{\max})]$.

As a direct consequence, we get that the time $t_s$ needed by $x(t)$ in order to reach $(S_{u_{\max}})$ (defined as in Proposition 1) is such that $t_s \ge T_{\text{low}}(u_{\min}, u_{\max})$.

Hence, if we denote the minimal time for Problem (OCP) by $T_f(u_{\min}, u_{\max})$, then we have $T_f(u_{\min}, u_{\max}) \ge T_{\text{low}}(u_{\min}, u_{\max})$, for every $u_{\min}, u_{\max}$ be such that $0 \le u_{\min} \le u_{\max}$. Furthermore, by definition of Problem (OCP), we have $T_f(u_{\min}, u_{\max}) \ge T_f(\tilde{u}_{\min}, \tilde{u}_{\max})$, for every $u_{\min}, u_{\max}, \tilde{u}_{\min}, \tilde{u}_{\max}$ such that $0 \le \tilde{u}_{\min} \le u_{\min} \le u_{\max} \le \tilde{u}_{\max}$. It follows that for such a choice of $u_{\min}, u_{\max}, \tilde{u}_{\min}, \tilde{u}_{\max}$, we have

$$T_f(u_{\min}, u_{\max}) \ge T_{\text{low}}(\tilde{u}_{\min}, \tilde{u}_{\max}). \qquad (5)$$

**Proposition 3.** Set $x_0 = (x_1^0, x_2^0) \in \tilde{B}_{10}$ such that $x_2^0 < \theta_2$, and consider $u_{\min}, u_{\max}$ such that $0 \le u_{\min} \le u_{\max}$. Let $x(t)$ be the solution of Equation (S) such that $x(0) = x_0$, where $u$ is defined as in Theorem 2. Then we have $T_f(u_{\min}, u_{\max}) \ge -\frac{1}{\gamma_1} \ln(\frac{\theta_1 k_2 - \theta_2 k_1}{\theta_1 k_2 - x_2^0 k_1}) > 0$.

*Proof.* First assume that $x_1^0 = \theta_1$. Then by an adaptation of the formula given in Remark 1, replacing $\gamma_2$ by $\gamma_1$, the time $T_{\text{low}}(u_{\min}, u_{\max})$ needed by the lower trajectory $z(t)$ to reach $(\tilde{S}_{u_{\max}})$ is

$$T_{\text{low}}(u_{\min}, u_{\max}) = -\frac{1}{\gamma_1} \ln \left( \frac{(A(u_{\max})k_1 - k_2)(u_{\max} - u_{\min})}{\gamma_1 \left( \left( \frac{k_2 u_{\min}}{\gamma_1} - x_2^0 \right) - A(u_{\max}) \left( \frac{k_1 u_{\min}}{\gamma_1} - \theta_1 \right) \right)} \right),$$

where $A(u_{\max}) = \frac{\frac{k_2 u_{\max}}{\gamma_1} - \theta_2}{\frac{k_1 u_{\max}}{\gamma_1} - \theta_1}$. For every $u_{\min}, u_{\max}, \tilde{u}_{\max}$ such that $0 \le u_{\min} \le u_{\max} \le \tilde{u}_{\max}$, Inequality (5) provides

$$T_f(u_{\min}, u_{\max}) \ge T_{\text{low}}(0, \tilde{u}_{\max}) = -\frac{1}{\gamma_1} \ln \left( \frac{(A(\tilde{u}_{\max})k_1 - k_2)\tilde{u}_{\max}}{\gamma_1 \left( -x_2^0 + A(\tilde{u}_{\max})\theta_1 \right)} \right).$$

Noticing that $T_{\text{low}}(0, \tilde{u}_{\max}) \to -\frac{1}{\gamma_1} \ln(\frac{\theta_1 k_2 - \theta_2 k_1}{\theta_1 k_2 - x_2^0 k_1})$ when $\tilde{u}_{\max} \to +\infty$, we deduce that $T_f(u_{\min}, u_{\max}) \ge -\frac{1}{\gamma_1} \ln(\frac{\theta_1 k_2 - \theta_2 k_1}{\theta_1 k_2 - x_2^0 k_1})$, for every $u_{\min}, u_{\max}$ such that $0 \le u_{\min} \le u_{\max}$. Moreover, Assumption 1 and the condition $x_2^0 < \theta_2$ guarantee that $-\frac{1}{\gamma_1} \ln(\frac{\theta_1 k_2 - \theta_2 k_1}{\theta_1 k_2 - x_2^0 k_1}) > 0$. We deduce the general case $x_1^0 \ge \theta_1$ noticing that we have in this case $x_2(t_1) \le x_2^0$, where $t_1 \ge 0$ is the time where $x(t)$ changes regular domain from $B_{10}$ to $B_{00}$, then applying the case $x_1^0 = \theta_1$.

□

## 7 | NUMERICAL RESULTS

We illustrate our results with numerical simulations performed with Bocop$^{31}$, an open-source toolbox for solving OCPs. In order to guarantee the reproducibility of the numerical results, the computations can be executed through an online version of Bocop$^{3}$. The original problem (OCP) is solved through a direct method, by approximating it by a finite dimensional optimization problem, using a Lobato time discretization method. As the algorithm requires $s^-$ to be regularized to a smooth function, we define, for $x \in \mathbb{R}$ and $k \in \mathbb{N}$, the Hill function

$$\delta(x_i, \theta_i, k) = \frac{\theta_i^k}{x_i^k + \theta_i^k}, \qquad (6)$$

<footnote>$^3$https://ct.gitlabpages.inria.fr gallery/bistable/bistable.html</footnote>
which can approximate $s^-$ for large values of $k$ and, when $k \to \infty$, it verifies

$$ \lim_{k \to \infty} \delta(x_i, \theta_i, k) = \begin{cases} 1 & x_i < \theta_i, \\ 0 & x_i > \theta_i, \\ 1/2 & x_i = \theta_i. \end{cases} $$

Replacing $s^-$ by Hill functions (6) in system (S) yields the non-hybrid system

$$ \begin{cases} \dot{x}_1 = -\gamma_1 x_1 + uk_1\delta(x_2, \theta_2, k), \\ \dot{x}_2 = -\gamma_2 x_2 + uk_2\delta(x_1, \theta_1, k). \end{cases} $$

System parameters are fixed to $\gamma_1 = 1.2$, $\gamma_2 = 2$, $\theta_1 = 0.6$, $\theta_2 = 0.4$ and $k_1 = k_2 = 1$, which verify Assumption 1; and control bounds are set to $u_{min} = 0.5$ and $u_{max} = 1.5$ satisfying Assumption 2. The parameter $k$ of the Hill function is set to $k = 500$, which proved an acceptable approximation of the $s^-$ function. Figure 5 shows an optimal trajectory representing the transition (high, low) to (low, high). In accordance with the analytical results, the optimal control is a bang-bang control: it consists of a first phase $[0, t_s]$ of low synthesis control $u_{min}$ until $x$ reaches the separatrix $(S_{u_{max}})$, followed by a phase $[t_2, t_f]$ of high synthesis control $u_{max}$ until $x_2$ reaches $x_2^f$. As it is customary when solving OCPs with direct methods, the algorithm does not count on any *a priori* information of the structure of the optimal control. Yet, the obtained trajectory is in agreement with Theorem 2, which confirms our theoretical results. Moreover, the solver is not restricted to consider only B-admissible trajectories, which suggests that the solution found in this work is optimal not only for Problem (OCP) along B-admissible trajectories but also for the general (OCP), without imposing the domain sequences. Figure 7 shows different trajectories starting from $(S_{u_{max}})^+$ and $(S_{u_{max}})^-$. The streamplot represents the closed-loop dynamics for the optimal control defined in Theorem 2. All trajectories starting in $(S_{u_{max}})^-$ approach asymptotically the point $\Phi^*(u_{min})$ (denoted by a cross) until they reach the separatrix, point at which the state slides over it towards the Filippov equilibrium $(\theta_1, \theta_2)$. The optimal control for trajectories starting in $(S_{u_{max}})^+$ consists in $u \equiv u_{max}$ for the whole interval $[0, t_f]$, and do not pass by the Filippov equilibrium.

<figure><img src="image_8.png" /><figcaption>**FIGURE 7** Optimal trajectories starting from different initial points, with $x_2^f = 0.7$ and $k = 500$. The streamplot represents the vector field resulting from applying the optimal bang-bang strategy from Theorem 2.</figcaption></figure>

**Remark 2.** As already mentioned in the introduction, the dynamics is not uniquely defined at the undifferentiated point $(\theta_1, \theta_2)$, and the proposed solution is obtained by making a choice of dynamics at this point. Hence, concerning a biological implementation of our time-optimal strategy, it seems more reasonable to apply $u(t) \equiv u_{min}$ during a slightly longer time $\tilde{t}_s = t_s + \epsilon$ with a small $\epsilon > 0$.

In accordance with Remark 2, one can be interested in comparing the suboptimal control strategy given in Equation (4) with the optimal control given by Theorem 2. To this purpose, one can evaluate the time loss when delaying the switch by a time
$\delta t > 0$, as $t_s = t_1 + t^* + \delta t$, where $t_1$ and $t^*$ are defined as in Section 5.3 and depend on the parameters of the system. One can show by simple computations that the difference between the times needed to reach the target $x_2^f$ for the modified trajectory w.r.t. the optimal trajectory is equal to

$$ \frac{1}{\gamma_2} \ln (1 + e^{\gamma_2(\tilde{t} - t^*)} (e^{\gamma_2 \delta t} - 1)), $$

where

$$ \tilde{t} = \frac{1}{\gamma_2} \ln \left( \frac{k_2(u_{\min} - u_{\max})}{\gamma_2 \theta_2 - k_2 u_{\max}} \right). $$

## 7.1 | Comparison with the smooth case

In order to explore the differences between the hybrid model studied in this paper and the smooth case, we obtained optimal trajectories for the continuous dynamical model given by (6) with lower Hill coefficients. Figure 8 illustrates the impact of the Hill coefficient $k$ in the functions $\delta(x, \theta, k)$, and how high values of $k$ represent a suitable approximation of the discrete case. Figure 9 shows optimal transitions for $k = 3$ compared to the streamplot obtained from the optimal bang-bang strategy. We can

<figure><img src="image_9.png" /><figcaption>FIGURE 8 Different Hill functions with different values of the Hill coefficient.</figcaption></figure>

observe that, even for lower values of $k$, the optimal control strategy remains bang-bang, with the switches being produced after the trajectories reach a certain region not necessarily delimited by $(S_{u_{\max}})$. Finally, an important difference is that the bang-bang control does not yield trajectories passing by the unstable point $(\theta_1, \theta_2)$ in the continuous case. In Figure 10, three trajectories starting from the same initial conditions are compared for different values of $k$. We observe that, as $k$ is increased, the trajectory gets closer to the separatrix, and therefore, to the unstable point $(\theta_1, \theta_2)$. Additionally, both the final time and the switching time are reduced as $k$ increases towards the idealized hybrid case.

## 7.2 | Supplementary condition $x_1(t_f) < x_1^{\max}$

In bistable systems, a binary switch implies taking the state towards the equilibria $\phi_{10}$ and $\phi_{01}$. However, as stated in Section 3, (OCP) represents a relaxed version of this problem where $x_1(t_f) > 0$, as it is not possible to control concentration $x_1$ in $B_{01}$. In
<figure><img src="image_10.png" /><figcaption>FIGURE 9 Optimal trajectories starting from different initial points, with $x_2^f = 0.7$ and $k = 3$. The streamplot represents the vector field resulting from applying the optimal bang-bang strategy from Theorem 2.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>FIGURE 10 Optimal trajectories starting from the initial point (0.8, 0.3), with $x_2^f = 0.7$ and for different values of $k$. The streamplot represents the vector field resulting from applying the optimal bang-bang strategy from Theorem 2.</figcaption></figure>

order to compare the relaxed version with the original one, we investigate numerically the following problem:

$$ \left\{ \begin{array}{l} \text{minimize } t_f \ge 0 \\ x(t) = (x_1(t), x_2(t)) \text{ is subject to (S)}, \\ x(0) = (x_1^0, x_2^0), \\ x_2(t_f) = x_2^f, \\ x_1(t_f) \in [0, x_1^{\max}), \\ u(\cdot) \in [u_{\min}, u_{\max}]. \end{array} \right. \qquad (OCP_2) $$
In the particular case $x_2^f = k_2/\gamma_2$, solving Problem (OCP$_2$) allows to ensure that the state $x(t)$ is close enough to the steady state $\phi_{01}$ at time $t = t_f$. The main difference with (OCP) is that $x_1(t_f)$ is now constrained to the interval $[0, x_1^{\max}]$ with $x_1^{\max} < \theta_1$. For initial conditions in $B_{01}$ given by $x_1^0 \in (x_1^{\max}, \theta_1]$ and $x_2^0 = \theta_2$, we notice that the time it takes for $x_1(t)$ to reach $x_1^{\max}$ does not depend on the control $u$ (as there is no term depending on the control $u$ in the dynamics of $x_1(t)$). Therefore, the final time $t_f$ does not depend on the control, and so any control driving $x_2(t)$ from $x_2(0) = \theta_2$ to $x_2^f$ in a time $t' \le t_f$ is optimal for Problem (OCP$_2$). Thus, the problem has infinite solutions. Figure 11 shows different trajectories for different values of $x_1^{\max}$. Among all infinite solutions, the ones found by Bocop depend on the initialization of the optimization algorithm, and have no particular meaning in the regular domain $B_{01}$. However, we verify that, as in (OCP), the switch in the control $u$ occurs at the separatrix ($S_{u_{max}}$), and then they follow the separatrix until the point $(\theta_1, \theta_2)$. Thus, the simplest bang-bang strategy solution of (OCP$_2$) is

$$u_1(x) = \begin{cases} u_{min} & \text{if } x \in (S_{u_{max}})^-, \\ u_{max} & \text{if } x \in (S_{u_{max}})^+ \cup (S_{u_{max}}) \text{ and } x_2 < x_2^f, \\ \frac{\gamma_2}{k_2} x_2^f & \text{if } x_2 = x_2^f. \end{cases}$$

where the control $u = x_2^f \gamma_2 / k_2$ is chosen so that $\dot{x}_2 = 0$ in the last phase. In the particular case where the final state is such that $x_2^f = k_2/\gamma_2$ (corresponding to the $x_2$-coordinate of the steady state $\phi_{01}$), the optimal control in the last phase corresponds to the open loop system $u = 1$.

<figure><img src="image_12.png" /><figcaption>FIGURE 11 Optimal trajectories obtained with Bocop starting from the same initial point (0.8, 0.3), with $x_2^f = 0.7$ and for different values of $x_1^{\max}$. The streamplot represents the vector field resulting from applying the optimal bang-bang strategy from Theorem 2. The first case (with $x_1^{\max} = \theta_1$) is the solution of (OCP).</figcaption></figure>

## 8 | CONCLUSION

This paper addressed the time-optimal control problem of a bistable gene-regulatory network. Through the application of HMP, we showed that any optimal control achieving state transition is a bang-bang control, where its value is a function of the state of the system (i.e. a feedback control). While in previous works$^{17}$, the bang-bang nature of the control is imposed as a constraint, we showed that such a characteristic is necessary to produce minimum-time transitions. Results also indicate that optimal trajectories should pass by the Filippov equilibrium $(\theta_1, \theta_2)$, which represents the undifferentiated state, highly relevant from the biological
point of view. We showed the existence of a lower bound to the minimal time, by introducing the concept of *lower trajectories*.
The numerical simulations obtained through direct methods confirm our analytical results, even when no prior knowledge of the
structure of the optimal trajectories is specified. The latter are obtained by approximating the piecewise behavior of the systems
with Hill functions, thus simulating a non-hybrid system. Additionally, the numerical results indicate that the trajectories found
are optimal not only among B-admissible trajectories, but for all solutions of the hybrid system (S). Finally, we performed a
numerical comparison of the trajectories obtained for the relaxed problem (i.e. with a constraint $x_1^f \le \theta_1$) and those of the
original one (i.e. with a constraint $x_1^f \le x_1^{\max} < \theta_1$), which suggests that our results are also applicable to the original problem.
Our work can be related to other results in the literature. For instance, in$^{25}$, an irreversible bistable switch in *E. coli* between the
genes FadR and TetR is artificially engineered by augmenting the native circuitry with another positive feedback loop via mutual
inhibition between two TFs. The control strategy is the feed-in of fatty acid, which is chosen to be bang-bang for simplicity. Our
results supports such choice by proving it is not only simple, but also time optimal from a mathematical point of view. We expect
that our result could be generalized to higher dimensional genetic regulatory networks, where it often occurs that trajectories
belonging to a given domain may bifurcate in different domains, similarly to what happens in the toggle switch case.

DATA AVAILABILITY STATEMENT

The data that support the findings of this study are openly available in the ct (control toolbox) gallery at https://ct.gitlabpages.inria.fr/gallery/bistable/bistable.html.

References

1. Chuang HY, Hofree M, Ideker T. A decade of systems biology. *Annual review of cell and developmental biology* 2010; 26: 721–744.

2. Giordano N, Mairet F, Gouzé JL, Geiselmann J, Jong dH. Dynamical allocation of cellular resources as an optimal control problem: novel insights into microbial growth strategies. *PLoS computational biology* 2016; 12(3): e1004802.

3. Cosentino C, Bates D. *Feedback control in systems biology*. Crc Press . 2019.

4. Yegorov I, Mairet F, De Jong H, Gouzé JL. Optimal control of bacterial growth for the maximization of metabolite production. *Journal of mathematical biology* 2019; 78(4): 985–1032.

5. Yabo AG, Caillau JB, Gouzé JL. Singular regimes for the maximization of metabolite production. In: 2019 IEEE 58th Conference on Decision and Control (CDC). ; 2019: 31-36

6. Yabo AG, Caillau JB, Gouzé JL. Optimal bacterial resource allocation: metabolite production in continuous bioreactors [J]. *Mathematical Biosciences and Engineering* 2020; 17(6): 7074–7100. doi: 10.3934/mbe.2020364

7. Schlitt T, Brazma A. Current approaches to gene regulatory network modelling. *BMC Bioinformatics* 2007; 8(6): S9. doi: 10.1186/1471-2105-8-S6-S9

8. Arcak M, Sontag ED. A passivity-based stability criterion for a class of biochemical reaction networks. *Mathematical biosciences & engineering* 2008; 5(1): 1.

9. Farcot E, Gouzé JL. A mathematical framework for the control of piecewise-affine models of gene networks. *Automatica J. IFAC* 2008; 44(9): 2326–2332.

10. Glass L, Pasternack JS. Prediction of limit cycles in mathematical models of biological oscillations. *Bull. Math. Biology* 1978; 40(1): 27–44. Papers presented at the Society for Mathematical Biology Meeting (Univ. Pennsylvania, Philadelphia, Pa., 1976)doi: 10.1007/bf02463128

11. Mallet-Paret J, Smith HL. The Poincaré-Bendixson theorem for monotone cyclic feedback systems. *Journal of Dynamics and Differential Equations* 1990; 2(4): 367–421.
12. Sontag ED. Passivity gains and the “secant condition” for stability. *Systems & Control Letters* 2006; 55(3): 177-183. doi: https://doi.org/10.1016/j.sysconle.2005.06.010

13. Gardner T, Cantor C, Collins J. Construction of a Genetic Toggle Switch in Escherichia coli. *Nature* 2000; 403: 339-42. doi: 10.1038/35002131

14. Inniss MC, Silver PA. Building synthetic memory. *Current Biology* 2013; 23(17): R812–R816.

15. Chambon L, Belgacem I, Gouzé JL. Qualitative control of undesired oscillations in a genetic negative feedback loop with uncertain measurements. *Automatica* 2020; 112: 108642.

16. Augier N, Chaves M, Gouzé JL. Qualitative control strategies for synchronization of bistable gene regulatory networks. https://hal.inria.fr/hal-02953502; 2020.

17. Chaves M, Gouzé JL. Exact control of genetic networks in a qualitative framework: the bistable switch example. *Automatica J. IFAC* 2011; 47(6): 1105–1112.

18. Augier N, Yabo AG. Time-optimal control of piecewise affine bistable gene-regulatory networks: preliminary results. In: 7th IFAC Conference on Analysis and Design of Hybrid Systems (ADHS21). ; 2021.

19. Filippov AF. Differential equations with discontinuous right-hand side. *Matematicheskii sbornik* 1960; 93(1): 99–128.

20. Balázsi G, Oudenaarden vA, Collins JJ. Cellular decision making and biological noise: from microbes to mammals. *Cell* 2011; 144(6): 910–925.

21. Lugagne JB, Carrillo SS, Kirch M, Köhler A, Batt G, Hersen P. Balancing a genetic toggle switch by real-time feedback control and periodic forcing. *Nature communications* 2017; 8(1): 1–8.

22. Guarino A, Fiore D, Di Bernardo M. In-silico feedback control of a MIMO synthetic toggle switch via pulse-width modulation. In: 2019 18th European Control Conference (ECC). ; 2019: 680–685.

23. Farcot E, Gouzé JL. A mathematical framework for the control of piecewise-affine models of gene networks. *Automatica* 2008; 44(9): 2326–2332.

24. Hillenbrand P, Fritz G, Gerland U. Biological signal processing with a genetic toggle switch. *PloS one* 2013; 8(7): e68345.

25. Mannan AA, Bates DG. Designing an irreversible metabolic switch for scalable induction of microbial chemical production. *Nature Communications* 2021; 12(1): 3419. doi: 10.1038/s41467-021-23606-x

26. Loomis J, Magasanik B. Glucose-lactose diauxie in Escherichia coli. *Journal of bacteriology* 1967; 93(4): 1397–1401. doi: 10.1128/JB.93.4.1397-1401.1967

27. Salvy P, Hatzimanikatis V. Emergence of diauxie as an optimal growth strategy under resource allocation constraints in cellular metabolism. *Proceedings of the National Academy of Sciences* 2021; 118(8). doi: 10.1073/pnas.2013836118

28. Boscain U, Mason P. Time minimal trajectories for a spin 1/2 particle in a magnetic field. *Journal of Mathematical Physics* 2006; 47(6): 062101.

29. Boscain U, Grönberg F, Long R, Rabitz H. Minimal time trajectories for two-level quantum systems with two bounded controls. *Journal of Mathematical Physics* 2014; 55(6): 062106.

30. Trélat E, Zuazua E. The turnpike property in finite-dimensional nonlinear optimal control. *Journal of Differential Equations* 2015; 258(1): 81–114.

31. Team Commands IS. BOCOP: an open source toolbox for optimal control. http://bocop.org; 2017.

32. Dmitruk AV, Kaganovich AM. The hybrid maximum principle is a consequence of Pontryagin maximum principle. *Systems & Control Letters* 2008; 57(11): 964–970.