## 2 Methodologies
### Collision Avoidance Algorithm
When the goal position is under the influence of the repelling force, the quadcopter can arrive at the goal position because the repulsive potential field also contains \(\mathbf{f}_{r,g}\) which produces the potential field toward the goal position. That is, this term contributes to resolving the GNRON issue. By summing up two potential fields, the total potential field (\(\mathbf{f}_{t}\)) is computed. Since Equations (25)-(28) only resolve the GNRON issue, the local minima issue still remains. Hence, this study focuses on resolving the local minima issue by redefining the first-term \(\mathbf{f}_{r,o}(^{N}\mathbf{r})\) of the repulsive potential field in Equation (27) as follows:  
\[\mathbf{f}_{r,e}(^{N}\mathbf{r})=-k_{r}\frac{d(^{N}\mathbf{r},\ ^{N}\mathbf{r}_{g})^{n_{g}}}{d(^{N} \mathbf{r},\ ^{N}\mathbf{r}_{o})^{2}}\left(\frac{1}{d(^{N}\mathbf{r},\ ^{N}\mathbf{r}_{o})}-\frac{1}{d_{o}}\right)\hat{ \mathbf{q}}. \tag{29}\]  
It is important to note that the direction of \(\mathbf{f}_{r,o}(^{N}\mathbf{r})\) is replaced with \(\hat{\mathbf{q}}\in\mathcal{R}^{3}\) because the local minima issue is highly related to the determination of the direction in front of the obstacles, as shown in Figure 2. This shows the difference between the generated total potential field of the conventional and proposed approaches in the local minima situation. While the conventional one has a total potential field of zero (i.e., \(\mathbf{f}_{a}+\mathbf{f}_{r,o}+\mathbf{f}_{r,g}=\emptyset\)), the proposed approach results in the non-zero total potential field by utilizing \(\mathbf{f}_{r,e}\) instead of \(\mathbf{f}_{r,o}\). The new direction vector \(\hat{\mathbf{q}}\) is defined by combining the horizontal avoidance direction with the vertical one. The horizontal and vertical avoidance direction vectors (i.e., \(\mathbf{q}_{h}=[q_{h,1},\ q_{h,2},\ q_{h,3}]^{\mathrm{T}}\in\mathcal{R}^{3}\) and \(\mathbf{q}_{v}=[q_{v,1},\ q_{v,2},\ q_{v,3}]^{\mathrm{T}}\in\mathcal{R}^{3}\)) are defined as  
\[\mathbf{q}_{h} = R_{h}(^{N}\mathbf{r}_{o}-\ ^{N}\mathbf{r}), \tag{30}\] \[\mathbf{q}_{v} = R_{v}(^{N}\mathbf{r}_{o}-\ ^{N}\mathbf{r}), \tag{31}\]  
where \(R_{h}\in\mathcal{R}^{3\times 3}\) and \(R_{v}\in\mathcal{R}^{3\times 3}\) are the rotation matrices that rotate the direction of the conventional repulsive potential field into a horizontal new direction and a vertical new direction, respectively. These new directions seek to avoid the situation in which the quadcopter becomes stuck in front of the obstacle. Once avoidance directions are determined for each plane, \(\hat{\mathbf{q}}\) is calculated as follows:  
\[\hat{\mathbf{q}}=\frac{\mathbf{q}^{\prime}}{||\mathbf{q}^{\prime}||}, \tag{32}\]  
where  
\[\mathbf{q}^{\prime}= \begin{bmatrix}\alpha\,q_{h,1}\\ \alpha\,q_{h,2}\\ (1-\alpha)\,q_{v,3}\end{bmatrix} . \tag{33}\]  
Figure 2: Comparison of the directions of each potential field between (**a**) conventional APF and (**b**) proposed approach. Here, \(\alpha\in[0,1]\) is a weighting factor for consolidating two avoidance directions. Note that \(q_{h,1}\) and \(q_{h,2}\) for the horizontal direction and \(q_{v,3}\) for the vertical direction are only used because these are the dominant terms for generating the maneuvers in each direction. To determine the proper rotation matrices for the collision-free repelling direction of the repulsive potential field, this work considers the relative angles between the quadcopter's velocity vectors and the relative position vector between the quadcopter and the obstacle in the horizontal and vertical planes. To obtain the relative angles, an additional reference frame (i.e., \(E\) frame) is defined using \(\hat{\mathbf{e}}_{k}\) for \(k=1,2\), and \(3\), as shown in Figure 3. Note that \(\hat{\mathbf{e}}_{1}\) is a unit vector that has the same direction along with the quadcopter's velocity direction, and \(\hat{\mathbf{e}}_{2}\) is defined as \(\hat{\mathbf{n}}_{3}\times\hat{\mathbf{e}}_{1}\). Then, \(\hat{\mathbf{e}}_{3}\) is determined by \(\hat{\mathbf{e}}_{1}\times\hat{\mathbf{e}}_{2}\).