# Research on Attitude Measurement Method of Special Aircraft Using Geomagnetic Sensor/Gyroscope Based on UKF

Authors: Zhang Ping-an; Wang Wei; Gao Min; Wang Yi
Journal: International Journal of Aerospace Engineering
 (2021)

---

## Abstract

Based on the output information of the three-axis geomagnetic sensor and three-axis gyroscope, a mathematical model for measuring the flight attitude information of special aircraft is established, and the flight attitude of the special aircraft is calculated in real time. To improve the accuracy of calculating the flight attitude of the special aircraft, the model of the pitch and yaw angles based on the Unscented Kalman filter (UKF) is established by using the output expression of the gyroscope and geomagnetic sensorx-axis, and then the pitch angle and yaw angle obtained by filtering are brought into the geomagnetic sensor to calculate the roll angle of special aircraft in real time. The simulation results show that compared with the direct calculation of the special aircraft flight attitude angle, the combination of a geomagnetic sensor and gyroscope is more accurate after UKF processing, which verifies the effectiveness and feasibility of the attitude calculation method, and improves the accuracy of flight attitude measurement for special aircraft.


---

## Body

## 1. Introduction

With the rapid development of precise flight requirements, the demand for flight path correction and navigation control technology of special aircraft is higher and higher. The position, velocity, and attitude angle information of a special aircraft need to be determined when necessary to perform trajectory correction and guidance control functions [1]. Attitude angle information includes pitch angle, yaw angle, and roll angle. Roll angle is the most significant and essential information among attitude variables. According to the special aircraft’s roll angle, the actuator’s space position can be determined, realizing the real-time correction and guidance control operation of the actuator. Therefore, the special aircraft’s flight attitude measurement technology is one of the key technologies to realize flight trajectory correction control [2–4].At present, the commonly used attitude measurement methods for aircraft are the inertial navigation system measurement, gyroscope and satellite combined measurement, geomagnetic and satellite combined measurement, and solar orientation sensor method. Special aircraft are launched and take off employing special launching devices. In the flight process, the aircraft will be subject to high overload, accompanied by severe vibration and high-speed spin, so the traditional measurement methods are challenging to meet the measurement requirements. The geomagnetic sensor has the characteristics of high reliability, stable performance, strong anti-impact, and antioverload ability [3, 5]. At the same time, with the continuous improvement of the geomagnetic field theory, the geomagnetic sensor has become the research hotspot of attitude measurement technology. At present, the research on attitude measurement of special aircraft is more mature, such as the combination of the geomagnetic sensor and satellite measurement system and the combined measurement system of the geomagnetic sensor and gyroscope. The attitude angle measured by the integrated measurement system of the geomagnetic sensor and satellite is the trajectory inclination angle, trajectory deflection angle, and roll angle obtained by both. Still, it is necessary to correct the flight path of the aircraft. It is the shaft inclination angle, the shaft deflection angle, and the roll angle obtained by both. Zhang et al. [6] of Northwest Institute of Mechanical and Electrical Engineering research in China and other scholars have known and verified through experiment that there is a particular departure between the trajectory angle and the special aircraft axis angle, and the law of the deviation is related to the special aircraft flight environment, so it is difficult to summarize the law. Also, the geomagnetic and satellite integrated system will be affected by the magnetic measurement blind area. Dandan et al. [7] and other scholars proposed some compensation methods for the magnetic measurement blind area. Still, the compensation method did not eliminate the influence of the magnetic measurement blind area on attitude measurement. However, the gyroscope can calculate the axis deflection angle and the shaft inclination angle. Simultaneously, in the magnetic measurement blind area, the gyroscope can replace the geomagnetic sensor to measure the aircraft roll angle. Therefore, this paper puts forward a method to measure flight attitude of special aircraft by the combination of geomagnetism and gyroscope.For the research of flight attitude measurement based on the combination of three-axis geomagnetic sensor and gyroscope, Aitian et al. [8] proposed a method of three-axis geomagnetic sensor and MEMS gyroscope for rocket flying attitude. By comparing the yaw angle and pitch angle measured by the gyroscope into the attitude determination model of the geomagnetic sensor, we drew the conclusion that the error of the yaw angle measured by the gyroscope and the pitch and roll angle measured by the geomagnetic sensor was small. Still, the principle of numerical integration was adopted in gyro angle measurement. There is a significant drift. Ya-qi et al. [9] and Xiaoming et al. [10] proposed a method to measure missile attitude based on an extended Kalman filter (EKF) gyroscope and geomagnetic sensor. He used EKF to linearize the nonlinear model to improve the accuracy and stability of the system. However, their calculation process was complicated, and the matching trajectory adopted by Ya-qi et al. was different from the real revolution. In Xiaoming et al.’s algorithm, only the first order of the Taylor expansion is carried out, which quickly leads to filter divergence. UKF is used in gyroscope and geomagnetic integrated measurement systems, most of which are used in the aerospace field to measure the attitude of spacecraft in space [11, 12]. Through the above scheme, this paper proposes an algorithm based on an Unscented Kalman filter to estimate the attitude of the special aircraft. The pitch angle and yaw angle of the special aircraft are measured by using the three-axis gyroscope. Simultaneously, the Xc axis of the three-axis geomagnetic sensor is used to measure the sensitive axis’s geomagnetic component. The functional relationship between the geomagnetic part and the pitch angle and yaw angle is obtained. UKF estimates the pitch angle and yaw angle of the special aircraft, and the pitch angle and yaw angle are obtained with high accuracy. The roll angle of the special aircraft is obtained by introducing the geomagnetic sensor. Thus, we can obtain the flight attitude angle of the aircraft with high accuracy.


