Hotin YANG, Bin ZHOU, Qi WEI, Xiong WANG, Xiobin XU,Rong ZHANG
a Department of Precision Instrument, Tsinghua University, Beijing 100084, China
b Xi’an Research Institute of High Technology, Xi’an 710025, China
cHypervelocity Aerodynamics Institute, China Aerodynamics Research and Development Center, Mianyang 621000, China
KEYWORDS
Abstract The accuracy of the HB2 standard model attitude measurement has an important impact on the hypersonic wind tunnel data assessment. The limited size of the model and the existence of external vibrations make it challenging to obtain real-time reliable attitude measurement.To reduce the influence of attitude errors on test results,this paper proposes a Quaternion Nonlinear Complementary Filter(QNCF)attitude determination algorithm based on Microelectromechanical Inertial Measurement Unit (MEMS-IMU). Firstly, the threshold-based PI control strategy is adopted to eliminate noise effect according to the Acceleration Magnitude Detector(AMD).Then,the flexible quaternion method is updated to carry out attitude estimation which is operational and easy to be embedded in the Field Programmable Gate Array (FPGA). Finally, a high-precision three-axis turntable test and a hypersonic wind tunnel test are performed. The results show that the pitchroll attitude errors are within 0.05°and 0.08°in the high-precision three-axis turntable test in a calculation time of 100 s respectively, and the attitude error is within 0.3° after the elastic angle correction in the hypersonic wind tunnel test. The proposed method can provide accurate real-time attitude reference for the analysis of the actual movement of the model,exhibiting certain engineering application value with robustness and simplicity.
In wind tunnel tests, accurate model attitude measurement is not only the basis for obtaining high-precision test data, but one of the key technologies for continuous sweeping tests.The current methods mainly include the angle of attack sensors, the laser grating method, and the video measurement method.1For example, Crawford and Finley adopted miniaturized piezoelectric accelerometers and magnetohydro dynamic rate sensors to characterize the yaw and pitch dynamics in the tunnel.2The angle of attack was obtained accurately through the tilt sensor correction and vibration suppression technique in the ?3.2 m low speed wind tunnel.3The inertial servo accelerometer was used to measure the angle of attack of the model.4However, if the strut wobble and the model vibration are large, the measurement accuracy of the sensors will drop sharply, hence it is necessary to suppress or reduce the error caused by vibrations. Then, a novel optical sensor was developed to alleviate the attitude measurement errors caused by unknown interferences in wind tunnel tests; however, it easily destroys the shape of the model and changes its stiffness and strength.5Furthermore, Cheng designed a three-dimensional vision measurement system based on two high-speed cameras to evaluate the pitch-roll angles and positions of the model.6Chen et al. discussed a binocular digital close-range photogrammetry system for attitude measurement of aircraft models in the wind tunnel;however,these characteristics were not validated under wind-on conditions.7A videogrammetric measurement method was applied to the angle of attack calculation; however, since the vibration of the wind tunnel would change the camera position and reduce the measurement accuracy, it was not applied to high speed temporary wind tunnels.8Jones compared the attitude and deformation of the model through an optical system and inertial devices. It was concluded that the performance of the Videogrammetric Model Deformation (VMD) system in the pitch plane was comparable with that of the precision accelerometer.9Therefore, a method that can effectively suppress vibration and accurately measure the attitude angle without burdening the model is urgently needed.
With the rapid development of MEMS sensors, the lowcost, small-size, low power consumption, light weight MEMS strapdown system has become one of the main research directions in the field of inertial navigation.In particular,there is a broad prospect in both military and civilian fields.10The precise attitude calculation process based on MEMS-IMU has a vital significance for various control systems, such as unmanned helicopters, robot control, virtual reality, human motion tracking, navigation without GPS, and attitude reference systems.11–14It is not only a key task of the aircraft,but also the focus of many scholars to study the autonomous attitude estimation algorithm. The sensor information fusion technology is increasingly widely used in attitude estimation.The accuracy of the Kalman Filter (KF) may be degraded when the characteristics of the measurement noise and process noise are unknown. The Extended Kalman Filter (EKF) is modeled linearly,bringing large errors and reducing the system robustness.Furthermore,to solve the nonlinear model of navigation solutions, nonlinear filtering methods such as Unscented Kalman Filter (UKF), Particle Filter (PF), etc.are proposed.However,these methods require a large amount of calculation, thus not suitable for the aircraft attitude calculation in the actual flight process.15,16In addition, a problem that often arises is that when only one vector observation is available, for example, the GPS and the magnetic sensors can easily fail under certain environmental conditions.It is difficult to obtain the measurement results of known aircraft,possibly leading to unsatisfactory results of the solution. In this regard, the Complementary Filter (CF) technology has won the favor of the majority of scholars.The CF is a filtering method processing data from the frequency domain. It is widely used in attitude observation by multi-sensor fusions.With characteristics of simplicity, operability, fewer adjustment parameters, and low precision requirements for inertial devices, it can meet the needs of the model.
Recently, substantial attention has been devoted to the CF method. Some scholars achieved the CF by directly weighting the attitude angles calculated by the gyro and the accelerometer.17,18As the aircraft motion changes, the solution is not optimal.Wang et al.proposed a fuzzy logic system to improve the accuracy of attitude estimation by incorporating Air Data System (ADS) information and adaptively adjusting the weights of the CF.19A Gauss-Newton optimization method for adaptive gain was proposed to achieve real-time human motion tracking with low-cost Magnetic, Angular Rate, and Gravity(MARG)sensors.20Furthermore,Mahony considered inertial device measurement problems and filter design methods, direct and negative CF were proposed, and the attitude and the gyro bias can be estimated well.21,22Madgwick proposed a similar MARG to minimize the attitude error according to the gradient descent principle.23It has been widely used since then, and many scholars utilized different controllers to improve attitude calculation accuracy. The main application scenarios include attitude reference systems,24the rotation mechanism,25the GPS signal failures,26self-balancing systems,27,28low-cost UAVs,29and high dynamic environments,30,31etc. Furthermore, different improved controller methods are applied to the attitude calculation of quadrotor aircraft,mobile phones,and NSVs such as PI,PID.32–37Meanwhile,some scholars not only adopted the IMU data,but also fused other sensors to design algorithms. Poddar proposed a CF scheme based on Multiple Model Adaptive Estimation(MMAE)between the measured value and the estimated value as the basis for the adaptive weight selection.38The fuzzy logic and the SPSA method were employed to adjust the cut-off frequencies of the CF to estimate the attitude information of vehicles under various conditions.39The autonomous, longterm, and stable navigation information of underwater robots was achieved by Terrain-Aided Navigation (TAN) estimation and Doppler Velocity Logger (DVL) measurement through Monte Carlo simulation.40Coopmans integrated the idea of fractional calculus into the CF to calculate the pitch-roll angles of UAS through simulation.41
To our knowledge, the CF has been successfully applied to different attitude estimation scenarios.However,in the hypersonic wind tunnel test,when magnetometers,the GPS,or other external auxiliary sensors are not available, the limited size of the model and the existence of external vibrations will cause the attitude error to significantly diverge. It is necessary to improve the attitude precision by using the feedback correction method to constrain the attitude error.Inspired by the work of Mahony and Madgwick,this paper proposes an attitude calculation method based on the Quaternion Nonlinear Complementary Filter (QNCF). Firstly, the threshold-based PI control strategy is adopted to eliminate the external vibration noise effect according to Acceleration Magnitude Detector(AMD). Then, the quaternion method is updated to obtain accurate attitude information, which is operational, reliable,does not require an accurate model of noise and a high processing speed for the processor,and is suitable for embedment in the FPGA. The results show that the pitch-roll attitude errors are within 0.05° and 0.08° in a calculation time of 100 s respectively in the high-precision three-axis turntable test, and that the attitude error is within 0.3° after the elastic angle correction in the hypersonic wind tunnel test. The proposed method can provide real-time reliable attitude reference for the analysis of the actual movement of the model with robustness and simplicity.
This paper is organized as follows: Section 2 describes the principle of the quaternion attitude solution method.Section 3 details the proposed method that combines the accelerometer and the gyro in the NCF. Section 4 presents the results with discussions adopting Microelectromechanical Inertial Measurement Unit (MEMS-IMU) through a high-precision three-axis turntable test and a hypersonic wind tunnel test.Finally, conclusions are drawn in Section 5.
Attitude calculation is one of the key technologies for strapdown inertial navigation to obtain accurate navigation information. The CF algorithm was adopted in the Euler angle method and the direction cosine respectively.42,43Due to the problems such as the existence of singularity in the Euler angle method and the large amount of computation in the direction cosine method, etc., they cannot meet the requirements of aircraft flight control. The quaternion method is simple in calculation and can perform all-attitude measurement, thus is widely used in navigation algorithms.44
In this paper,the east,the north,and the‘‘up”direction are defined as the navigation coordinate system. In the carrier coordinate system,axisYis directly in front of the carrier,axisXis horizontally right, and axisZcomplies with the righthanded spiral guidelines. The attitude angle is represented by pitch θ, roll γ, and yaw ψ. The transformation matrix of the two coordinate systems is obtained by the rotation sequence(North to west is positive), see Fig.1.
The corresponding attitude matrix is:

