1. Introduction
The strapdown inertial navigation system (SINS) is an autonomous system that calculates the position and orientation of a carrier relative to an initial point and orientation using inertial-sensor measurements [
1,
2]. The initial attitude, obtained by initial alignment, is therefore significant for the achievement of high-precision navigation. There are two important indexes for the evaluation of initial-alignment performance: the alignment precision and the convergence speed [
3,
4]. In recent years, many researchers have been devoted to improving the performance of initial alignment, and a series of valuable methods have been proposed [
5,
6,
7].
According to the alignment process, the initial alignment is usually divided into two stages [
8,
9,
10,
11]. The first stage is called the coarse-alignment process and is utilized to determine the rough attitude based on the earth’s gravity and angular rate [
8,
9]. The coarse alignment’s contribution is mainly reflected in the alignment velocity. Therefore, an effective coarse-alignment method can reduce the alignment time so that the system can quickly enter the navigation state. The second stage is the fine-alignment process, which can more accurately determine the initial attitude [
10,
11]. After the coarse alignment has been conducted, the misalignment angles can converge to a small angle, so that the nonlinear error models of SINS can be approximately simplified into the linear error models. Then, a linear Kalman filter can be applied for the fine alignment. Based on the estimation of the bias of the inertial sensors, the misalignment angles can be further reduced. Consequently, as the coarse alignment is the fine alignment’s premise, its performance will directly affect the fine alignment’s performance. The design of a coarse-alignment algorithm with fast convergence speed and high alignment accuracy is very important to practical applications. This paper will focus on the design of a high-performance coarse-alignment method.
Several methods have been designed to improve coarse-alignment performance; one of them is based on the inertial frame, which can be summed up as the attitude determination (AD) [
12]. This means that the calculation of the initial-attitude matrix in [
12] is transformed into the determination of the constant direction-cosine matrix (DCM). Generally, one solution to the AD problem focuses on the determination of the attitude matrix [
13,
14,
15]. Qin and Wang [
12,
14] proposed a method, based on the dual-vector AD, that focused on the coarse alignment on the swing base. However, the method, which was proposed in [
12], did not achieve a favorable coarse-alignment performance, as the acceleration of the observation vectors measured by the inertial measurement unit (IMU) contained random noise. Another solution to the AD problem involves the determination of the corresponding attitude quaternion [
16,
17,
18,
19,
20,
21]. In order to solve the initial alignment on the swing base, Zhou [
16] proposed a coarse-alignment method based on the quaternion-estimation (QUEST) algorithm, which achieves faster convergence velocity than the dual-vector AD algorithm. However, when determining the attitude quaternion, the QUEST algorithm utilizes only the vector observation obtained at a single time point; the information contained in the past measurements gets lost. Zhu [
18] utilized the recursive quaternion estimator (REQUEST) algorithm [
19] to achieve the coarse alignment, which determines the attitude quaternion by recursive calculation to make full use of the measurements. Wu [
20] proposed an optimization-based alignment (OBA) algorithm for SINS, which establishes the alignment as an optimization problem that involves finding the minimum eigenvector. Compared with the QUEST algorithm, the OBA method achieves a better performance of the coarse alignment. However, the vector observation in the REQUEST algorithm and OBA algorithm also contains random noise. Choukroun [
21] proposed an Optimal-REQUEST (OPREQ) algorithm for AD on the basis of the REQUEST algorithm, which adjusts the gain of the filter adaptively to achieve a better performance of AD than the REQUEST algorithm. In order to improve both the convergence velocity and alignment accuracy, this paper proposes a coarse-alignment method based on the optimal-REQUEST (OPREQ) algorithm.
We propose a new inertial-frame-based coarse-alignment method that is inspired by the OPREQ algorithm [
21]. Based on the swaying motion’s properties, the coarse alignment of the inertial frame transforms the determination of the initial-attitude matrix into the constant-DCM calculation; we adopted the integral algorithm in order to filter the inertial sensors’ random noise. Then, we utilized the OPREQ algorithm for attitude determination in order to determine the constant DCM. There are two advantages to our proposed coarse-alignment method, which can improve the convergence rate and the stability of the coarse alignment. On the one hand, the proposed method changes the gain of the filter adaptively, rendering the OPREQ filter optimal. On the other hand, the proposed method can filter observation noise by building an accurate measurement model. We verified the performance of this coarse-alignment method with simulation and turntable tests.
The rest of the paper is organized as follows: we introduce the definition of a coordinate frame in the next section. Then, in 
Section 3, we state the principle of coarse alignment based on the inertial frame. In 
Section 4, we derive the principle of the OPREQ algorithm. The performance of the proposed method is illustrated through the simulation and turntable tests in 
Section 5. Finally, our conclusions for this paper are summarized in 
Section 6.
  3. The Principle of Coarse Alignment Based on the Inertial Frame
