#### 3.1. The Procedures of Simulation

In order to further discuss the effectiveness and performance of the proposed algorithm, EKF and ASEKF were also simulated at the same time, and then all simulation results were analyzed in detail. In this paper, the procedures of the simulation were divided into four parts as

Figure 2.

- 1.
Preprocessing

The work of preprocessing should be completed initially, which includes obtaining the parameters of pulsar, spacecraft, etc. The required parameters were determined through some official websites, databases, and software. In particular, the data of the pulsar’s position and velocity is obtained in the Australia Telescope National Facility (ATNF). In this study, Pulsar Catalogue was used to generate observation data, which is viewed as the real position as well [

14]. It is worth mentioning that the pulsar position used in different algorithms is the real pulsar position plus the set error. Meanwhile, the position vector from the earth center of mass to SSB was obtained from DE421; STK software provided the necessary information of probe, such as position and velocity.

- 2.
Observation Simulation

The main work of this part was to obtain the proper pulsars used in later simulation; all pulsars’ parameters were inputted into Inter Visual Fortran 11. Generally speaking, the higher the signal frequency of the pulsar, the greater the radiation energy of the photon, the smaller the background radiation energy, the narrower the pulse width in the periodic contour, the larger the number of pulses, the larger the quality factor of the pulsar, and the higher the positioning accuracy of the pulsar. Under the constraints of positioning accuracy and quality factor, Weighted Dilution Of Precision (WDOP) method and observation analysis to acquire the most suitable pulsars were used [

21]. Specifically, after selecting pulsars, the most important thing was to determine the time delay. The number of photons reaching the detector can be obtained by simulating the number of photons generated in Poisson distribution. The pulse profile of simulated observation can be obtained by adding the number of photons repeatedly. Then, using the FFT method to cross-correlate the simulated observation profile with the standard pulse profile, the time delay can be obtained in the end.

- 3.
Analysis of System Error

In this research, the direction error caused by Roemer delay and Shapiro delay was analyzed in detail.

- 4.
Orbit Determination

The core work involved in this part was conducted based on the MASEKF module, combining orbital dynamics to process the simulated observation data. The state of the spacecraft was obtained, and the precision statistics of the calculated results were carried out. When the precision evaluation exceeds the threshold value of Cramer-Rao Lower Bound [

33], the simulation was finished, otherwise, the orbit simulation was simulated again. The experiment cannot stop simulating until the accuracy meets the requirements.

To make this research more comprehensive, the performance of three different algorithms was verified further. Root mean square error (RMSE) was applied to confirm the simulation precision of three algorithms, which can quantify the deviation between the observed values and real values straightly. It is worth noting that RMSE is extremely sensitive to outliers, such as maximum error and minimum error. The expression of RMSE is as follows.

where

$RMS{E}_{r}$ is the

$RMSE$ of the estimated position error,

$RMS{E}_{v}$ is the RMSE of the estimated velocity error,

$M$ is the sampling point of the stable filter interval,

$\Delta r$ is the estimated position error,

${t}_{ko}$ is the initial moment of filtering stability, and

$\Delta v$ is the estimated velocity error. In the end,

$\mathrm{the}RMSE$ of the three algorithms was calculated and analyzed cautiously.

#### 3.2. Initial Conditions

Actually, there are 140 pulsars that can be used in navigation; in this paper, WDOP method was applied with the constraint of quality factor to select 40 pulsars, which is the process of preliminary selection as well. If the selected 40 pulsars have better performances, then the most suitable pulsars are chosen through observation analysis. Finally, three pulsars (B1821-24, B1937+21, and B0531+21) were adopted as the navigation sources. The corresponding parameters of the three pulsars are shown in

Table 2.

In the simulation, the research object was the earth-orbiting spacecraft. The parameters are presented in

Table 3. Meanwhile, it is well accepted that GPS plays a vital role in the navigation system, and its data is available [

13,

25]; many prior studies have selected GPS as the research object due to its importance and extensive application. Thus, GPS_BII-10 was adapted to be further researched in this paper; its corresponding data are provided by STK software. The simulation time was set between 2017.10.1.16.00.00 and 2017.10.2.16.00.00. The measurement time step was determined as 246.8

$\mathrm{s}$, whose effectiveness has been confirmed many times in the existing pieces of literature [

3,

19]. Usually, the filtering step runs immediately after the pulsar observation step [

34]. The total time of the simulation was 86,400

$\mathrm{s}$; the simulation parameters of EKF, ASEKF, and MASEKF were set as follows.