The equivalent rotation vector method can effectively reduce the error, thus is suitable for the characteristics of dynamic environments. To improve accuracy,18the attitude is calculated using the single-sample algorithm, and the rotation vector Φ(h) in one solution period is:

Fig.1 Spatial angular position rotation diagram.

where Δθx,Δθy,Δθzare the angular increments during the sampling period respectively.
Attitude transformation quaternionq(h) is built as:

which is

The updated quaternion process is:

wheretk+1andtkare the current moment and the previous moment of the solution, respectively.
After an equivalent rotation,the quaternion can be used to represent the attitude transformation matrix:

The attitude angles can be solved as:

The Nonlinear Complementary Filter (NCF) is a well-known technique that combines sensor data with different frequency characteristics for information fusion. The gyro error will accumulate over time.However,the accelerometer is precise in a long term, particularly in the low frequency state where the attitude measurement will have the ideal result. To eliminate the inertial sensor drift and the external noise interference,the respective advantages of the accelerometer and the gyro can be excavated. The NCF can be designed in light of the characteristics of the two sensors, thereby improving the measurement accuracy and the dynamic performance of the system.45This study combines the quaternion attitude solution and the NCF method. The specific description is as follows:

LetGa(s) has a low-pass filter characteristic,Gg(s) has a high-pass filter characteristic.
Then