## 2. Establish a Mathematical Model

### 2.1. Two Installation Methods of Sensors

It is assumed that the special aircraft’s gravity center is on the axis, and the Xd axis of the aircraft coordinate system is located along the axis. As shown in Figure1, the Xc axis of the geomagnetic sensor coincides with the special aircraft axis and the other two axes are, respectively, positioned along the Yd axis and Zd axis of the aircraft coordinate system. The gyroscope is placed at the front end of the geomagnetic sensor. The three sensitive axes are parallel to the three axes of the geomagnetic sensor. The installation positions of the geomagnetic sensor and the gyro are on the axis.Figure 1
Installation method of sensors.In the figure, oXYZ represents the special aircraft coordinate system, oXcYcZc represents the geomagnetic sensor coordinate system and its three axes represent the three sensitive axes corresponding to the sensor, and o1XtYtZt represents the gyroscope coordinate system. Its three axes, respectively, represent the three sensitive axes of the gyroscope. In measuring the flying attitude of aircraft, the North-Up-East coordinate system is usually selected as the coordinate navigation system. N, S, and E are used to represent the north axis, celestial axis, and east axis of the coordinate system, respectively.


### 2.2. Attitude Determination Model of a Gyroscope

A special aircraft’s attitude in flight can be expressed by its pitch angle, yaw angle, and roll angle in the North-Up-East coordinate system. The pitch angle is the angle between the special aircraft axis and the horizontal plane, the yaw angle is the angle between the special aircraft axis projected on the horizontal plane and the north axis, and the roll angle is the rotation angle of the special aircraft around its special aircraft axis (the positive and negative of the three attitude angles are subject to the right-hand rule). The special aircraft’s attitude in the North-Up-East coordinate system during flight can be obtained as the transformation mode in Figure2.Figure 2
Coordinate system transformation mode.In the above figure, firstly, the special aircraft’s coordinate system is completely coincident with the North-Up-East coordinate system. The angleβ is rotated around the y-axis. The angle α is rotated around the z-axis. Finally, the angle γ is rotated around the x-axis to obtain the special aircraft’s flight attitude in the North-Up-East coordinate system.The three axes of the gyroscope can measure three angular velocities of special aircraft in flight, represented byωx, ωy, and ωz (the positive and negative of the three angular velocities obey the right-hand rule). Among them, ωx is the angular velocity of the y-axis and z-axis rotating around the x-axis, ωy is the angular velocity of the x-axis and z-axis rotating around the y-axis, and ωz is the angular velocity of the x-axis and y-axis rotating around the z-axis. The following formula can transform the angular momentum measured by the gyroscope and the attitude angular velocity of the aircraft in the North-Up-East coordinate system:
(1)γ̇α̇β̇=1−tanαcosγtanαsinγ0cosγcosα−sinγcosα0sinγcosγωxωyωz.They are pitch angular velocity, yaw angular velocity, and roll angle velocity of the aircraft. Through the above formula, the mathematical expressions of three attitude angular velocities can be obtained as follows:(2)α̇=ωycosγcosα−ωzsinγcosα,β̇=ωysinγ+ωzcosγ,γ̇=ωx−ωytanαcosγ+ωztanαsinγ.The pitch angle, yaw angle, and roll angle can be obtained by numerical integration of the pitch angular velocity, yaw angle velocity, and roll angular velocity, respectively. The mathematical model is expressed as(3)αt=αt−1+∫t−1tωyt−1cosγt−1cosαt−1−ωzt−1sinγt−1cosαt−1dt,βt=βt−1+∫t−1tωyt−1sinγt−1+ωzt−1cosγt−1dt,γt=γt−1+∫t−1tωxt−1−ωyt−1tanαt−1cosγt−1+ωzt−1tanαt−1sinγt−1dt.


