Journal of Control Science and Engineering

Volume 2017, Article ID 9542423, 8 pages

https://doi.org/10.1155/2017/9542423

## A Real-Time Structure of Attitude Algorithm for High Dynamic Bodies

^{1}School of Aerospace Engineering, Beijing Institute of Technology, Beijing 100081, China^{2}Key Laboratory of Dynamics and Control of Flight Vehicle, Ministry of Education, Beijing 100081, China^{3}Beijing Key Laboratory of High Dynamic Navigation Technology, Beijing Information Science & Technology University, Beijing 100101, China

Correspondence should be addressed to Xingcheng Li; nc.ude.tib@ilhcgnix

Received 8 October 2016; Revised 11 April 2017; Accepted 14 May 2017; Published 18 June 2017

Academic Editor: William MacKunis

Copyright © 2017 Xingcheng Li and Shuangbiao Zhang. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

To solve the real-time problem of attitude algorithm for high dynamic bodies, a real-time structure of attitude algorithm is developed by analyzing the conventional structure that has two stages, and a flow diagram of a real-time structure for a Matlab program is provided in detail. During the update of the attitude matrix, the real-time structure saves every element of attitude matrix in minor loop in real time and updates the next attitude matrix based on the previous matrix every subsample time. Thus, the real-time structure avoids lowering updating frequency, though the multisubsample algorithms are used. Simulation and analysis show that the real-time structure of attitude algorithm is better than the conventional structure due to short update time of attitude matrix and small drifting error, and it is more appropriate for high dynamic bodies.

#### 1. Introduction

Spinning bodies are a kind of fight vehicle that has high self-rotating speed, such as guided shells and guided multiple launch rockets, and they are also called the high dynamic bodies. The spinning mode of high self-rotating speed is used to simplify the configuration of control systems and generate stability of the motion and robustness to disturbances [1]. Nevertheless, this mode induces the occurrence of coning motion, which gets worse as the self-rotating speed increases. Researches on aerodynamic design and control system design are made to restrain coning motion and improve flight environment for spinning bodies [2].

In researches on control and navigation of vehicles, attitude algorithm is a key part, and it still has the same position for the high dynamic bodies. The most popular methods to describe the relationship of a body to the reference frame are rotation vector, the direction cosine transformation matrix, Euler angles, and quaternions. Through decades of persistent efforts by researchers, an outstanding two-stage structure of attitude algorithm has been refined and outlined by Savage [3], which consists of attitude matrix update cycle by Jordan [4] and rotation vector update cycle by Bortz [5]. Moreover, an inevitable error named coning error is induced by environment disturbances, and it drifts and diverges in a period of time. So, the drift error indicates the accuracy of attitude algorithm. In addition, the stage of updating the rotation vector has the truncation error for approximation. Up to now, the coning error has attracted many researchers to devote to the development of valid algorithms. Multisubsample optimized algorithms based on bandwidth of gyroscopes are proposed to restrain drifting of coning error, which are also regarded as uncompressed algorithms. It is found that the more the subsamples are chosen, the smaller the drifting rate of coning error is [6–9]. To further improve the accuracy of rotation vectors, compressed and half-compressed algorithms have been presented as well [10, 11]. These algorithms calculate several angular increments at a higher frequency and then compress them as one value in a relative lower frequency. Considering the maneuver situation of flight vehicles, the performance of coning correction of attitude algorithms under pure coning environment is examined to verify the validity [12, 13]. A cone algorithm uses a cone frame and cone attitude to describe the coning movement of high dynamic bodies and restrains the coning error by environment disturbance [14]. In fact, the cone frame and cone attitude are defined according to the characteristic of coning motion of high dynamic bodies. Generally speaking, coning motion includes the nutation motion and the precession motion, which causes attitude coupled. There are also some works focusing on limiting coning motion under an allowable level, such as a nutation control system and nutation damping for spin-stabilized satellites [15, 16]. These works are extremely relevant and provide an important contribution to the improvement of attitude algorithms.

However, the drifting error of attitude algorithms still exists for high speed spinners, and attitude computation becomes even more difficult due to the time constraint. The total update time is dependent on the sum of each subsample time, while the subsample time is determined by the processing ability of hardware. Nevertheless, for high dynamic bodies, the value of the rotational speed is another significant parameter to be considered while solving for the attitude. This is because the conventional structure of attitude algorithm with the compressed mode has the real-time problem, and it could not meet the real-time requirement of bodies with self-rotating speed greater than 20 r/s [17]. In other words, under the condition of high self-rotating speed, it is hard for the conventional structure with the lower updating frequency to provide attitude to control system and navigation system at each right time. In addition, drifting error can not be restrained validly due to the enlarged update time. This issue also exists in information exchange of spacecraft [18]. Besides, it is necessary to notice that MEMS gyroscopes used for high dynamic bodies have intrinsic poorer alignment and lower measurement accuracy. Therefore, in this paper, a real-time structure of the attitude algorithm is proposed and compared to the conventional structure to improve the real-time capabilities for high dynamic bodies.

#### 2. The Conventional Structure of Attitude Algorithm

The conventional structure of attitude algorithm includes two stages. The first stage is to calculate the rotation vector by using the data from gyroscopes in higher frequency, and the second stage is to update the attitude matrix based on the relationship between rotation vector and attitude matrix. The relationship between rotation vector and angular velocity is shown as follows [5]:where represents rotation vector and represents angular velocity. Based on the small angle approximation, (1) can be simplified as

It is seen that (2) is a differential equation, and the rotation vector can be obtained by

Nevertheless, the data sampled from gyroscopes is discrete, and it is difficult to calculate the rotation vector through integration of the second and third terms of (2). Thus, the angular velocity from gyroscopes can be integrated to determine the angular increment:where and represents the update time:where represents the amount of subsamples that determine attitude algorithms and represents subsample time.

Moreover, if the third term of (2) is omitted, the sequential angular increments can be used to calculate the rotation vector bywhere represents the coefficient that can be determined by the optimized algorithm under the classical coning environment [3, 10]. Figure 1 shows coning motion of high dynamic bodies, represents coning axis, represents the coning frequency, and represents the half coning angle.