of needle-like variations.

Structure of the paper
----------------------

The paper is organized as follows. In Section \[sec2\], we develop an algorithm to steer a perturbed system to the desired final point. The method is similar to the one presented in Section \[overview\], except that we need to consider a backward problem. Indeed, the final point is fixed, and perturbations appear all along the trajectory. Besides, our measure for robustness comes out naturally in view of . Having identified the robustness criterion, we show in Section \[sec3\] how to add redundant switching times, leading one to solve a finite-dimensional nonlinear optimization problem. In Section \[sec4\], we provide some numerical illustrations on the attitude control problem of a 3-dimensional rigid body.

Tracking algorithm {#sec2}
==================

#### Setting.

In this paper, we consider the control system $$\dot{x}(t) = f(t,x(t),u(t)),
\label{dynamics}$$ where $f$ is a smooth function ${\mathbb{R}}\times {\mathbb{R}}^n \times {\mathbb{R}}^m \rightarrow {\mathbb{R}}^n$, the state $x(\cdot) \in {\mathbb{R}}^n$, the control $u(\cdot) \in L^{\infty}([0,t_f];\Omega)$, and $\Omega$ is the subset of ${\mathbb{R}}^m$: $[a_1,b_1] \times \cdots \times [a_m,b_m]$. We make two additional hypothesis: the controls we consider are “bang-bang”, with a finite number of switching times:

  --------- -------------------------------------------------------------------------------------
   $(H_1)$   $\forall i \in \llbracket1,m \rrbracket$, $u_i(t) \in \left\{a_i,b_i\right\}$, 