### 2.3. Geomagnetic Attitude Determination Model

As the earth’s necessary energy field, the geomagnetic field is an essential inherent resource on the earth. The geomagnetic intensity at any point on the earth’s surface is determined by the geomagnetic elements, which provides a useful reference for geomagnetic navigation. When the flight distance of the aircraft is less than 30 km, the geomagnetic field intensity and direction of the launch point and landing point do not change much, so the geomagnetic intensity and direction of the launch point are selected to approximately replace the magnetic field intensity and direction in the flight process. According to the longitude, dimension, and height of the launch position, the magnetic inclination angle and magnetic declination angle of the geomagnetic vector in the North-Up-East coordinate system can be calculated by using the world geomagnetic field model, and then the component of the geomagnetic vector in the three axes of the North-Up-East coordinate system is obtained, which is expressed byBN, BS, and BE, as follows:
(4)BNBSBE=BcosDcosIBsinI−BsinDcosI.In the above formula,B is the strength of the geomagnetic field, I and D are the dip angle and declination angle, respectively. The magnetic inclination angle is positive above the horizontal plane, and the magnetic declination angle is positive on the left side of the north axis. Referring to the coordinate system transformation in the previous section, the azimuth of the geomagnetic sensor coordinate system relative to the North-Up-East coordinate system during the flight of special aircraft can be expressed as follows:
(5)XcYcZc=cosαcosβsinα−cosαsinβ−sinαcosβcosγ+sinβsinγcosαcosγsinαsinβcosγ+cosβsinγsinαcosβsinγ+sinβcosγ−cosαsinγ−sinαsinβsinγ+cosβcosγNSE.The component of the geomagnetic vector on the three axes of the geomagnetic sensor can be obtained from the above formula. The mathematical model is expressed as follows:(6)Bxc=BcosIcosαcosD−β+BsinIsinα,(7)Byc=−BcosIsinαcosγcosD−β−BcosIsinγsinD−β+BsinIcosαcosγ,(8)Bzc=BcosIsinαsinγcosD−β−BcosIcosγsinD−β−BsinIcosαsinγ.The component of the geomagnetic vector on the sensitive axis can be measured by the three axes of the geomagnetic sensor. The ratio ofBxc to B in formula (6) can be used to analyze whether the special aircraft is in the blind area of the geomagnetic sensor. The relationship between roll angle, pitch angle, and yaw angle can be obtained by formulas (7) and (8) as follows:
(9)tanγ=BzctanIcosα−sinαcosD−β+BycsinD−βByc−tanIcosα+sinαcosD−β+BzcsinD−β.


## 2.1. Two Installation Methods of Sensors

