## 3 Optimization Formulation  
Given two polytopes of the AMS and the RMS, mathematical definition of the coverage problem can be explained with the aid of an example draft in Figure 2. The red and blue polygons in the figure represent a 2D AMS and RMS, respectively. Due to the convex property, a complete coverage can be guaranteed when all the RMS vertices are enclosed by the AMS. For each RMS vertex, a margin factor is defined as  
\[\lambda^{i}=\frac{\|\mathbf{a}^{i}\|}{\|\mathbf{r}^{i}\|}, \tag{2}\]  
where,  
* \(\mathbf{r}^{i}\) is the vector from origin to the \(i\)-th RMS vertex,
* \(\mathbf{a}^{i}\) is the intersection point of a ray extension from \(\mathbf{r}^{i}\) onto the AMS's boundary,
* \(\|\cdot\|\) is the 2-norm of a vector. Note that this margin factor \(\lambda\) is a positive number and will be bigger than 1 if a vertex of RMS is bounded inside the AMS, and it is smaller than 1 if the vertex is beyond the AMS. The AMS's coverage over the RMS is therefore guaranteed if all the \(\lambda\) is bigger than 1. Recall that we can influence the AMS (shape or capacity as a polytope) by changing the effector related parameters, therefore, we can optimize the AMS such that it fully encircles the RMS. To maximize overall coverage and punish vertices with small margins, the optimization problem can be defined as  
\[ \begin{split}\min_{\mathbf{p}}&\ =\sum_{i=1}^{n}\frac{1}{ \lambda^{i}},\\ \text{subject to,}&\ \left\{\begin{array}{l}\underline{\mathbf{p}} \leq\mathbf{p}\leq\overline{\mathbf{p}}\\ \mathbf{c}(\mathbf{p})\leq\overline{\mathbf{c}}\end{array}\right.,\end{split}  \tag{3}\]  
where,  
* \(n\) is the total number of vertices on the RMS,
* \(\mathbf{p}\) is the vector of variables to optimize, with \(\underline{\mathbf{p}}\) and \(\overline{\mathbf{p}}\) the lower and upper bounds of \(\mathbf{p}\),
* \(\mathbf{c}\) is the vector of some additional constraints, e.g., allowance of additional mass or space, with \(\overline{\mathbf{c}}\) is the limits of \(\mathbf{c}\). The key to this optimization problem is to calculate \(\lambda^{i}\) for each RMS vertex and evaluate the cost function. For problems in \(3D\) or higher dimensions, calculating this intersection and finding \(\lambda\) is not at all trivial. Given the case of linear effectiveness, the AMS of a system with \(m\) inputs has \(2\text{C}_{m}^{2}\) facets, whereas the intersection is only located on one facet among all. To find the intersection, the most straightforward solution is to brutal search among all the facets. In a \(\mathbb{R}^{3}\) moment space, assume three vertices on one facet  
Figure 2: A 2D illustrative comparison between the AMS and the RMS. In 2D, both AMS and RMS reduce to convex polygons. In higher dimensions, they are both convex polyhedrons. of the AMS represented by \(3D\) coordinates \(\overset{\rightarrow}{\boldsymbol{a}}\), \(\overset{\rightarrow}{\boldsymbol{b}}\), and \(\overset{\rightarrow}{\boldsymbol{c}}\), and assume the query direction represented by the coordinate of an RMS vertex is \(\overset{\rightarrow}{\boldsymbol{d}}\). To solve for the margin factor \(\lambda\) of \(\overset{\rightarrow}{\boldsymbol{d}}\) with respect to facet \(\left\{\overset{\rightarrow}{\boldsymbol{a}},\overset{\rightarrow}{ \boldsymbol{b}},\overset{\rightarrow}{\boldsymbol{c}}\right\}\), the following set of equations needs to be solved:  
\[ \begin{array}{c}\alpha_{1}\overset{\rightarrow}{\boldsymbol{a}}+\alpha_{2 }\overset{\rightarrow}{\boldsymbol{b}}+\alpha_{3}\overset{\rightarrow}{ \boldsymbol{c}}=\lambda\overset{\rightarrow}{\boldsymbol{d}}\\ \alpha_{1}+\alpha_{2}+\alpha_{3}=1\end{array} \, \tag{4}\]  
It is a 4-by-4 linear system such that \(\alpha_{1,2,3}\) and \(\lambda\) can be solved for. The only valid solution is when \(\alpha_{1,2,3}\in[0,\,1]\), which means the intersection is encircled by the three vertices of the facet.