whereC(s) is PI control loop.
From the analysis of Formula(10),it can be known that the NCF can eliminate the accumulation of high-frequency noise in the accelerometer and that of low-frequency noise in the gyro.In the automatic control system,a common PI controller is used to reduce the system error, constituting a control deviation based on the reference and the actual output value, and the proportion and the integral of the deviation form the control quantity through the nonlinear combination to control the object. The PI regulator model is:

wheree(t) andu(t) are respectively the system error and the output of the PI regulator at timet. The values ofKpandKidetermine the cut-off frequency of the NCF and the time to eliminate the static deviation respectively.
However, the disadvantage of traditional NCF methods is that the attitude estimation must be performed directly through the accelerometer in the feedback loop,and the result of the solution is more accurate than that of the gyro under static conditions. When there is external acceleration, the accelerometer may be doped with a large amount of noise,leading to the inaccuracy of the attitude information,although the gyro works normally during this process. Therefore, it is worth mentioning that direct estimate and its effect through the accelerometer should be limited under these circumstances.One solution is to adjustC(s) by AMD.46Accordingly, the adaptive variable for the proposed method is:

According to the online calculation value of Thr,a different controllerC(s) is switched inside the feedback loop of the NCF. Judgment is made from the empirical value:
(1) if Thr ≤0.3,the carrier is in a static or a uniform motion state. TheC(s ) controller works normally in Eq. (11).
(2) if Thr >0.3,which shows that the carrier is accelerated,the controller should switch toC(s )=0.
A specific QNCF algorithm block diagram is shown in Fig.2.
This section aims to illustrate the performance of the designed algorithm.First,a static and dynamic test is built as a platform with a high-precision three-axis turntable. Then the MEMSIMU is mounted on the HB-2 standard model to perform aircraft attitude measurement tests in a hypersonic wind tunnel.
The diagram of high-precision three-axis turntable device is shown in Fig.3.
4.1.1. Static test
The attitude drift relates to the measurement system and the stability of the MEMS-IMU. Fig.4 shows the comparison of the attitude errors solved by different methods(the accelerometer, the gyro, and the QNCF) in a static environment.

