﻿ 基于三元角的坐标旋转变换方法<sup>*</sup>
 文章快速检索 高级检索

Coordinate rotation transformation method based on ternary angle
MIAO Jisong, SHAO Qiongling, REN Yuan
Received: 2016-11-17; Accepted: 2017-02-15; Published online: 2017-03-16 16:18
Foundation item: National High-tech Research and Development Program of China (2015AA7026083)
Corresponding author. REN Yuan, E-mail: renyuan_823@aliyun.com
Abstract: Quaternion and Euler angle are used to describe coordinate transformation. Euler angle is characterized by three-time rotation and three parameters, and there are 12 kinds of rotation order. The characteristics of the quaternion are described by one rotation and four parameters. Using Euler angle is easy to cause gimbal lock phenomenon. Although it can avoid gimbal lock phenomenon, quaternion is more than Euler angles with one dimension and 33% amount of data. It may be illegal due to the accumulation of rounding error of floating point. To avoid the defects of the above methods, a new coordinate transformation method was proposed and two new concepts of deflection-vector axis and deflection-vector angle were introduced. The coordinate rotation transformation matrix based on the ternary angle was strictly deduced. Compared with the Euler rotation transformation, this method needs less rotation and avoids gimbal lock phenomenon; compared with the quaternion, it needs less parameters and is easy to understand. This method is more convenient for the description of the compound rotation. The proposed method provides more convenient mathematical means for the design and analysis of attitude transformation in related fields, such as inertial navigation and rotation modulation.
Key words: quaternion     Euler angle     ternary angle     coordinate transformation     deflection-vector axis     deflection-vector angle

1 三元角相关概念及参数定义

 图 1 三元角坐标变换方式示意图 Fig. 1 Schematic diagram of ternary angle coordinate transformation
 图 2 末系到初系先偏转过程简图 Fig. 2 Process diagram of deflection first from last coordinate system to initial coordinate system

1) 偏矢轴PS  在t0时刻对1系进行惯性凝固，将此时的Z轴定义为惯性转轴Zi, 将此时的XOY平面定义为惯性平面Si，在Si平面内某条轴与Zi轴垂直且相交于原点，该轴除了可以进行自身旋转，同时与Zi轴进行半固连，伴随Zi轴一同旋转，定义该轴为偏矢轴PS

2) 偏矢角c  偏矢轴PSZi轴(规定逆时针为正方向)旋转到Xi轴时所转过的角度定义为偏矢角c(0°, 360°)。

3) 偏转角b  1系Z轴在坐标旋转过程中绕着偏矢轴PS(规定逆时针为正方向)旋转到3系Z轴时所转过的角为偏转角b(0°, 360°)。

4) 旋转角a  1系在旋转至3系的过程中，绕惯性转轴(规定逆时针为正方向)旋转过的角度定义为旋转角a(0°, 360°)。

2 三元角变换矩阵

2.1 由末系到初系按先偏后旋方式推导

2.1.1 先偏转

 (1)

q1用旋转矩阵表示为

2.1.2 后旋转

 (2)

 (3)

2.2 由末系到初系按先旋后偏方式进行反向公式推导验证

2.2.1 先旋转

 图 3 末系到初系先旋后偏过程图 Fig. 3 Process diagram of rotation first deflection second from last coordinate system to initial coordinate system
 图 4 末系到初系先旋转过程图 Fig. 4 Process diagram of rotation first from last coordinate system to initial coordinate system

 (4)

q2用旋转矩阵表示为

2.2.2 后偏转

 (5)
 图 5 末系到初系后偏转过程图 Fig. 5 Process diagram of post deflection from last coordinate system to initial coordinate system

q3用旋转矩阵表示为

3 三元角与欧拉角、四元数之间的转换关系 3.1 三元角与欧拉角的转换关系

 (6)

 T22 T21 ψ →0 + 90° →0 - -90° + + ψt + - ψt - + ψt+180° - - ψt-180°

 γt T21 γ + + 90° - + -90° + - ψt - - ψt