It is assumed that the special aircraft’s gravity center is on the axis, and the Xd axis of the aircraft coordinate system is located along the axis. As shown in Figure1, the Xc axis of the geomagnetic sensor coincides with the special aircraft axis and the other two axes are, respectively, positioned along the Yd axis and Zd axis of the aircraft coordinate system. The gyroscope is placed at the front end of the geomagnetic sensor. The three sensitive axes are parallel to the three axes of the geomagnetic sensor. The installation positions of the geomagnetic sensor and the gyro are on the axis.Figure 1
Installation method of sensors.In the figure, oXYZ represents the special aircraft coordinate system, oXcYcZc represents the geomagnetic sensor coordinate system and its three axes represent the three sensitive axes corresponding to the sensor, and o1XtYtZt represents the gyroscope coordinate system. Its three axes, respectively, represent the three sensitive axes of the gyroscope. In measuring the flying attitude of aircraft, the North-Up-East coordinate system is usually selected as the coordinate navigation system. N, S, and E are used to represent the north axis, celestial axis, and east axis of the coordinate system, respectively.


## 2.2. Attitude Determination Model of a Gyroscope

A special aircraft’s attitude in flight can be expressed by its pitch angle, yaw angle, and roll angle in the North-Up-East coordinate system. The pitch angle is the angle between the special aircraft axis and the horizontal plane, the yaw angle is the angle between the special aircraft axis projected on the horizontal plane and the north axis, and the roll angle is the rotation angle of the special aircraft around its special aircraft axis (the positive and negative of the three attitude angles are subject to the right-hand rule). The special aircraft’s attitude in the North-Up-East coordinate system during flight can be obtained as the transformation mode in Figure2.Figure 2
Coordinate system transformation mode.In the above figure, firstly, the special aircraft’s coordinate system is completely coincident with the North-Up-East coordinate system. The angleβ is rotated around the y-axis. The angle α is rotated around the z-axis. Finally, the angle γ is rotated around the x-axis to obtain the special aircraft’s flight attitude in the North-Up-East coordinate system.The three axes of the gyroscope can measure three angular velocities of special aircraft in flight, represented byωx, ωy, and ωz (the positive and negative of the three angular velocities obey the right-hand rule). Among them, ωx is the angular velocity of the y-axis and z-axis rotating around the x-axis, ωy is the angular velocity of the x-axis and z-axis rotating around the y-axis, and ωz is the angular velocity of the x-axis and y-axis rotating around the z-axis. The following formula can transform the angular momentum measured by the gyroscope and the attitude angular velocity of the aircraft in the North-Up-East coordinate system:
(1)γ̇α̇β̇=1−tanαcosγtanαsinγ0cosγcosα−sinγcosα0sinγcosγωxωyωz.They are pitch angular velocity, yaw angular velocity, and roll angle velocity of the aircraft. Through the above formula, the mathematical expressions of three attitude angular velocities can be obtained as follows:(2)α̇=ωycosγcosα−ωzsinγcosα,β̇=ωysinγ+ωzcosγ,γ̇=ωx−ωytanαcosγ+ωztanαsinγ.The pitch angle, yaw angle, and roll angle can be obtained by numerical integration of the pitch angular velocity, yaw angle velocity, and roll angular velocity, respectively. The mathematical model is expressed as(3)αt=αt−1+∫t−1tωyt−1cosγt−1cosαt−1−ωzt−1sinγt−1cosαt−1dt,βt=βt−1+∫t−1tωyt−1sinγt−1+ωzt−1cosγt−1dt,γt=γt−1+∫t−1tωxt−1−ωyt−1tanαt−1cosγt−1+ωzt−1tanαt−1sinγt−1dt.


## 2.3. Geomagnetic Attitude Determination Model

