# Experimental Validation of a Guaranteed Nonlinear Model Predictive Control
## 3 Guaranteed Controller Design via Validated Simulation
### Validated Nonlinear Model Predictive Control
#### 3.2.1 Filtering and Branching Procedures  
The validated NMPC strategy should provide an optimal input box at each time-step \(k\). This latter can be denoted as \([\mathbf{U}]_{k}^{*}=[\mathbf{u}]_{k}^{*}\times[\mathbf{u}]_{k+1}^{*}\times \ldots\times[\mathbf{u}]_{k+N_{p}-1}^{*}\), where \(N_{p}\) is the number of input samples generated over the prediction horizon. Branching procedure allows us to generate safe input intervals \([\mathbf{U}]_{k}^{*}\) over the prediction horizon that satisfies all the state constraints and convergence to the reference interval \([\mathbf{y}_{r}]\). Therefore, the system can be described using a simple interval notation by the following constraint differential equation:  
\[ \begin{array}{ll}\dot{y}_{t}=\mathbf{f}(t,y_{t},u_{t}),&\\ \text{s.t.}:&u_{t}\in\mathbb{U},&\forall t\geq 0\\ &y_{t}\in\mathbb{Y},&\forall t\geq 0\end{array}  \tag{6}\]  
where \(\mathbb{U}\) and \(\mathbb{Y}\) are respectively the input and state variables saturation. They can be written as  
\[\mathbb{U}=\{u_{t}\in\mathbb{R}^{m}\mid u_{\min}\leq u_{t}\leq u_{\max}\}\quad \text{and}\quad\mathbb{Y}=\{y_{t}\in\mathbb{R}^{n}\mid y_{\min}\leq y_{t}\leq y _{\max}\} \tag{7}\]  
where \(u_{\min}\) and \(u_{\max}\) are the admissible domain bounds for the control variable. Similarly, \(y_{\min}\) and \(y_{\max}\) are those of the state components. Starting from the current state boxes \([\mathbf{y}_{t}]\) computed at time \(t\) and input feasible domain \([\mathbf{u}_{k}]=[u_{\min},u_{\max}]\), the computation of a new state domain \([\mathbf{y}_{t+T_{c}}]\) is performed by the validated simulation algorithm, where \(T_{c}\) denotes the sampling time of the control signal, and then the horizon time \(T_{p}=T_{c}\times N_{p}\). This strategy bisects the initial domain \([\mathbf{u}_{k}]\) on the left and right intervals that reduces the width of the initial interval \([\mathbf{u}_{k}]\). For each bisected input interval, the validated simulation algorithm provides a state domain of which the safety and convergence criteria are verified, as can be seen in this equation:  
\[[\mathbf{f}](t,[\mathbf{u}_{k}],[\mathbf{y}_{t}])=[\mathbf{y}_{t+T_{c}}]\;\; \text{and}\;\;\;[\mathbf{y}_{t+T_{c}}]\subseteq[y_{\min},y_{\max}] \tag{8}\]  
The filtering and branching algorithm is given in Algorithm 1. The function bisect check is a pruning function that performs a bisection procedure of the initial input interval if its width exceeds some tolerance \(tol\) value. One side of bisected intervals is kept by considering these criteria: (i) A branch leading to unsafe state is avoided (i.e., \([\mathbf{y}_{t+T_{c}}]\
subseteq[\mathbf{y}_{\min},\mathbf{y}_{\max}]\)); and (ii) a branch leading to a state far from the reference interval \([\mathbf{y}_{r}]\) or partially a cost greater than the other branch is eliminated (see interval optimization in Section 3.2.2). Moreover, the function Test sensitivity() enables us to simulate the adjoint function \(x(u)=\frac{\partial y}{\partial u}\) expressing the rate of variation of the state concerning the control variable. Its derivative can be derived as below:  
\[\dot{x}=\frac{\partial\mathbf{f}}{\partial y}\times x+\frac{\partial\mathbf{f }}{\partial u} \tag{9}\]  
Using the Test sensitivity() function, it returns the Boolean formula:  
\[\left\{\exists\epsilon>0,\;0\in x([\mathbf{u}_{k}])\;\;\text{AND}\;\;x([ \mathbf{u}_{k}])\
subseteq[-\epsilon,\epsilon]\right\}\;\;\text{OR}\;\left\{ \exists\tau\in[t,t+T_{c}],\;y(\tau)\
subseteq\mathbb{Y}\right\} \tag{10}\]  
Sensitivity analysis allows for checking if the computed input \([\mathbf{u}_{k}]\) is leading the system to move in forward and backward directions at the same time, as can be seen by the first part of the Boolean expression. The second part of this formula enables us to verify if the state constraints are respected. Since the safe inputs' intervals are computed using the validated simulation, the interval cost function is optimized to calculate its sub-optimal solution. The optimization part is detailed in the next section.