Fig.2 Block diagram of QNCF method.

Fig.3 Diagram of high-precision three-axis turntable device.
From Fig.4,it can be seen that the divergence of the pitchroll attitudes solved by the gyro is powerful, which is consistent with the conclusion that the solution error has accumulated over time. The pitch-roll attitudes solved by the accelerometer fluctuate within a large range, while the one acquired by the proposed method significantly suppresses the divergence of the error and appears more smooth. Table 1 characterizes the attitude drift value in the static state in different methods, indicating that the proposed method can suppress the drift well, and at the 1380 s time, the pitch-roll angle errors are 0.0246 and 0.0180, respectively. However,the pitch-roll angle errors calculated by the traditional method are -1.753 and 0.1980, respectively.
To further demonstrate the effectiveness of the proposed method,the Mean and the Root Mean Squared Error(RMSE)of the pitch-roll attitudes are compared respectively in Table 2.
As can be seen from Table 2, compared with the pitch-roll attitudes calculated by the gyro and the accelerometer,the proposed method has the smallest Mean and RMSE.It can effectively suppress the divergence of the attitude error and improve the accuracy of the attitude calculation under static conditions.
4.1.2. Dynamic tests
In this section, the test is undertaken in two situations (constant and swing) to verify the effectiveness of the proposed method.
(1) Constant test
Firstly, we horizontally modulate the level of the system,rotate the frame axes at different angles,and solve the attitudes by the accelerometer, the gyro, and the QNCF.
We log the pitch-roll attitudes when the MEMS-IMU performs the constant test in different directions, extracting details at reference angles (pitch angles at 5° and 15°; roll angles at 30°, 100° and 120°) in Fig.5(a) and (b). After that,the Mean and the RMSE of the pitch-roll attitude calculation errors at the reference points are listed in Tables 3 and 4 respectively. The results indicate that the pitch-roll attitudes solved by the gyro show small fluctuations in the short term;however, due to the influence of the bias, the errors are larger than the reference value,while large fluctuations appear in the pitch-roll attitudes solved by the accelerometer. The proposed method combines the advantages of the two sensors to obtain more accurate attitude information. More specifically, in the 100 s calculation time, the pitch angle error is within 0.05°,and the roll angle error is within 0.08°.
(2) Swing test
In the wind tunnel test,the model needs to simulate the real and complex motion states, and the dynamic characteristic is also an important indicator. The swing motion is operated in different frame axes,and the dynamic attitude data is collected and analyzed as shown in Fig.6.

Fig.4 Pitch angle and Roll angle curves in different methods.

Table 1 Attitude drifts in static state in different methods.

