中国空间科学技术 ›› 2021, Vol. 41 ›› Issue (4): 111-120.doi: 10.16708/j.cnki.1000-758X.2021.0057

• 论文 • 上一篇    下一篇

一种航天器星上时间获取方法

兰天,郭坚,张红军,董振辉,韦涌泉   

  1. 北京空间飞行器总体设计部,北京100094
  • 出版日期:2021-08-25 发布日期:2021-07-30
  • 基金资助:
    国家重大科技专项工程

An onboard time acquisition method for spacecraft

LAN Tian,GUO Jian,ZHANG Hongjun,DONG Zhenhui,WEI Yongquan   

  1. Beijing Institute of Spacecraft System Engineering,Beijing 100094,China
  • Published:2021-08-25 Online:2021-07-30

摘要: 星上时间获取精确度直接影响了航天器各项自主功能的执行。准确获取星上时间的主要挑战来自时间获取动作与时间维护动作之间的数据竞争。在中断嵌套导致高优先级中断与秒中断间发生数据竞争时,需要根据秒中断被嵌套的状态决定在高优先级中断中获取星上时间时是否进行进秒修正。在现有适用于高优先级中断嵌套秒中断场景下的星上时间获取方法中,依赖处理器中断状态判定秒中断是否被嵌套,这导致该方法不能适应某些处理器。为解决这一问题,提出了一种不依赖中断状态的星上时间获取方法。相邻两次秒中断之间的时间被分为存在中断嵌套可能的时段和不存在中断嵌套可能的时段。若存在中断嵌套可能,通过时间维护标识判断是否需要对获取的星上时间进行修正。和现有方法相比,该方法不依赖处理器,计算复杂度相当,适用范围更广。该方法已在火星探测器的多台星载计算机上应用并取得了良好的效果,可为后续航天器软件设计提供参考。

关键词: 航天器, 秒中断, 数据竞争, 中断嵌套, 时间获取

Abstract: The accuracy of onboard time acquisition directly affects the execution of autonomous functions of the spacecraft. The main challenge in accurately obtaining onboard time is the data race between time acquisition action and time maintenance action. When interrupt nesting leads to data race between the second interrupt and interrupts with higher priority, it is necessary to determine if the onboard time needs to be corrected in high-priority interrupts according to the nested status of the second interrupt. For the existing onboard time acquisition method suitable for high priority interrupt nested second interrupt scenario, the interrupt status provided by the processor is used to determine whether the second interrupt is nested or not, which makes the method not suitable for some processors. To solve this problem, an onboard time acquisition method that does not depend on the interrupt state was proposed. The time between two adjacent second interrupts was divided into period with interrupt nesting possibility and period without interrupt nesting possibility. In the period with interrupt nesting possibility, the time maintenance identification was used to determine if the acquired onboard time needed to be corrected. Compared with the existing methods, the proposed method is processor-independent, and the computational complexity is similar to that of the existing methods, which makes it applicable to a wider range of applications. The proposed method has been applied on several onboard computers of China Mars explorer and achieved the expected goal. It can provide reference for the subsequent spacecraft software design.

Key words:  , spacecraft, second interrupt, data race, interrupt nesting, time acquisition