As the earth’s necessary energy field, the geomagnetic field is an essential inherent resource on the earth. The geomagnetic intensity at any point on the earth’s surface is determined by the geomagnetic elements, which provides a useful reference for geomagnetic navigation. When the flight distance of the aircraft is less than 30 km, the geomagnetic field intensity and direction of the launch point and landing point do not change much, so the geomagnetic intensity and direction of the launch point are selected to approximately replace the magnetic field intensity and direction in the flight process. According to the longitude, dimension, and height of the launch position, the magnetic inclination angle and magnetic declination angle of the geomagnetic vector in the North-Up-East coordinate system can be calculated by using the world geomagnetic field model, and then the component of the geomagnetic vector in the three axes of the North-Up-East coordinate system is obtained, which is expressed byBN, BS, and BE, as follows:
(4)BNBSBE=BcosDcosIBsinI−BsinDcosI.In the above formula,B is the strength of the geomagnetic field, I and D are the dip angle and declination angle, respectively. The magnetic inclination angle is positive above the horizontal plane, and the magnetic declination angle is positive on the left side of the north axis. Referring to the coordinate system transformation in the previous section, the azimuth of the geomagnetic sensor coordinate system relative to the North-Up-East coordinate system during the flight of special aircraft can be expressed as follows:
(5)XcYcZc=cosαcosβsinα−cosαsinβ−sinαcosβcosγ+sinβsinγcosαcosγsinαsinβcosγ+cosβsinγsinαcosβsinγ+sinβcosγ−cosαsinγ−sinαsinβsinγ+cosβcosγNSE.The component of the geomagnetic vector on the three axes of the geomagnetic sensor can be obtained from the above formula. The mathematical model is expressed as follows:(6)Bxc=BcosIcosαcosD−β+BsinIsinα,(7)Byc=−BcosIsinαcosγcosD−β−BcosIsinγsinD−β+BsinIcosαcosγ,(8)Bzc=BcosIsinαsinγcosD−β−BcosIcosγsinD−β−BsinIcosαsinγ.The component of the geomagnetic vector on the sensitive axis can be measured by the three axes of the geomagnetic sensor. The ratio ofBxc to B in formula (6) can be used to analyze whether the special aircraft is in the blind area of the geomagnetic sensor. The relationship between roll angle, pitch angle, and yaw angle can be obtained by formulas (7) and (8) as follows:
(9)tanγ=BzctanIcosα−sinαcosD−β+BycsinD−βByc−tanIcosα+sinαcosD−β+BzcsinD−β.


## 3. Filter Design

### 3.1. UKF Algorithm

In integrated navigation, Kalman filter (KF), extended Kalman filter (EKF), and Unscented Kalman filter (UKF) are commonly used for optimal attitude estimation of aircraft. Kalman filter can only be applied to a linear system, but in integrated navigation, the state model and observation model are often nonlinear systems, so the application range of KF is limited. For nonlinear systems, EKF is often used in past filtering algorithms. EKF approximates the nonlinear model to a linear model by the first- or second-order expansion of the Taylor series and then uses KF for linear filtering. However, EKF has apparent defects. Firstly, the higher-order term is ignored in Taylor expansion, which inevitably leads to the filter divergence. Secondly, the Jacobian matrix and Hessian matrix are involved in linearization, which has a large amount of calculation and is prone to errors. So far, there are many improved methods of EKF, such as the iterative extended Kalman filter (EIEKF) [13] and improved extended Kalman filter (NIEKF) [14], which cannot effectively solve the defects of EKF.British scientist Julier and Uhlmann [15] proposed a UKF algorithm at the end of the last century, making up for the defects in EKF. Unscented transformation (UT) is used in UKF. Based on ensuring the mean and covariance, the linear transformation is applied to each sigma point based on ensuring the mean and covariance by selecting a set of sigma points After calculating the weight of each point, the transformed mean and covariance can be approximately obtained. Since the approximation accuracy of the UT transform can reach the second order or an even higher order of EKF, the estimation accuracy of UKF is higher than that of EKF [16].


### 3.2. Application of UKF in Attitude Measurement