The attitude matrix can be calculated by the following equation:
	  
According to the definition of the relevant frame, 
 and 
 can be calculated as follows:
	  
      where 
 denotes the latitude of the carrier and 
 denotes the angular rate of the Earth. The attitude transfer matrix 
 between the 
b- and 
b0-frames can be calculated by the gyroscope output in real time, that is by solving the attitude-matrix differential Equation (4):
	  
Therefore, the key to calculating the attitude matrix 
 is to determine the constant attitude matrix 
. Assuming that the carrier does not exhibit a linear motion during the whole alignment process, 
 consists of the output of three accelerometers: the gravity-acceleration vector 
, the bias of the accelerometer 
, and the additional interference acceleration 
, which is to say 
. The projection of the vector 
 in the 
b0-frame can be calculated as Equation (5):
	  
      where:
	  
We used integrals on both sides of Equation (5) to eliminate random noise:
	  
We denoted 
 and 
. Ignoring the second integral term on the right, Equation (7) was simplified as:
	  
      where,
      
We normalized the vectors 
 and 
, denoted by 
 and 
:
	  
     where 
 denotes the Euclidean norm. Equation (8) can then be rewritten as the vector observations-based measurement model for 
 as:
	  
From Equation (11), we know that the coarse alignment based on the inertial frame can be summed up as an AD problem. Additionally, the DCM matrix  is a constant attitude matrix. One solution to the AD problem would be to calculate the optimal matrix A itself; the other solution involves the determination of the corresponding optimal quaternion q. The three-axis attitude determination (TRIAD) algorithm belongs to the former method. However, the TRIAD algorithm is incapable of achieving an accurate result as it ignores the vector-observation measurement error. The OPREQ algorithm computes the optimal quaternion q by constructing a matrix , which can reduce the influence of measurement noise adaptively.
  4. The Principle of the Optimal-REQUEST Algorithm
Reference [
21] expresses that the optimal quaternion 
q for the AD problem is the eigenvector of matrix 
 that belongs to its largest positive eigenvalue. Matrix 
 can be calculated by Equation (12), given a set of 
n simultaneous observations 
, obtained at time 
 and the corresponding weights 
, where, 
. We defined the 
 symmetric matrix 
 as:
	  
      where the 
 matrix 
, the 
 vector 
, and the scalar 
 are defined as follows:
	  
     where 
 denotes the trace operator. 
The update equation of the attitude quaternion is:
	  
     where 
 is a state transition matrix. If the matrix 
 is a constant attitude matrix, then 
 is a constant attitude quaternion and 
.
We considered a single observation at time 
, namely 
. The scalar weighting coefficient of the observation at time 
 was denoted by 
. The corresponding matrix 
 at time 
, denoted by 
, was constructed as follows:
	  
      where the 
 matrix 
, the 
 vector 
, and the scalar 
 are defined as follows:
	  
  4.1. Measurement Equation
With regards to the observation vectors obtained at time 
, we supposed that the reference vector 
 is acquired error-free, while the measurement vector 
 contains the noise vector 
. That is:
		
A 
 symmetric matrix, which is denoted by 
, is defined as [
19]:
		
        where the quantities used in Equation (18) are defined as follows:
		
Matrix 
 is the noise matrix contained in the matrix 
:
		
        where 
 and 
 are respectively the noisy and the noise-free matrices of the new vectors obtained at 
.
  4.2. Stochastic Models and Measurement Uncertainty
We supposed that the observation vectors 
 are symmetrically distributed around their true value. We established an error model to approximately express the mean and covariance of 
. The first and the second moments of this model are:
		
        for 
, where 
 is the variance of the component of 
.
We noticed that 
 is a linear function of 
 and 
. As 
 is a zero-mean white-noise process, 
 is also a zero-mean white-noise process. Thus:
		
        where 
. For the zero-mean matrix 
, the measurement uncertainty 
 is defined as:
		
We divided the 
 matrix 
 into four parts:
		
        where 
 is a 
 submatrix. The expressions 
, 
, 
 and 
 were calculated as follows:
		