- (1)
- (2)
Initial estimation-error covariance:

- (3)
The covariance of the state process noise:

In addition, the observation noise covariance can be determined as follows [

18].

where,

$w$ is the width of the pulsar,

${B}_{x}$ is the X-ray background radiation flux, which is about 0.005

${\text{}\mathrm{ph}/\mathrm{cm}}^{2}/\mathrm{s}$ in the prior researches,

${F}_{x}$ is the radiation photon flux from the pulsar,

${P}_{f}$ is the ratio of the pulse radiation flux to the average radiation flux in one pulsar period,

$S$ is the effective area of the X-ray detector, its value is 1

${\mathrm{m}}^{2}$,

${t}_{obs}$ is the observation period,

${t}_{obs}=246.8\mathrm{s}$, and

$d$ is the ratio of

$w$ to

$P$.

The pulsar period parameters are shown in

Table 2. Hence, the covariance of observation noise can be calculated. The result of

$R$ is given by

where

$diag$ is an abbreviation for diagonal matrix.

#### 3.3. Simulation and Analysis

In the simulation, in order to confirm the performance of the proposed algorithm clearly, ASEKF and EKF were simulated to be compared with MASEKF, conducting the simulation under three different conditions. In this paper, the factor of the direction error is an essential changeable condition of the simulation, since the system error includes the direction error, clock error, ephemeris error, and other possible existing errors, the settings of the above errors are presented below.

- 1.
Clock error

The initial clock error, the clock error drift, and change rate of the drift were set as $2.5858\times {10}^{-6}\mathrm{s}$, 4.136679$\times {10}^{-11}$, and 6.88$\times {10}^{-18}$, respectively.

- 2.
Ephemeris error

According to reference [

35], the ephemeris error is usually less than

$1\times {10}^{-13}$ in the other planets’ ephemerides. However, the error in the earth’s ephemeris has been verified to be the biggest, which could have specific influences on the performance of XPNAV. Since the simulation time is from 2017.10.1.16.00.00 to 2017.10.2.16.00.00, and ephemeris is time varying. Consequently, the changeable tendency of ephemeris error within the simulation period can be determined in

Figure 3.

- 3.
Direction error

Owing to the limited space and the previous attempts in other works of literature [

34], the simulation was conducted with the initial error condition of (0 mas, 0 mas), (1 mas, 1 mas), and (−1 mas, −1 mas); it should be noted that mas as a unit represents milli–arcsecond.

- 4.
Cosmic background noise

In the observation and simulation stage, the photon arrival model under the Poisson distribution to simulate the distribution of cosmic background noise was construct; it was found that the pulse observation profile of the photon arrival model under the Poisson distribution was closest to the actual pulse profile. In the orbit determination stage, cosmic background noise was added to the observation noise, and then it was subjected to the Kalman filter algorithm for processing.

- 5.
Other errors

According to the prior researches, other errors may mainly exist in the following aspects: (1) the distance between SSB and spacecraft, the greater the distance, the higher the system error; (2) the value of the pulsar frequency derivative, the larger the value, the larger the system error, and (3) the size of proper motion and the age of the position epoch, the greater the appropriate motion, the older the epoch, the greater the system error. Considering the above possible existing errors, other errors were set to ${10}^{-8}\mathrm{m}$.

Besides, the simulated observation data was combined with random noise. By adding the random noise during the simulation process of obtaining

${t}_{SC}$ and

${t}_{SSB}$, whose value is usually less than

${10}^{-7}\mathrm{s},$the corresponding position error can be controlled within 30

$\mathrm{m}$. Besides, the uncertainty information (the triple standard deviation) was added to prove the reliability of the estimated results. The data are indicated in

Figure 4,

Figure 5 and

Figure 6.

In

Figure 4,

Figure 5 and

Figure 6, it can be found that the estimated result of the position error fluctuates greatly, especially in the case of (0 mas, 0 mas), the estimated result of EKF’s position error cannot satisfy the requirement of the triple standard deviation around 50 epochs, which indicates the poor performance of EKF. In contrast, the estimated results of ASEKF and MASEKF’s position error are acceptable in scenarios of (0 mas, 0 mas) and (1 mas, 1 mas), it is notable that the estimated result of velocity error of three algorithms can satisfy the requirement of the triple standard deviation, which can strongly illustrate the effectiveness of ASEKF and MASEKF under any simulation condition.

