# Using Interval Analysis to Compute the Invariant Set of a Nonlinear Closed-Loop Control System
## 5 Interval Computation  
The outer interval enclosure of the invariant set \(S_{1}\) of the controlled system in \(\mathbf{x}\), denoted exemplarily by \((x_{1},x_{2})\), is calculated using interval computation. This is possible due to the fact that the Lyapunov-like functions defined before provide inequalities. Therefore, it is checked for subintervals (i.e, boxes) covering the operating domain of interest if the conditions:  
\[ \begin{split} s(\mathbf{x})&=0\;\;\text{(which is not included in the definition of $S_{1}$, but only in $S_{0}$)},\\ \dot{s}(\mathbf{x})&=0,\\ \ddot{s}(\mathbf{x})&=0,\;\text{and}\\ \dddot{s}(\mathbf{x})&=0\end{split}  \tag{33}\]  
are satisfied in a domain that is a priori restricted to the set \(s^{2}(\mathbf{x})\leq\mu,\mu>0\). This last condition restricts the search space to a maximum admissible squared distance from the sliding surface. To solve a problem according to the specification (33), a general approach for interval techniques aiming at set inversion should be briefly described. The following description is based on Figure 2. In the examined case, a set is known in the domain of \((y_{1},y_{2})\), and the set that should be found by the inversion technique is located in the \((x_{1},x_{2})\)-plane. The function \(\mathbf{f}\) performing the mapping, \(\mathbf{y}=\mathbf{f}(\mathbf{x})\), \(\mathbf{x}\in\mathbb{R}^{2},\mathbf{y}\in\mathbb{R}^{2}\), from the \((x_{1},x_{2})\)-plane to the \((y_{1},y_{2})\)-plane is assumed to be known together with a suitable inclusion function \([\mathbf{f}]\) that finds a rectangular box that encloses the set (gray). This function will not necessarily lead to the tightest enclosing box, but it is convergent with respect to interval bisections. The inverse mapping of \(\mathbf{f}\) does not necessarily have to be known explicitly, so \((x_{1},x_{2})\) either does not need to be or even cannot be determined analytically. Starting with a sufficiently large box \([\mathbf{x}_{0}]\) in the \((x_{1},x_{2})\)-plane that encloses the whole solution domain of interest, the corresponding box in \((y_{1},y_{2})\) is calculated. It is then checked if it is located either outside the set (blue), inside the set (red), or if it is overlapping with both, the outer and interior domains, i.e., if the location is undecided (yellow). Whenever it is not sure if the box is inside or outside, the box in the \((x_{1},x_{2})\)-plane will be split at the midpoint of each edge, and the procedure will be repeated for each of the new boxes. This is continued until a certain accuracy is reached. The red boxes will represent the corresponding set in the \((x_{1},x_{2})\)-plane. This algorithm is called set inversion via interval analysis (SIVIA) [2]. Note that interval computations are guaranteed in the following sense: If a box in the \((x_{1},x_{2})\)-plane has been found that is mapped into the interior of \(\mathcal{Y}\), it is guaranteed to be part of the true solution set \(\mathcal{Y}\), and vice versa, that if a box lies outside the solution set \(\mathcal{Y}\) in the \((y_{1},y_{2})\)-plane, its counterpart in \((x_{1},x_{2})\) certainly contains no admissible solutions. If both cases are included in one box, it will, as mentioned before, either be split or, if the volume of the respective hypercuboid falls below some threshold value, be labeled as undecided. As this successive bisectioning scheme leads to lots of boxes that have to be checked (\(2^{n}\) boxes for a simultaneous subdivision of an \(n\)-dimensional box in each of its edges) the concept of contractors can effectively be applied to shrink a box as far as possible to the solution set. Here, the interval contraction is performed by means of each component of the vector valued function \(\mathbf{f}\). A contractor can be built by looking at the syntactic tree of the function \(\mathbf{f}\), which means a decomposition into primitive equations by defining auxiliary variables [2]. In this way, the intervals can be contracted in a forward-backward manner.