3.2 三元角与四元数的转换关系

q=(q0, q1, q2, q3)表示由末系(3系)到初系(1系)旋转四元数，对照式(3)，则三元角与四元数关系为

 (7)

 (8)
4 三元角变换矩阵的应用仿真

 (9)

 图 6 坐标系的三维变换效果图 Fig. 6 Three-dimensional effect graphs of coordinate transformation

 图 7 常值漂移单轴旋转调制效果分析 Fig. 7 Analysis on effect of single-axis rotation modulation with constant drift
 图 8 常值漂移复合旋转调制效果分析 Fig. 8 Analysis on effect of compound rotation modulation with constant drift

5 结论

1) 三元角坐标旋转变换方法，是一种仅需2次转位便可实现空间任意两坐标系旋转变换的通用方法，具有普适性，且与四元数和欧拉角在思维角度与描述方法上具有较大区别，其对坐标旋转变换提供了一种全新的思路。

2) 对较复杂的复合运动过程，用四元数或欧拉角描述时，除直接理解上的困难外，在运动的数学表达上也会极为复杂。三元角本身就是从偏转和旋转的角度出发进行表示的，故对复合运动的描述会更加方便、更易理解，且根据方法需要，定义了偏矢轴、偏矢角、偏转角和旋转角等全新概念，体现了一种区别于四元数和欧拉角的新的坐标变换思路和视角。

3) 三元角在转位次数及参数上，相对于四元数和欧拉角，具有较明显优势：三元角转位次数(2次)比欧拉角(3次)少，且避免了欧拉角因要按固定3次转位而造成的万象节锁现象；维数上，三元角(三维)比四元数(四维)少，且和欧拉角(三维)比也没有额外增加。此外，三元角和欧拉角参数表示的都是角度，故相较于四元数，受参数浮点数舍入误差累计的影响较小。