In the geomagnetic/gyroscope attitude measurement system, the high spin of special aircraft exceeds the measurement range of the gyroscope roll angle speed, so the three-axis gyroscope only needsy-axis and z-axis in practical work. In this paper, we choose the calculation formula of the gyroscope for the pitch angle and yaw angle as the state model. The x-axis output equation of the geomagnetic sensor is the observation equation to estimate the pitch angle and yaw angle of special aircraft. The flow chart of the Unscented Kalman filter is shown in Figure 3.Figure 3
Filtering process.Since the UKF algorithm is suitable for discrete models and the sampling interval is small, it is necessary to discretize the state model and the observation model concerning the sampling time. In the state model, the pitch angle and yaw angle are calculated by numerical integration. Therefore, assuming that the special aircraft’s angular velocity change in the sampling time is uniform, a state model like formula (10) can be obtained.
(10)αtβt=αt−1βt−1+Δt00Δtα̇t−1β̇t−1+Wt−1.In the above formula,Δt is the sampling interval and W is the white Gaussian noise in the state model. Let Xt=αtβtT, and then the above formula can be rewritten as follows:
(11)Xt=Xt−1+TẊt−1+Wt−1.In the observation model, since the geomagnetic component of the Xc axis of the geomagnetic sensor has a nonlinear function relationship with pitch angle and yaw angle, the observation model can be written as follows:(12)Zt=HXt+Vt,whereZt is the magnitude of the geomagnetic component measured by the Xc axis of the current geomagnetic sensor and Vt is the white Gaussian noise in the measurement process of the geomagnetic sensor. The specific steps to calculate the estimated value in the UKF algorithm are as follows:
(1)
Select initial value:(13)x^0=Ex0,P0=Ex0−x^0x0−x∧0T.(2)
Calculate sigma point(14)χk−1=x^k−1,x^k−1+γPk−1,x^k−1−γPk−1,whereγ is the scale factor, the expression is γ=n+λ, n is the number of sampling points, and λ is also the scale factor. The calculation formula isλ=α2n+κ−n; α determines the distribution state of sigma points around the estimated value of X and generally takes a small value. The value of κ is related to the number of state variables.
(3)
Time renewal equation:(15)χkk−1=χk−1+Tẋk−1,x^k−=∑i=02nWimχi,kk−1,Pk−=∑i=02nWicχi,kk−1−x^kχi,kk−1−x∧kT+Q,Zkk−1=Hχkk−1,Z^k−=∑i=02nWimZi,kk−1.(4)
Measurement renewal equation:(16)PZkZk=∑i=02nWicZi,kk−1−Z^k−Zi,kk−1−Z∧k−T+Q,PxkZk=∑i=02nWicχi,kk−1−x^k−Zi,kk−1−Z∧k−T+Q,Kk=PxkZkPZkZk−1,x^k=x^k−+KkZk−Z^k−,Pk=Pk−−KkPZkZkKkT,whereWi is the weight, and the formula is
(17)W0m=λn+λ,W0c=λn+λ+1+β−α2,β=2,Wim=Wic=12n+λ.


## 3.1. UKF Algorithm

In integrated navigation, Kalman filter (KF), extended Kalman filter (EKF), and Unscented Kalman filter (UKF) are commonly used for optimal attitude estimation of aircraft. Kalman filter can only be applied to a linear system, but in integrated navigation, the state model and observation model are often nonlinear systems, so the application range of KF is limited. For nonlinear systems, EKF is often used in past filtering algorithms. EKF approximates the nonlinear model to a linear model by the first- or second-order expansion of the Taylor series and then uses KF for linear filtering. However, EKF has apparent defects. Firstly, the higher-order term is ignored in Taylor expansion, which inevitably leads to the filter divergence. Secondly, the Jacobian matrix and Hessian matrix are involved in linearization, which has a large amount of calculation and is prone to errors. So far, there are many improved methods of EKF, such as the iterative extended Kalman filter (EIEKF) [13] and improved extended Kalman filter (NIEKF) [14], which cannot effectively solve the defects of EKF.British scientist Julier and Uhlmann [15] proposed a UKF algorithm at the end of the last century, making up for the defects in EKF. Unscented transformation (UT) is used in UKF. Based on ensuring the mean and covariance, the linear transformation is applied to each sigma point based on ensuring the mean and covariance by selecting a set of sigma points After calculating the weight of each point, the transformed mean and covariance can be approximately obtained. Since the approximation accuracy of the UT transform can reach the second order or an even higher order of EKF, the estimation accuracy of UKF is higher than that of EKF [16].