We supposed that the set of 
 simultaneous observations obtained at time 
 have the same variance 
. Additionally, 
. The detailed calculation of 
 is provided in Reference [
21].
  4.3. Measurement Update Process
Through the above analysis, we obtained the predicted estimate matrix 
 and the new observation matrix 
. We then utilized an iterative calculation method to calculate the updated estimate matrix 
. The updated estimate 
 is calculated via the convex combination of the priori estimate 
 and the new observation 
, that is:
		
        where 
 is a positive scalar weight and 
 is computed as follows:
		
        for 
 and 
. The scalar 
 is the gain of Equation (26). If the value of the scalar 
 is fixed, the algorithm is called a REQUEST algorithm [
19]. The determination of the scalar 
 is tentative, rendering the REQUEST algorithm suboptimal. We wished to find the optimal value of the scalar 
, which could be changed adaptively according to the estimated residual. In doing so, the convergence of the attitude determination would be faster and the result would become more accurate.
The estimate errors of the algorithm are defined as follows:
		
       where 
 and 
 respectively represent the priori and posteriori estimation errors.
We supposed that the priori estimate 
 is unbiased, that is to say 
. The expression 
 was calculated by:
		
By subtracting Equation (26) from Equation (29), we obtained the relation between the priori and posteriori errors:
		
        where 
 is the measurement error defined in Equation (19). Taking the expectation of both sides of Equation (30), we obtained:
		
As mentioned above, the priori error  and the measurement error  are zero-mean. We know from Equation (30) that  is the linear function of  and . Therefore, the posteriori error is zero-mean. 
The measurement uncertainty corresponding to the two estimate errors is defined as follows:
		
According to Equation (30), it can be calculated as the following expression:
		
As the priori error 
 only contains the observations from time 
 to 
, 
 and 
 are uncorrelated. Thus:
		
Taking the expectation of both sides of Equation (33), we obtained:
		
We used 
 and 
 to denote, respectively, the first and the second terms of the right-hand side of Equation (35).
        
Equation (36) represents the uncertainty update in the -matrix estimation process for any , when a new measurement is acquired.
  4.4. Optimal Gain
We wanted the estimation uncertainty to decrease as much as possible when a new measurement was acquired. Reference [
21] proposed that the trace of the matrix 
 expresses the measurement uncertainty in a way that is suitable. Here, a cost function is defined as:
		
Hence, the design problem of the filter gain 
 comes down to solving the following minimization problem with respect to 
:
		
By substituting Equation (36) into Equation (37), we obtained:
		
The first-order necessary condition for an extremum of 
 is:
		
As a result, in order for 
 to yield a stationary point for 
 the following condition must apply: 
It can be shown that Equation (41) is the sufficient condition for the minimum value of the cost function . When the priori estimate’s uncertainty is above the measurement uncertainty, the gain approaches 1 and assigns a high weight to the new update-stage measurement described in Equation (26). On the other hand, when the measurement uncertainty is higher than the priori-estimate uncertainty, the gain approaches 0, and the filter assigns a low weight to the new measurement.
The OPREQ algorithm presented in this section is summarized in 
Table 1:
  5. Experimental Analysis
Based on the aforementioned analysis, we described the detailed experimental process as follows. First, the constant DCM matrix 
 for the coarse alignment of the inertial frame can be selected as the sought attitude matrix 
. The vectors 
 and 
 computed at every update period, are used to construct the measurement vector 
 and reference vector 
, respectively. Since the measurement vector 
 and reference vector 
 obtained at any given time always constitute a single observation, the parameter 
 and the corresponding weight 
 are both equal to 1. Following this, the optimal quaternion 
 corresponding to the DCM matrix 
 is calculated via the OPREQ algorithm. 
Figure 2 summarizes the alignment procedure of the proposed algorithm.
  5.1. Simulation Test for Attitude Determination
In this subsection, we conducted a simulation test for attitude determination on measurement noise in order to verify the effectiveness of the OPREQ algorithm. We assumed that the body frame was static relative to the inertial reference system. The reference vectors we acquired were error-free, while the noise contained in the measurement vectors was modeled as a zero-mean white-noise with an angular standard deviation of 0.1 degrees. Since the body frame was fixed with respect to the reference frame, the gyro output used to measure the angular velocity between the body and reference frames only included the bias. The noise contained in the gyroscope was modeled as a zero-mean Gaussian white-noise with a standard deviation of 
. The sample rates of the vector observation and gyroscope were both 100 Hz, and different single-vector observations were obtained at each sampling time. The whole simulation test lasted for 100 s. The results are shown in 
Figure 3 and 
Figure 4.
Figure 3a shows the curve of the attitude error 
 norm, calculated by the optimal REQUEST algorithm. The figure shows that the norm is approximately steady at 0.003 degrees. 