4) 三元角坐标旋转变换方法对IMU旋转调制技术的研究提供了新的思路和数学手段。可在此基础上，借助三元角进一步研究IMU的复合旋转调制技术。

 [1] DIEBEL J. Representing attitude:Euler angles, unit quaternions, and rotation vectors[J]. Matrix, 2006, 58 (15-16): 1–35. [2] 余杨, 张洪钺. 圆锥运动及其影响的3种描述方法[J]. 北京航空航天大学学报, 2008, 34 (8): 956–960. YU Y, ZHANG H Y. Three description of coning motion and its influence[J]. Journal of Beijing University of Aeronautics and Astronautics, 2008, 34 (8): 956–960. (in Chinese) [3] 尹剑, 陈红, 杨萌, 等. 捷联姿态计算中方向余弦与四元数法分析比较[J]. 四川兵工学报, 2015, 36 (9): 106–110. YIN J, CHEN H, YANG M, et al. Analysis and comparison of direction cosine matrix and quaternion methods for strapdown inertial navigation attitude algorithm[J]. Journal of Sichuan Ordnance, 2015, 36 (9): 106–110. (in Chinese) [4] HUANG Z, LI Y W, GAO F. The expression of the orientation of a spatial moving unit by Euler angle[J]. Journal of Yanshan University, 2002, 26 (3): 189–192. [5] 李跃军, 阎超. 飞行器姿态角解算的全角度双欧法[J]. 北京航空航天大学学报, 2007, 33 (5): 505–508. LI Y J, YAN C. Improvement of dual-Euler method for full scale Eulerian angles solution of aircraft[J]. Journal of Beijing University of Aeronautics and Astronautics, 2007, 33 (5): 505–508. (in Chinese) [6] 刘俊峰. 三维转动的四元数表述[J]. 大学物理, 2004, 23 (4): 39–43. LIU J F. Three dimensional rotation represented by quaternion[J]. College Physics, 2004, 23 (4): 39–43. (in Chinese) [7] 邢燕. 四元数及其在图形图像处理中的应用研究[D]. 合肥: 合肥工业大学, 2009: 1-8. XING Y.Research on quaternion and its applications in graphics and image processing[D].Hefei:Hefei University of Technology, 2009:1-8(in Chinese). http://cdmd.cnki.com.cn/article/cdmd-10359-2010036953.htm [8] 封文春, 林贵平. 四元数在弹射座椅性能仿真中的应用[J]. 北京航空航天大学学报, 2006, 32 (8): 881–884. FENG W C, LIN G P. Application of quaternion in ejection seat performance simulation[J]. Journal of Beijing University of Aeronautics and Astronautics, 2006, 32 (8): 881–884. (in Chinese) [9] ZHANG R H, JIA H G, CHEN T, et al. Attitude solution for strapdown inertial navigation system based on quaternion algorithm[J]. Optics and Precision Engineering, 2008, 16 (10): 1963–1970. [10] 袁赣南, 张涛. 四元数UKF超紧密组合导航滤波方法[J]. 北京航空航天大学学报, 2010, 36 (7): 762–766. YUAN G N, ZHANG T. Quaternion unscented Kalman filtering for ultra-tight integration[J]. Journal of Beijing University of Aeronautics and Astronautics, 2010, 36 (7): 762–766. (in Chinese) [11] XIA X, JING W, LI C, et al. Time-shared scheme design for attitude control system during space separation[J]. Aerospace Science and Technology, 2011, 15 (2): 108–116. DOI:10.1016/j.ast.2010.06.005 [12] VASS G. Avoiding gimbal lock[J]. Computer Graphics World, 2009, 32 (6): 10–11. [13] 赵庆涛, 邢建平, 王康, 等. 基于体感识别的人形机器人姿态控制策略研究[J]. 互联网天地, 2016, 13 (5): 14–24. ZHAO Q T, XING J P, WANG K, et al. Research on humanoid robot posture control strategy based on somatosensory recognition[J]. China Internet, 2016, 13 (5): 14–24. (in Chinese) [14] 刘建洲. 四元数体上的矩阵及其优化理论[J]. 数学学报, 1992, 35 (6): 831–838. LIU J Z. Matrix and its optimization theory on quaternion[J]. Acta Mathematica Sinica, 1992, 35 (6): 831–838. (in Chinese) [15] SCHMIDT J, NIEMANN H.Using quaternions for parametrizing 3-d rotations in unconstrained nonlinear optimization[C]//Proceedings of the Vision Modeling and Visualization Conference, VMV.[S.l.]:Aka Gmbh, 2001:399-406. [16] 徐烨烽, 吕妍红, 仇海涛. 基于MEMS器件的旋转调制式航姿参考系统设计[J]. 北京航空航天大学学报, 2010, 36 (11): 1343–1347. XU Y F, LV Y H, QIU H T. Design of rotation modulation on AHRS based on MEMS sensor[J]. Journal of Beijing University of Aeronautics and Astronautics, 2010, 36 (11): 1343–1347. (in Chinese) [17] 赵晓伟, 李江, 党宁, 等. 基于单轴连续旋转调制的方位对准技术[J]. 导弹与航天运载技术, 2016 (1): 26–30. ZHAO X W, LI J, DANG N, et al. Research on azimuth alignment technology based on the single axis continuous rotation modulation[J]. Missiles and Space Vehicles, 2016 (1): 26–30. (in Chinese) [18] 蔡山波. 双轴旋转捷联惯导系统旋转控制算法研究[D]. 北京: 北京理工大学, 2016. CAI S B.Control algorithm of dual-axis rotation SINS framework[D].Beijing:Beijing Institute of Technology, 2016(in Chinese). http://cdmd.cnki.com.cn/Article/CDMD-10007-1016717719.htm

#### 文章信息

MIAO Jisong, SHAO Qiongling, REN Yuan

Coordinate rotation transformation method based on ternary angle

Journal of Beijing University of Aeronautics and Astronsutics, 2017, 43(12): 2539-2546
http://dx.doi.org/10.13700/j.bh.1001-5965.2016.0882