# Three-Dimensional Obstacle Avoidance Strategy for Fixed-Wing UAVs Based on Quaternion Method
## 3 Improved 3D-VO Method for UAV Collision Avoidance
### Avoidance Planes  
Similar to two-dimensional velocity obstacle (2D-VO) methods, the UAV needs to independently find the avoidance velocity in the set \(\mathcal{AV}_{UAV|OBS}\) that is constantly being updated in real time. However, compared with the 2D-VO method, the topological dimension of the configuration space is expanded to three, and the difficulty of solving the avoidance velocity also increases. Hence, we follow the concept on the avoidance planes mentioned in Refs. [17, 28]. Avoidance planes help transform the 3D problems into a series of 2D setups. \(\mathcal{S}\) is defined as a series of discrete planes that rotate around the \(x\)-axis of the \(s\)-frame at certain angles. The plane of rotation angle \(\delta\) is denoted as \(S^{\delta}\in\mathcal{S}\), shown in Figure 1(b).  
The cross section obtained by the intersection of \(\mathcal{VO}_{UAV|OBS}(v_{OBS})\) and the plane \(S^{\delta}=\mathbb{R}^{2}\) is denoted as \(S^{\delta}_{UAV|OBS}(v_{B})\). If there is a collision in the \(S^{\delta}\) plane, then selecting  
Figure 3: Task status: (**a**) collision avoidance, (**b**) critical state, (**c**) way point tracking.  
the avoidance velocity \(\mathbf{v}_{av0}\in S^{\delta}\backslash S^{\delta}_{UAV|OBS}(\mathbf{v}_{B})\) outside the area \(S^{\delta}_{UAV|OBS}(\mathbf{v}_{B})\) can avoid the collision.  
To obtain expressions of conic sections in any obstacle avoidance plane, we implement a rotation-plane coordinate system \(\left\{\mathbf{x}^{\delta},y^{\delta},z^{\delta}\right\}\) by rotating the \(s\)-frame around the \(\mathbf{x}^{s}\) axis at an angle of \(\delta\) and then projecting the VO cone under the rotation-plane coordinate system:  
\[\left[\begin{array}{c}\mathbf{x}^{\delta}\\ y^{\delta}\\ z^{\delta}\end{array}\right]=R^{\delta}_{s}\left[\begin{array}{c}x^{s}\\ y^{s}\\ z^{s}\end{array}\right],\hskip 28.452756 pt\mathbf{R}^{\delta}_{s}=\left[ \begin{array}{ccc}1&0&0\\ 0&\cos\delta&\sin\delta\\ 0&-\sin\delta&\cos\delta\end{array}\right] \tag{16}\]  
We set the \(z^{\delta}-\)axis coordinate of the VO cone to zero and obtain the coordinate points set  
\(\mathcal{F}==\left\{\left(x^{\delta}_{cov},y^{\delta}_{cov}\right)\biggm{|}z ^{\delta}_{vo}=0\right\}\), which is the coordinates of the conic section on the avoidance plane \(S^{\delta}\). When \(z^{\delta}=0\), for each \(\varphi\), there exists a unique \(q\) corresponding to it. The mapping relationship is described as  
\[q_{|z^{\delta}=0}=\frac{O_{av_{o}}\sin\delta-O_{av_{o}}\cos\delta}{\sin\psi_{ uv}\cos\theta_{uo}\sin\delta-\tan\eta_{vo}\cos\varphi\cos\psi_{uu}\sin\delta-\tan\eta_{vo} \sin\varphi\sin\psi_{uu}\sin\theta_{uo}\sin\delta+\sin\theta_{uo}\cos\delta+ \tan\eta_{vo}\sin\varphi\cos\theta_{uo}\cos\delta} \tag{17}\]  
When \(\delta\) takes different values, the shape of the conic section is different, roughly divided into ellipse, hyperbola, and triangle. Generally, there is a strong correlation between the shape of the conic section and collision risk for the UAV. The shapes of the collision risk from high to low are the triangle, hyperbola, and ellipse. Therefore, we would better find an appropriate \(\mathbf{v}_{av0}\) in the elliptical conic section, which can be selected by judging the relationship between \(\zeta_{\delta}\) and \(\eta_{VO}\):  
\[\zeta_{\delta}=\arccos\left(\frac{\mathbf{k}^{\prime}_{vo}}{d_{vo}}\left[\begin{array} []{c}0\\ \sin\delta\\ \cos\delta\end{array}\right]\right) \tag{18}\]  
When  
\[\zeta_{\delta}<\frac{\pi}{2}-\eta_{VO} \tag{19}\]  
the conic section shape is an ellipse; otherwise it is a hyperbola or triangle.