## 3.2. Application of UKF in Attitude Measurement

In the geomagnetic/gyroscope attitude measurement system, the high spin of special aircraft exceeds the measurement range of the gyroscope roll angle speed, so the three-axis gyroscope only needsy-axis and z-axis in practical work. In this paper, we choose the calculation formula of the gyroscope for the pitch angle and yaw angle as the state model. The x-axis output equation of the geomagnetic sensor is the observation equation to estimate the pitch angle and yaw angle of special aircraft. The flow chart of the Unscented Kalman filter is shown in Figure 3.Figure 3
Filtering process.Since the UKF algorithm is suitable for discrete models and the sampling interval is small, it is necessary to discretize the state model and the observation model concerning the sampling time. In the state model, the pitch angle and yaw angle are calculated by numerical integration. Therefore, assuming that the special aircraft’s angular velocity change in the sampling time is uniform, a state model like formula (10) can be obtained.
(10)αtβt=αt−1βt−1+Δt00Δtα̇t−1β̇t−1+Wt−1.In the above formula,Δt is the sampling interval and W is the white Gaussian noise in the state model. Let Xt=αtβtT, and then the above formula can be rewritten as follows:
(11)Xt=Xt−1+TẊt−1+Wt−1.In the observation model, since the geomagnetic component of the Xc axis of the geomagnetic sensor has a nonlinear function relationship with pitch angle and yaw angle, the observation model can be written as follows:(12)Zt=HXt+Vt,whereZt is the magnitude of the geomagnetic component measured by the Xc axis of the current geomagnetic sensor and Vt is the white Gaussian noise in the measurement process of the geomagnetic sensor. The specific steps to calculate the estimated value in the UKF algorithm are as follows:
(1)
Select initial value:(13)x^0=Ex0,P0=Ex0−x^0x0−x∧0T.(2)
Calculate sigma point(14)χk−1=x^k−1,x^k−1+γPk−1,x^k−1−γPk−1,whereγ is the scale factor, the expression is γ=n+λ, n is the number of sampling points, and λ is also the scale factor. The calculation formula isλ=α2n+κ−n; α determines the distribution state of sigma points around the estimated value of X and generally takes a small value. The value of κ is related to the number of state variables.
(3)
Time renewal equation:(15)χkk−1=χk−1+Tẋk−1,x^k−=∑i=02nWimχi,kk−1,Pk−=∑i=02nWicχi,kk−1−x^kχi,kk−1−x∧kT+Q,Zkk−1=Hχkk−1,Z^k−=∑i=02nWimZi,kk−1.(4)
Measurement renewal equation:(16)PZkZk=∑i=02nWicZi,kk−1−Z^k−Zi,kk−1−Z∧k−T+Q,PxkZk=∑i=02nWicχi,kk−1−x^k−Zi,kk−1−Z∧k−T+Q,Kk=PxkZkPZkZk−1,x^k=x^k−+KkZk−Z^k−,Pk=Pk−−KkPZkZkKkT,whereWi is the weight, and the formula is
(17)W0m=λn+λ,W0c=λn+λ+1+β−α2,β=2,Wim=Wic=12n+λ.


## 4. Simulation Experiment and Result Analysis