Table 4 displays the statistical simulation results, when there is no initial error; it is apparent that EKF has the worst performance. It is well accepted that EKF performs Kalman filtering by linearizing the nonlinear system, ignoring the direction error term unconsciously. This means that EKF cannot eliminate the corresponding measurement noise and state noise effectively; the above defects of EKF result in its lower accuracy. Through analyzing

Figure 4, it was found that the velocity error of EKF diverges at 300~350 epochs, which was rather unstable, thereby it was tough for the system to converge on the whole.

What’s more, different from EKF algorithm, ASEKF algorithm linearizes the nonlinear system after adding the direction error into the state vector, considering the first-order term of the direction error in Taylor series expansion, which could certainly improve the accuracy in a way. Therefore, the accuracy of ASEKF has improved a lot than that of EKF, but the performance of ASEKF seems to be a little bit of unstable, as indicated in

Figure 5 and

Figure 6. It could be seen that the accuracy of ASEKF decreases quickly in scenarios of (−1 mas, −1 mas); the accuracy difference between (−1 mas, −1 mas) and (1 mas, 1 mas) is much bigger than that of between (0 mas, 0 mas) and (1 mas, 1 mas), and it seems that ASEKF is more suited in scenarios of (0 mas, 0 mas) and (1 mas, 1 mas).

Furthermore, based on the theory of the ASEKF algorithm, the proposed MASEKF has considered the second-order terms of direction error, adding the more accurate direction error into the state equation and measurement equation subsequently. Therefore, the MASEKF algorithm tends to have a better convergence effect and stronger stability. As is shown in

Table 4, it is evident that MASEKF has the best accuracy performance under three different conditions; the accuracy of ASEKF is close to the accuracy of MASEKF in scenarios of (1 mas, 1 mas). Besides, MASEKF can converge quickly to 121 m in position error, whereas the velocity error of MASEKF converges rapidly to about 0.729 m/s after about 50 epochs. It seems that the improvement and optimization of MASEKF only bring a small increase in accuracy in scenarios of (1 mas, 1 mas). In fact, when the simulation are conducted in situations of (−1 mas, −1 mas), the advantages of MASEKF stand out, the accuracy of MASEKF is quite higher than the other two algorithms, and its accuracy difference is quite small between (−1 mas, −1 mas) and (1 mas, 1 mas), which verifies the better stability of MASEKF.

What’s more, for the purpose of comparing the performance of different algorithms further, simulations were conducted to obtain the RMSE under different conditions; RMSE can reflect the difference of the accuracy straightly.

Figure 7,

Figure 8 and

Figure 9 show the performance comparison of EKF, ASEKF, and MASEKF under different initial conditions.

For clarity,

Table 5 lists the necessary information of

Figure 7,

Figure 8 and

Figure 9. Regardless of whether there was system bias, MASEKF always had the fastest converge speed and the best navigation accuracy. The performance of ASEKF was much better than that of EKF, which illustrated that the optimization of the high-order terms of the direction error significantly improved the accuracy of the algorithm. Besides, it can also be observed that the proposed algorithm considered second-order terms of Taylor series of direction error, which outperforms the algorithm that only considered the first-order terms of Taylor series of direction error. Furthermore, as is shown in

Table 6, the accuracy of EKF and ASEKF was analyzed compared to that of MASEKF. It was found that EKF has poor accuracy, especially in scenarios of (0 mas, 0 mas), and the accuracy of the velocity error of MASEKF was improved by 43.06% than that of EKF. Similarly, the accuracy of the velocity error of MASEKF was improved by 36.11% than that of ASEKF. Meanwhile, though the accuracy of ASEKF improved a lot than the traditional EKF algorithm, its performance cannot stay stable in all conditions, such as in scenarios of (1 mas, 1 mas); the accuracy of position error and velocity error of ASEKF were worse than that of EKF. All values were positive in

Table 6, which means that the accuracy of EKF and ASEKF were worse than that of MASEKF. In fact, MASEKF always performed well, compared with traditional EKF algorithm, and it increased the average accuracy by 8.84% and 20.53% in position error and velocity error, respectively, under the three conditions.

To confirm the stability of the proposed algorithm in the whole simulation period, we compared the simulated orbit with the real one. The simulated trajectories and their partial enlargement are shown in

Figure 10 [

25]. It is evident that the MASEKF algorithm has the closest approximation between the simulated track and the real track at any simulation time. All results demonstrated that MASEKF not only had obvious superiority in the overall result but also ensured its high accuracy and stability at any time.