Figure 3b represents the curve of the optimal gain 
 during the whole simulation process. The optimal gain drops gradually from the initial value 1 to 0.001. 
Figure 3b shows that at the beginning of the estimation process, the optimal REQUEST algorithm puts more weight on the incoming observation. As the number of managed observations increases, the algorithm puts less weight on the new observation. Through the OPREQ algorithm, the estimated attitude approaches the real attitude successfully.
 Figure 4 compares the attitude error between the OPREQ algorithm and several different cases of the REQUEST algorithm. We chose three kinds of constant values for gain: 0.001, 0.01, and 0.1. These are typical values within the range of the optimal gain 
 as shown in 
Figure 3b. 
Figure 4 clearly shows that the red line representing the OPREQ algorithm has the fastest convergence speed and the highest accuracy. Out of the three kinds of REQUEST algorithms, the black line representing 
 converges fastest because of the measurements’ relatively large weight. Nevertheless, its error still has a relatively high steady state (
) and shows random variations. For 
, represented by the blue line, the algorithm converges smoothly and steadily reaches a value of 
. Meanwhile, a very low gain puts very little weight on the measurements so that the algorithm has a very slow convergence velocity. Therefore, the OPREQ algorithm can quickly and smoothly achieve the error convergence because the algorithm’s gain changes adaptively.
   5.2. Simulation Test for the Coarse Alignment
In order to verify the effectiveness of the proposed algorithm for the coarse alignment on the swing base, we used the sinusoidal motion model in order to simulate the IMU swing motion in a ship. The swing model was set as 
, where the parameters 
 and 
 are the amplitude and frequency of the swing motion, and the quantities 
 and 
 represent, respectively, the initial phase and swaying center. The parameters of this swing model are listed in 
Table 2.
In a practical inertial navigation system, several errors occur in the output of gyroscopes and accelerometers. We assumed that inertial-sensor outputs contain both constant and random errors. In the simulation test, the error parameters of the gyroscopes and accelerometers were set as shown in 
Table 3. As the carrier does not move in the swing motion, the position of the carrier was fixed in the simulation test. The geographic latitude and longitude of the carrier were set to 
 and 
, respectively. The whole coarse alignment of this test lasted for 200 s. The curve of the optimal gain 
 is displayed in 
Figure 5. 
Figure 6 and 
Figure 7 show the attitude-error curves of the simulation test. The statistics of each algorithm’s attitude errors are shown in 
Table 4 and 
Table 5.
Figure 5 shows the curve of the optimal gain 
 during the whole coarse-alignment test with the OPREQ algorithm. The optimal gain decreases gradually from the initial value 1 to 0.001 in 200 s. In this coarse-alignment simulation test, we chose, for comparison, three constant values for the gain of the REQUEST algorithm: 0.1, 0.01, and 0.001.
 Figure 6 contrasts the attitude errors of the OPREQ algorithm and several REQUEST algorithms. The three subgraphs in 
Figure 6 represent the error of the pitch angle, the error of the roll angle, and the error of the heading angle. 
Figure 6 clearly shows that the attitude errors of the horizontal angle are very similar for several methods, approaching the accuracy limit. Several methods’ differences are mainly reflected in the heading-angle error. The heading-angle error in 
Figure 6 shows that the blue curve representing 
 converges slowly at the beginning of the simulation but that the error curve is relatively smooth. While the convergence speed of the black curve (
) is faster, the curve’s amplitude is larger. The red curve is of the OPREQ algorithm. The value of the gain in the OPREQ algorithm changes adaptively; this method not only exhibits the fastest convergence speed in the initial stage but also reaches, with stability, the highest accuracy in the final phase. In order to clearly compare the simulation results of several algorithms, we calculated the mean and variance of several attitude errors in the first 100 s and in the second 100 s. The statistic results of the simulation test are shown in 
Table 4.
 Table 4 clearly shows that the horizontal-angle errors of several algorithms all approach the accuracy limit (
 and 
), while the mean and standard deviation of the heading-angle errors among these methods are markedly different. The mean of the heading-angle error in the first 100 s is 
, while the standard deviation of the heading-angle error in the last 100 s is 
. Among the three REQUEST algorithms, the mean of the heading-angle error for 
 is the smallest. That is because the filter puts a relatively large amount of weight on the new measurement, so that this method converges fast at the beginning of the coarse alignment. The standard deviation of the heading-angle error for 
 is the most optimal because a very low weight is given to the new measurement. The OPREQ algorithm combines the advantages of several REQUEST methods, so that the mean and the variance of the heading-angle error are inferior to those of the REQUEST algorithm for the whole alignment process.
 In this simulation test, we compared the OPREQ algorithm with the OBA algorithm in order to verify the effectiveness of the former method in the coarse alignment. The heading-angle error in 
