温馨提示:本专栏内容用于回顾梳理,相较教材有所简化。本节涉及坐标系和坐标转换。
1 坐标系、坐标转换
1.1 常用坐标系
1)地面坐标系(goe):
通常取起飞点;
通常取正北或航向;
铅锤向下。
不考虑地球自转,惯性系。飞机三维坐标和速度在此坐标系下描述。
2)体轴系/机体坐标系(body):
取飞行器质心;
在飞行器对称平面内,平行于机身轴线,向前为正;
在飞行器对称平面内,垂直于
,向下为正;
垂直于对称平面,向右为正。注:苏系和美系坐标系不同,此处为美系,飞机常用美系,火箭常用苏系。
非惯性系。
3)风轴系/气流坐标系(air):
取飞行器质心;
指向空速方向;
在飞行器对称平面内,垂直于
,向下为正;
垂直于
,向右为正。
非惯性系。
4)航迹坐标系:
取飞行器质心;
指向地速方向;
在包含
的铅锤平面内,垂直于
,向下为正;
垂直于
,向右为正。
非惯性系。与火箭的弹道坐标系平行,轴的定义和正负稍有区别
当且仅当风速时,
和
方向一致。
1.2 坐标系转换
基元变换矩阵:
% matlab function
% edit by James D in 202300901
% example:
% X_old = [1 0 0]'; % 3x1 vector
% RM = RotationMatrix_user(45,2); % 1:x 2:y 3:z
% X_new = RM*X_old; % 3x1 vector
function RM = RotationMatrix_user( RotationAngle_deg,Axes)
% input:
% RotationAngle_deg: Rotation Angle in degree.
% Axes: 1:x 2:y 3:z
% output:
% RM:3x3matix.
cos_RA = cosd(RotationAngle_deg);
sin_RA = sind(RotationAngle_deg);
switch Axes
case 1 % Rotate around the x axis
RM=[ 1,0,0; 0,cos_RA,sin_RA; 0,-sin_RA,cos_RA];
case 2 % Rotate around the y axis
RM=[cos_RA,0,-sin_RA; 0,1,0; sin_RA,0,cos_RA];
case 3 % Rotate around the z axis
RM=[cos_RA,sin_RA,0; -sin_RA,cos_RA,0; 0,0,1];
end
end
原坐标系下坐标,旋转后坐标系下坐标
。
假设按照213顺序(y-x-z)旋转。则:
因正交变换,有:
1)地面系到体轴系,3-2-1旋转
姿态角/欧拉角:
偏航角(yaw ):
与 机体轴
在水平面
上投影的夹角,右偏航为正(坐标系旋转方向为
正向)。
俯仰角(pitch):机体轴
在水平面
上投影 与 机体轴
的夹角,右偏航为正(坐标系旋转方向为
正向)。
滚转角(roll):包含机体轴
的铅锤平面 与 飞机对称平面的夹角,右滚转为正(坐标系旋转方向为
正向)。
%% goe2body
% matlab
[phi_d,theta_d,psi_d] = deal(3,5,10);
cos_phi = cosd(phi_d);
sin_phi = sind(phi_d);
cos_theta = cosd(theta_d);
sin_theta = sind(theta_d);
cos_psi = cosd(psi_d);
sin_psi = sind(psi_d);
% body2goe
RM_bg = [ cos_theta*cos_psi, cos_theta*sin_psi, -sin_theta;
sin_phi*sin_theta*cos_psi-cos_phi*sin_psi, sin_phi*sin_theta*sin_psi+cos_phi*cos_psi, sin_phi*cos_theta;
cos_phi*sin_theta*cos_psi+sin_phi*sin_psi, cos_phi*sin_theta*sin_psi-sin_phi*cos_psi, cos_phi*cos_theta;];
RM_bg = RotationMatrix_user(phi_d,1)...
*RotationMatrix_user(theta_d,2)...
*RotationMatrix_user(psi_d,3);
2)体轴系到风轴系
,2-3旋转
攻角(angle of attack):飞行器空速矢量
在飞机对称平面投影 与 机体轴
的夹角,空速投影在
下方为正(坐标系旋转方向为
负向)。
侧滑角(angle of sideslip):飞行器空速矢量
与 飞机对称平面的夹角,空速在对称面右侧为正(坐标系旋转方向为
正向)。
%% body2air
% matlab
[alpha_d,beta_d] = deal(5,3);
cos_alpha = cosd(alpha_d);
sin_alpha = sind(alpha_d);
cos_beta = cosd(beta_d);
sin_beta = sind(beta_d);
% body2air
RM_ab = [ cos_alpha*cos_beta, sin_beta, sin_alpha*cos_beta;
-cos_alpha*sin_beta, cos_beta, -sin_alpha*sin_beta;
-sin_alpha, 0, cos_alpha;];
RM_ab = RotationMatrix_user(beta_d,3)...
*RotationMatrix_user(-alpha_d,2);
3)地面系到航迹坐标系
,3-2旋转
航迹(轨迹)偏角/航向角:
(通常为正北) 与
(地速方向)在水平面
投影的夹角,航迹右偏为正(坐标系旋转方向为
正向)。
航迹(轨迹)倾角/爬升角:
(地速方向)与 水平面
的夹角,航迹向上为正(坐标系旋转方向为
正向)。
%% goe2k
% matlab
[chi_d,gamma_d] = deal(5,3);
cos_chi = cosd(chi_d);
sin_chi = sind(chi_d);
cos_gamma = cosd(gamma_d);
sin_gamma = sind(gamma_d);
% body2air
RM_kg = [ cos_gamma*cos_chi, cos_gamma*sin_chi, -sin_gamma;
-sin_chi, cos_chi, 0;
sin_gamma*cos_chi, sin_gamma*sin_chi, cos_gamma;];
RM_kg = RotationMatrix_user(gamma_d,2)...
*RotationMatrix_user(chi_d,3);
注意:上面定义来自于《无人机自主控制系统理论与方法》,书中将航迹(轨迹)偏角与航向角当成同一角度,笔者不太建议用此定义。在某些地方,会同时使用航向角、航迹角、偏航角。给出一种定义如下:
航向角:体轴在水平面投影与
(取正北)的夹角,投影在右侧为正,范围
航迹角:(地速方向)在水平面投影与
(取正北)的夹角,投影在右侧为正,范围
偏航角:体轴在水平面投影与
(取当前航线方向)的夹角,投影在右侧为正,范围
参考:
吴森堂.飞行控制系统[M].北京航空航天大学出版社,2013.
陈宗基,周锐,张平编著.无人机自主控制系统理论与方法[M].上海:上海交通大学出版社,2021