Star sensor output time synchronization method
By simultaneously inputting second pulses and time broadcast information into the star sensor to synchronize UTC and the internal time module, the problem of inconsistent time references of the star sensor is solved, and fast and reliable timestamp synchronization and accurate output of attitude information are achieved.
Patent Information
- Application Number
- CN202411435815.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-10-15
AI Technical Summary
Because the internal and external time bases of star sensors are inconsistent, attitude information transmission is delayed and there is a lack of a unified time base for telemetry data analysis. Existing technologies make it difficult to achieve reliable timestamp synchronization.
By simultaneously inputting the second pulse signal and time broadcast information into the UTC time module and the internal time module, UTC second counting and microsecond counting are performed, and time broadcast information is detected in parallel. Based on the comparison result, the UTC second or internal second is updated to ensure that the output of internal time information is switched when external time information is lost.
It achieves fast and reliable synchronization of star sensor time information, ensures that attitude output information has an accurate timestamp, and can still output reliably when external time is lost, avoiding time differences caused by internal crystal oscillator drift and reducing processor overhead.
Smart Images

Figure CN119316086B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of star sensor time synchronization, specifically to a method for synchronizing, keeping time, and outputting the internal and external time of a star sensor. Background Technology
[0002] Star sensors are commonly used attitude measurement devices on spacecraft, providing reliable data sources for their high-precision and highly reliable attitude information. Typically, star sensors periodically and continuously provide attitude information to the spacecraft's attitude control system, which then performs calculations to control the spacecraft's actuators. To ensure the accuracy and effectiveness of control, the attitude data output by the star sensors needs to be timestamped (i.e., onboard time information), providing a time reference for subsequent telemetry data analysis. However, currently, due to the different power-on times of various onboard units, there is no unified time reference for their operation.
[0003] The star sensor receives time information from two sources: internal time information generated by its internal crystal oscillator and external time information (defined as external time information) from the externally input second pulse signal. The internal time information begins when the crystal oscillator starts operating after the star sensor is powered on; this time information is relative and not synchronized with the time of other individual devices on the spacecraft. The other source is the externally input second pulse signal and its accompanying time information (usually related time information output by the satellite navigation system), which serves as the time reference for all onboard equipment.
[0004] To compensate for the transmission delay of star sensor attitude information and to provide a time reference for ground station telemetry information analysis, it is necessary to accurately timestamp the attitude information output by the star sensor. Typically, spacecraft provide a unified time reference for each individual unit through second pulse signals and time broadcast information. This second pulse signal and time broadcast information (i.e., external time information) can be used to synchronize the internal time information of the star sensor, and the internal time information of the star sensor is used for timekeeping to ensure that the timestamp output by the star sensor remains valid and reliable even if the external time information is lost or malfunctions. Based on this, the star sensor output time synchronization method proposed in this invention has the advantages of simple programming, reliable synchronization, and accurate timekeeping, and is suitable for star sensor equipment. Summary of the Invention
[0005] This invention provides a method for synchronizing the output time of a star sensor to solve the problem of star sensor output time synchronization.
[0006] A method for synchronizing the output time of a star sensor, comprising the following steps:
[0007] Step 1: Simultaneously input the second pulse signal and time broadcast information into the UTC time module and the internal time module;
[0008] Step 2: Within the UTC time module, if a second pulse signal is received, a UTC second count is performed, i.e., the UTC second is incremented by 1. Then, the validity of the UTC time signal identifier is determined based on the second pulse time interval, and this signal is output to the time output module. Simultaneously, upon receiving the second pulse, the microsecond count starts from zero, with a maximum count value of 999999 microseconds. Within the UTC time module, time broadcast information is detected in parallel. If time broadcast information is received, it is compared with the time difference of the second pulse signal, and a decision is made on whether to update the UTC second based on the comparison result.
[0009] Step 3: Within the internal time module, upon power-on, the internal time microsecond count begins, incrementing by 1 microsecond. After exceeding 999,999 microseconds, the internal time second count is incremented by 1, and the microsecond count restarts from zero, repeating this process in a loop. Simultaneously, the module detects second pulse signals in parallel. If a second pulse signal is received, it determines whether the second pulse is valid based on the first detection or the pulse interval being greater than or equal to 60 seconds, and decides whether to reset the microsecond count to zero based on this identifier. It also detects time broadcast information in parallel. If time broadcast information is received, it determines whether to update the internal time second based on the second pulse identifier and the time interval between the second pulses.
[0010] Step 4: In the time output module, based on the UTC time signal identifier, select whether to output UTC seconds plus milliseconds or output internal time seconds plus milliseconds.
[0011] The beneficial effects of this invention are as follows: In the absence of an external second pulse signal and time broadcast information, the star sensor utilizes its own clock to output internal time information, composed of seconds plus milliseconds. If a valid external second pulse signal and time broadcast information are received, the star sensor outputs standard UTC time information and synchronizes its internal time information to UTC. If the external second pulse signal and time broadcast information are lost, the star sensor quickly switches to its internal time information output. The time information output by the star sensor can quickly and reliably switch between its internal time (already synchronized) and UTC time, effectively solving the synchronization problem of the star sensor's output time information.
[0012] The method of the present invention synchronizes the internal time information of the star sensor with the externally input time information, and when the external time information is lost, the output internal time information can still be used as a timestamp for the star sensor's attitude output information.
[0013] In this invention, the internal and external time information is synchronized every 60 seconds. This avoids the problem of excessive time difference between the internal and external time information caused by clock drift after the internal crystal oscillator has been running for a long time. It also avoids the need for synchronization every second, which would increase processor overhead and waste resources. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram illustrating the working timing of the UTC module time module and the internal time module in the star sensor output time synchronization method described in this invention.
[0016] Figure 2 A schematic diagram showing the relationships between each module and its signal flow;
[0017] Figure 3 A flowchart for detecting the second pulse signal using a UTC time module;
[0018] Figure 4 A flowchart for detecting time broadcast information using a UTC time module;
[0019] Figure 5 A flowchart illustrating the microsecond counting process after the internal time module is powered on;
[0020] Figure 6 A flowchart illustrating the detection of the second pulse signal by the internal time module;
[0021] Figure 7 A flowchart for detecting time broadcast information for the internal time module;
[0022] Figure 8 This is a flowchart for the time output module. Detailed Implementation
[0023] Combination Figures 1 to 8 This embodiment describes a method for synchronizing the output time of a star sensor. This method utilizes the operating timing of the star sensor's UTC time module and internal time module, such as... Figure 1 As shown, the timing relationship between the UTC time module and the internal time module is clearly defined. Furthermore, the working principle is explained by analyzing the internal workflow of the UTC time module, the internal time module, and the time output module. The specific method is implemented through the following steps:
[0024] I. For example Figure 2 As shown, the second pulse signal and time broadcast information are simultaneously input to the UTC time module and the internal time module. The UTC time module and the internal time module output their respective time in seconds plus microseconds, which, together with the UTC time signal identifier, are input to the time output module. That is, the UTC time module outputs UTC seconds + microseconds and the UTC time signal identifier; the internal time module outputs internal time in seconds + microseconds.
[0025] 2. Within the UTC time module, the UTC seconds are first initialized to zero. If a second pulse signal is received, the UTC seconds are incremented by 1. Next, the validity of the UTC time signal identifier is determined based on the time interval of the second pulse signal. If the time interval is greater than 1001ms, the UTC time signal identifier is invalid; otherwise, it is valid, and the system returns to the second pulse detection state, simultaneously outputting the UTC time signal identifier to the time output module. Upon receiving a second pulse, the microseconds are reset to zero and counted from zero until the maximum value of 999999 microseconds is reached, after which the system returns to the second pulse detection state.
[0026] Within the UTC time module, time broadcast information is detected in parallel. If time broadcast information is received, it is first decoded, and the received time of the time broadcast information is compared with the received time of the second pulse signal. If the time difference is ≤5ms, the UTC seconds are updated to the seconds in the time broadcast information; otherwise, the UTC seconds are not updated.
[0027] like Figure 3 and Figure 4 As shown, in this embodiment, the specific workflow of the UTC time module is as follows:
[0028] Step A1: First, initialize UTC seconds to zero;
[0029] Step A2: Determine if a second pulse signal is received. If yes, increment the UTC second by 1 and proceed to step A3. Simultaneously with receiving the second pulse, set the microsecond to 0 and proceed to step A4. Otherwise, continue the detection.
[0030] Step A3: Determine if the time interval of the second pulse signal is greater than 1001ms. If so, the UTC time signal identifier is 0 (invalid), and return to step A2; simultaneously, output the UTC time signal identifier to the time output module. Otherwise, the UTC time signal identifier is 1 (valid), and return to step A2; simultaneously, output the UTC time signal identifier to the time output module.
[0031] Step A4: Set the microseconds and start counting from zero, i.e.: microseconds + 1;
[0032] Step A5: Determine if the microsecond count is greater than 999999 microseconds. If so, set the microsecond count to 999999 and return to step A2; otherwise, return to step A4.
[0033] Figure 4 In the process, the UTC time module detects the second pulse signal while simultaneously detecting the time broadcast information, and determines whether the time broadcast information has been received. If so, step A6 is executed; otherwise, the detection continues.
[0034] Step A6: Determine whether the time difference between the received time broadcast information and the received second pulse signal is less than or equal to 5ms. If so, update the UTC seconds to the seconds in the time broadcast information and return to continue detecting time broadcast information. Otherwise, return to continue detecting time broadcast information.
[0035] 3. Within the internal time module, upon power-up, the internal time seconds and microseconds are first reset to zero. Then, the internal time microseconds are incremented by 1. After exceeding 999,999 microseconds, the internal time seconds are incremented by 1, and the microseconds are reset to zero, repeating this process cyclically. Simultaneously, the module detects second pulse signals in parallel. If a second pulse signal is received, it determines whether it is the first time it has been received. If so, the microseconds are reset to zero, and the second pulse flag is set to 1. If it is not the first time a second pulse has been received, it checks whether the pulse interval is ≥60 seconds. If yes, the microseconds are reset to zero, and the second pulse flag is set to 1; otherwise, it returns to the second pulse detection state.
[0036] In this module, time broadcast information is detected in parallel. If time broadcast information is received, the second pulse flag is checked to see if it is 1. If it is, the time interval between the time broadcast information reception time and the second pulse reception time is checked. If it is ≤5ms, the internal time seconds are updated to UTC seconds, that is, the internal time seconds are synchronized with UTC seconds, and the second pulse flag is set to zero. Otherwise, the system returns to the state of detecting time broadcast information.
[0037] Combination Figures 5 to 7 The specific flow of the internal modules in this implementation method is as follows:
[0038] Step B1: After power-on, the internal time of the internal module is 0 seconds and 0 microseconds.
[0039] Step B2: Increment the microsecond by 1;
[0040] Step B3: Determine if the number of microseconds is greater than 999999. If it is, increment the internal time in seconds by 1, set the number of microseconds to 0, and return to step B2; otherwise, return to step B2.
[0041] like Figure 6 As shown, the second pulse signal is detected simultaneously and in parallel within the internal module;
[0042] Step C1: Determine if a second pulse signal has been received. If yes, proceed to step C2; otherwise, continue the detection.
[0043] Step C2: Determine if the second pulse signal is received for the first time. If yes, proceed to step C3; otherwise, proceed to step C4.
[0044] Step C3, microseconds = 0, second pulse flag = 1, return to step C1;
[0045] C4. Determine if the pulse signal interval is greater than or equal to 60s. If yes, proceed to step C3; otherwise, return to step C1.
[0046] like Figure 7 As shown, time broadcast information is detected simultaneously and in parallel within the internal module;
[0047] Step D1: Determine if a time broadcast message has been received. If yes, proceed to step D2; otherwise, continue the detection.
[0048] Step D2: Determine if the second pulse flag is 1. If it is, proceed to step D3; otherwise, return to step D1.
[0049] Step D3: Determine whether the time interval between the time of receiving the broadcast information and the time of receiving the second pulse is less than or equal to 5ms. If so, set the internal time seconds to UTC seconds and the second pulse flag to 0, then return to step D1.
[0050] IV. Within the time output module, if the UTC time signal flag is 1, it outputs UTC seconds plus milliseconds; if the UTC time signal flag is 0, it outputs internal time seconds plus milliseconds. That is, if the second pulse and time broadcast information are valid, it outputs UTC seconds and milliseconds, and the internal time module has the function of synchronizing UTC seconds. If the second pulse and time broadcast information are invalid, it outputs internal time seconds and milliseconds, and the internal time module implements the function of keeping time.
[0051] like Figure 8 As shown, the working steps of the time output module are as follows:
[0052] Step E1: The time output module determines whether the UTC time signal identifier is 1. If it is, proceed to step E2; otherwise, proceed to step E3.
[0053] Step E2: Output UTC seconds + milliseconds, then return to step E1;
[0054] Step E3: Output the internal time in seconds + milliseconds, then return to step E2.
[0055] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0056] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for synchronizing the output time of a star sensor, characterized in that: This method is implemented by the following steps: Step 1: Simultaneously input the second pulse signal and time broadcast information into the UTC time module and the internal time module; Step 2: The UTC time module detects the second pulse signal. If a second pulse signal is received, it performs UTC second counting; then, it determines whether the UTC time signal identifier is valid based on the size of the second pulse signal time interval. While detecting the second pulse signal, the time broadcast information is detected in parallel. If the time broadcast information is received, the time difference between the time of the received time broadcast information and the time difference between the time of the received second pulse signal is compared, and the UTC second is updated based on the comparison result. In step two, upon receiving the second pulse signal, the microsecond count starts from zero. When the maximum count reaches 999999 microseconds, the system returns to the state of detecting the second pulse signal. The validity of the UTC time signal identifier is determined based on the size of the second pulse signal time interval. If the time interval is greater than 1001ms, the UTC time signal identifier is invalid; otherwise, the UTC time signal identifier is valid, and the status of detecting the second pulse signal is returned. Step 3: In the internal time module, after power-on, the internal time microsecond count begins. When the microsecond count exceeds 999999 microseconds, the internal time second count is incremented by 1, and the microsecond count starts from zero again. This counting process is repeated cyclically. Simultaneously detect the second pulse signal in parallel. If the second pulse signal is received, determine whether it is the first time the second pulse signal has been received. If it is the first time the second pulse signal has been received, set the microsecond to zero and the second pulse flag to 1. If this is not the first time a second pulse signal has been received, then check if the pulse signal interval is ≥60 seconds. If it is, then set the microsecond to zero and the second pulse flag to 1. If not, then return to the state of detecting the second pulse signal. Simultaneously detect time broadcast information. If time broadcast information is received, check if the second pulse flag is 1. If so, check the time interval between the time broadcast information reception time and the second pulse reception time. If it is ≤5ms, update the internal time seconds to UTC seconds, that is, synchronize the internal time seconds with UTC seconds, and set the second pulse flag to zero. Otherwise, return to the state of detecting time broadcast information. Step 4: Input the UTC seconds plus microseconds output by the UTC time module in Step 2, the UTC time signal identifier, and the internal time seconds plus microseconds output by the internal time module in Step 3 to the time output module. The time output module selects to output UTC seconds plus milliseconds or output internal time seconds plus milliseconds based on the UTC time signal identifier.
2. The star sensor output time synchronization method according to claim 1, characterized in that: In step two, if a time broadcast message is received, the time broadcast message is first decoded, and the difference between the received time of the time broadcast message and the received time of the second pulse signal is compared. If the time difference is ≤5ms, the UTC seconds are updated to the seconds in the time broadcast message; otherwise, the UTC seconds are not updated.
3. The star sensor output time synchronization method according to claim 1, characterized in that: In step three, time broadcast information is detected in parallel. The specific steps are as follows: Step D1: Determine if a time broadcast message has been received. If yes, proceed to step D2; otherwise, continue the detection. Step D2: Determine if the second pulse flag is 1. If it is, proceed to step D3; otherwise, return to step D1. Step D3: Determine whether the time interval between the receiving time of the detection time broadcast information and the receiving time of the second pulse is less than or equal to 5ms. If so, set the internal time seconds to UTC seconds and the second pulse flag to 0, then return to step D1. Otherwise, return to step D1.
4. The star sensor output time synchronization method according to claim 1, characterized in that: In step four, the specific steps implemented by the time output module are as follows: Step E1: The time output module determines whether the UTC time signal identifier is 1. If it is, proceed to step E2; otherwise, proceed to step E3. Step E2: Output UTC seconds + milliseconds, then return to step E1; Step E3: Output the internal time in seconds + milliseconds, then return to step E2.
Citation Information
Patent Citations
Satellite time synchronization system
CN102882586A
Air interface timing method, terminal, and system
WO2023040889A1