To verify the effectiveness of the algorithm, this paper takes the actual flight trajectory data of the special aircraft as the theoretical truth value and takes the flight path data into formula (6), adds the Gaussian white noise as the output value of the geomagnetic sensor x-axis, and takes it as the output value of the filter. The test site took place in Chengdu (E30.67°, N104.07°), the geomagnetic intensity is 50986.1 nT, the magnetic dip is -48.17° (the horizontal plane is positive upward), and the magnetic declination is 2.33° (north by the west is positive) according to the world geomagnetic model. Since the special aircraft takes off via the launching device, the aircraft’s initial attitude is the launching attitude. The initial conditions of the simulation experiment are shown in Table 1.Table 1
Initial conditions of a simulation experiment.
Flight time (s)Sampling interval (s)Initial velocity (m/s)Initial pitch angle (°)87.50.189745Initial yaw angle (°)Flight distance (m)The highest position of flight path (m)Initial spin velocity (r/s)027126.49377300Figures4 and 5, respectively, reflect the changes of pitch angle and yaw angle before and after filtering, as well as the real value. Figure 6 selects the pitch angle variation curve before and after filtering when the special aircraft’s flight time is between 30 s and 31 s. Figures 7 and 8, respectively, reflect the error changes of the pitch angle and yaw angle before and after filtering. Comparing the pitch angle and yaw angle change curves before and after filtering, the change curve after UKF is smoother. The accuracy of the pitch angle and yaw angle can be controlled between -0.2° and 0.4°. It can be seen that the systematic error of the pitch angle and yaw angle is significantly reduced after UKF is used to estimate the pitch angle and yaw angle in the flight process of the special aircraft, which effectively suppresses the error accumulation, improves the dynamic performance of the system, and proves the three-axis geomagnetic transmission The feasibility of the combination of the sensor and three-axis gyroscope is discussed.Figure 4
Pitch angle curve before and after filtering.Figure 5
Yaw angle curve before and after filtering.Figure 6
Pitch angle curve of flight time between 30 s and 31 s.Figure 7
Comparison of pitch angle error before and after filtering.
(a)
Before filtering(b)
After filteringFigure 8
Comparison of yaw angle error before and after filtering.
(a)
Before filtering(b)
After filteringFigure9 shows the estimation error of the roll angle. The difference between the roll angle calculated by the geomagnetic sensor and gyroscope and the real rolling angle of special aircraft is used to verify the accuracy of the roll angle calculated by a combination of geomagnetic sensors and gyroscopes. Figure 9(a) shows the curve of the roll angle error calculated by the combination of a nonfiltered geomagnetic sensor and gyroscope. Figure 9(b) shows the roll angle’s error curve calculated by combining the output data of the geomagnetic sensor and gyroscope after UKF processing. Due to the influence of the magnetic measurement blind area, this paper compares the roll angle error of the projectile flying time between 30 s and 40 s as shown in Figure 10. It can be seen from the figure that the roll angle calculation error outside the magnetic measurement blind area can be controlled between 0° and 0.1° which more intuitively reflects that the roll angle accuracy of the combined calculation of the geomagnetic sensor and gyroscope after passing through UKF has been improved.Figure 9
Comparison of roll angle error before and after filtering.
(a)
Before filtering(b)
After filteringFigure 10
Comparison of roll angle error in flight time between 30 s and 40 s.
(a)
Before filtering(b)
After filtering


## 5. Conclusion

In this paper, based on the three-axis geomagnetic sensor and three-axis gyroscope measurement information, a mathematical model for measuring special aircraft flight attitude by combining a geomagnetic sensor and gyroscope is established which can effectively solve the flight attitude of special aircraft. According to the gyroscope and geomagnetic sensor’s output expression, this paper proposes using UKF to estimate the pitch and yaw angles of a special aircraft in-flight process and get the more accurate pitch angle and yaw angle. Then, the roll angle is calculated by the geomagnetic sensor. Finally, the simulation model is established by using the real flight trajectory data and MATLAB to verify the feasibility and feasibility of the attitude calculation algorithm effectiveness. The experimental results show that after UKF processing, the pitch angle and yaw angle calculation error of the combined measurement system of the gyroscope and geomagnetic sensor can be controlled between 0.2° and 0.4°, and the roll angle calculation error outside the magnetic measurement blind area can be controlled between 0° and 0.1°, which meets the requirements of the aircraft attitude measurement. Our future work will focus on the optimization of attitude measurement algorithms and precise navigation control of aircraft.



---

*Source: 6662007-2021-06-18.xml*