Figure 7 shows that the convergence speed of the OPREQ algorithm is faster than that of the OBA algorithm. Additionally, the heading-angle error of the OBA algorithm exhibits a relatively large amplitude. In other words, the result of the OPREQ algorithm is more stable than that of the OBA algorithm. This therefore confirms the advantages of the OPREQ algorithm for both convergence speed and alignment stability. 
Table 5 shows the error statistics of the two algorithms.
As 
Table 5 clearly shows, the horizontal-angle errors of the two algorithms are relatively similar; the emphasis should be placed on comparing the heading-angle errors. The standard deviation of the OPREQ algorithm’s heading-angle error is inferior to that of the OBA algorithm for the whole alignment process, which proves the OPREQ algorithm’s stability. Additionally, the alignment accuracy of the OPREQ algorithm is higher than that of the OBA algorithm, because the former has a smaller heading-angle error between 101 and 200 s.
  5.3. Turntable Test
This subsection delineates how we used the turntable test on the swing base in order to verify how feasible and reliable the OPREQ algorithm is in practical environments. We installed the equipment in the turntable as shown in 
Figure 8. The three-axis turntable can achieve an angle precision of 
, and the accuracy of the angular velocity is 
. In this test, we used the turntable output’s angle data as the attitude reference because of the turntable’s high angle accuracy. We regarded the outputs of the inner, intermediate, and outer frames as the vehicle’s reference angles in pitch, roll, and yaw, respectively. The IMU used in the turntable test is an Optical fiber SINS, named FOSN, produced by Chinese CASIC hospitals 33. The IMU was installed in the center of the turntable. As 
Figure 8 shows, the IMU was mounted on a plate in the turntable’s inner frame. The 
n-frame of the turntable was fixed, and the 
b-frame of the IMU changed with the rotation of the turntable. We calculated and compensated both the installing and system errors prior to the turntable test. The IMU we used in this test contained three mutually-orthogonal fiber-optic gyroscopes and three mutually-orthogonal quartz accelerometers. The inertial sensors’ parameters are listed in 
Table 6.
Figure 9 shows the structure of the turntable test. On the one hand, the IMU outputs are sent to the navigation computer via the serial port at a frequency of 200 Hz. On the other hand, the time-synchronization signal sent by the IMU causes the turntable to transmit the reference attitude to the navigation computer via a level conversion. The navigation computer saves the outputs of both the IMU and the turntable simultaneously and utilizes the original data to obtain the coarse alignment according to the proposed algorithm.
 The IMU motion parameters that we set for the turntable test are shown in 
Table 7. The geographic latitude and longitude of the turntable were set to 
 and 
, respectively. The whole coarse alignment of this turntable test lasted for 300 s. The results of the turntable test are shown in 
Figure 10 and 
Figure 11. 
Figure 10 compares the alignment errors of several REQUEST methods with the OPREQ algorithms, including the pitch angle, roll angle, and yaw angle. Meanwhile, the mean and standard deviations of the attitude errors in the different alignment stages were calculated as shown in 
Table 8. Additionally, 
Figure 11 shows a comparison of the attitude-error curves of the OBA and OPREQ algorithms, and 
Table 9 lists the statistical data of the attitude errors for those two algorithms.
Figure 10 shows that the OPREQ algorithm’s convergence speed is faster than several REQUEST algorithms and that its alignment accuracy is the most optimal. In addition, the error statistics in 
Table 8, especially those in the later stage of the alignment process, show that the mean and standard deviations of the attitude errors for the OPREQ algorithm are inferior to those of any other algorithms.
 Figure 11 shows that the OPREQ algorithm’s convergence velocity is faster than that of the OBA algorithm and that its alignment accuracy is also higher. The error statistics shown in 
Table 9 further confirm the validity of the OPREQ algorithm. The result of the turntable test shows that the OPREQ algorithm performs well in a practical system.