Table 2 Mean and RMSE of pitch-roll attitudes in different methods.
From the changes in the pitch-roll attitudes illustrated in Fig.6, it can be seen that due to the short-term noise effect during the vibration process, the attitude angle curves solved by the accelerometer has large fluctuations, and becomes apparent at the moment of the angular velocity change. The divergence of the attitude angles solved by the gyro is serious.As the drift of the gyro is effectively suppressed, the result of the QNCF method can still maintain a high-precision output,closer to the reference value.Therefore, it can be seen that the proposed method can also achieve relatively high accuracy under the dynamic condition.

Fig.5 Constant angles from accelerometer, gyro, and QNCF (constant test).

Table 3 Mean and RMSE of pitch errors in different methods (°).

Table 4 Mean and RMSE of roll errors in different methods (°).
To further verify the feasibility of the method, the MEMSIMU is installed in the model, and a hypersonic wind tunnel test is carried out to analyze the data in the actual flight environment. The hypersonic wind tunnel principle and the installation diagram have been shown in Fig.7.The MEMS-IMU is installed in the front of the HB2 standard model. In the wind tunnel test, when the angle of attack mechanism rotates, the spout provides a steady flow of gas along the direction of the air flow to simulate the environment of the model under real flight conditions. The attitude solution module outputs accurate attitude angle information in real time.
Figs. 8 and 9 display the curves of the fixed angle and the continuous angle in the hypersonic wind tunnel test solved by the traditional CF (Blue line), Gyro (Green line), QNCF(Red line), and Accelerometer (Pink line) respectively. Due to the large vibration, the attitude information solved by the accelerometer is seriously diverged, and the angular velocity cannot be corrected at this time. Furthermore, it will lead to unsatisfactory solution results using the traditional CF. The attitude angles solved by the gyro cause the cumulative errors to diverge due to the presence of the bias.

Fig.6 Dynamic angles from accelerometer, gyro, and QNCF (swing test).

Fig.7 Hypersonic wind tunnel principle and installation diagram.
The pitch angle can be obtained with and without the wind tunnel test in Table 5.The attitude error can be obtained after the correction of the elastic angle in different methods in Table 6. The results show that the attitude error of the proposed method is smaller than 0.3°,and the error compensation effect has been considerably improved compared to the attitude error by the gyro.
To solve the problem that the attitude of the HB-2 standard model is difficult to measure precisely in the hypersonic wind tunnel test,this paper proposes.The main contributions of this article are as follows:
(1) An accurate attitude algorithm based on the QNCF is developed, which fusions the quaternion with the threshold-based PI control to acquire the model attitude.

Fig.8 Diagram of pitch angles solved by traditional CF, Gyro, QNCF, and accelerometer.

Fig.9 Diagram of continuous pitch angles solved by traditional CF, Gyro, QNCF, and accelerometer.

Table 5 Pitch angles with and without wind test (°).

Table 6 Pitch angles after compensation in different methods (°).
(2) The high-precision three-axis turntable test and the hypersonic wind tunnel test confirm the validity and feasibility of the proposed method. The conclusions are as follows:(A)The proposed method can suppress the attitude drift in the static state, and track the attitude change quickly in the dynamic state. In the 100 s highprecision three-axis turntable test, the pitch-roll angle errors are within 0.05° and 0.08° respectively. In the hypersonic wind tunnel test, the attitude error is within 0.3° after the elastic angle correction. (B) The attitude angle solved by the gyro is relatively stable in the short term.However,that solved by the accelerometer is more accurate in the long term, which is consistent with the basic theory that cumulative with the error of the gyro solution over time and the accelerometer is susceptible to transient noise interferences.
(3) The proposed method is flexible and implementable. It has been successfully embedded in the FPGA,providing real-time accurate attitude information for the model in the hypersonic wind tunnel test.
Future work will focus on enhancing the accuracy of attitude estimation through the rotary modulation technology.
CHINESE JOURNAL OF AERONAUTICS2020年1期