Star sensor output time synchronization method
By synchronously processing the second pulse signal and time broadcast information, the problem of inconsistency between the internal and external time of the star sensor is solved, and the accuracy and reliability of the star sensor output timestamp is achieved, ensuring the accuracy of the aircraft attitude control and telemetry analysis. .
Patent Information
- Application Number
- CN202411435815.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-15
Smart Images

Figure CN119316086A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of star sensor time synchronization, and in particular to a method for synchronizing, punctualizing and outputting internal and external time of a star sensor. Background Art
[0002] Star sensors are a common attitude measurement device for spacecraft. Their high-precision and high-reliability attitude information provides a reliable data source for spacecraft. Normally, star sensors periodically and continuously provide attitude information to the attitude control system of spacecraft, and the attitude control system controls the actuators of the spacecraft after relevant calculations. In order to ensure the accuracy and effectiveness of the control, the attitude data output by the star sensor needs to be stamped with a corresponding timestamp (i.e., on-board time information), and at the same time provide a time reference for subsequent telemetry data analysis. However, due to the different power-on working times of each unit on the satellite, there is no unified time reference for their operation.
[0003] There are two sources of time information for star sensors. One is the internal time information generated by its internal crystal oscillator, and the other is the external input second pulse signal and its accompanying time information (defined as external time information). The starting moment of the internal time information is the moment when the crystal oscillator works after the star sensor is powered on. Its time information is relative and is not synchronized with the time of other single machines on the spacecraft. The other is to receive the external input second pulse signal and its accompanying time information (usually the relevant time information output by the satellite navigation system), which serves as the time reference for all onboard equipment.
[0004] In order to compensate for the transmission delay of the attitude information of the star sensor and provide a time reference for the telemetry information analysis of the ground station, it is necessary to stamp the attitude information output by the star sensor with an accurate time stamp. Under normal circumstances, the spacecraft will provide a unified time reference for each single machine through a second pulse signal 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 time information inside the star sensor is used for timekeeping, so that when the external time information is lost or fails, the time stamp output by the star sensor is still valid and reliable. Based on this, the star sensor output time synchronization method proposed by the present invention has the advantages of simple programming, reliable synchronization, accurate timekeeping, etc., and is suitable for star sensor equipment. Summary of the invention
[0005] The invention provides a star sensor output time synchronization method to solve the problem of star sensor output time synchronization.
[0006] A method for synchronizing the output time of a star sensor is implemented by the following steps:
[0007] Step 1: Input the pulse-per-second signal and time broadcast information into the UTC time module and the internal time module simultaneously;
[0008] Step 2: In the UTC time module, if a second pulse signal is received, the UTC second is counted, that is, the UTC second is increased by 1; then the UTC time signal identifier is determined to be valid according to the second pulse time interval, and the signal is output to the time output module; at the same time as the second pulse is received, the microsecond is counted from zero, and the maximum count value is 999999 microseconds; in the UTC time module, the time broadcast information is detected in parallel, and if the time broadcast information is received, it is compared with the time difference of the second pulse signal, and whether to update the UTC second is determined according to the comparison result;
[0009] Step 3: In the internal time module, the internal time microsecond count starts as soon as the power is turned on, and the microsecond count increases by 1. After exceeding 999999 microseconds, the internal time second increases by 1, and the microsecond count starts from zero again, and this process is repeated in a cycle; at the same time, the second pulse signal is detected in parallel. If a second pulse signal is received, it is determined that the first detection or the pulse interval is greater than or equal to 60 seconds, so as to define whether the second pulse is valid, and whether to clear the microsecond count is determined based on this identifier; the time broadcast information is detected in parallel. If the time broadcast information is received, it is determined whether to update the internal time second based on the second pulse identifier and the time interval with the second pulse;
[0010] Step 4: In the time output module, choose to output UTC seconds plus milliseconds or internal time seconds plus milliseconds according to the UTC time signal identifier.
[0011] Beneficial effects of the present invention: In the absence of an external second pulse signal and time broadcast information, the star sensor uses its own clock to output the time information inside the star sensor, and the time information consists 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 the internal time information to the UTC time information. If the external second pulse signal and time broadcast information are lost, the star sensor quickly switches to outputting the internal time information. The time information output by the star sensor can be quickly and reliably switched between the internal time (which has been synchronized) and the UTC time, effectively solving the synchronization problem of the time information output by the star sensor.
[0012] The method of the present invention synchronizes the internal time information of the star sensor with the external input time information, and when the external time information is lost, the output internal time information can still be used as the timestamp of the attitude output information of the star sensor.
[0013] In the method of the present invention, the internal time information and the external time information are synchronized once every 60 seconds, which avoids the problem of excessive time difference between the internal time information and the external time information caused by clock drift after the internal crystal oscillator has been running for a long time. There is no need to synchronize every second, which will increase the processor overhead and cause resource waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0015] Figure 1 A schematic diagram of the working sequence of the UTC module time module and the internal time module in a method for synchronizing the output time of a star sensor according to the present invention;
[0016] Figure 2 It is a schematic diagram of the relationship between each module and its signal flow;
[0017] Figure 3 Flowchart for detecting second pulse signal for UTC time module;
[0018] Figure 4 Flowchart for detecting time broadcast information for the UTC time module;
[0019] Figure 5 Flow chart for counting microseconds after the internal time module is powered on;
[0020] Figure 6 Flow chart for detecting second pulse signal for internal time module;
[0021] Figure 7 Flowchart for detecting time broadcast information for internal time module;
[0022] Figure 8 Flowchart of the time output module. DETAILED DESCRIPTION
[0023] Combination Figures 1 to 8 This embodiment describes a method for synchronizing the output time of a star sensor, through the working sequence of the UTC time module and the internal time module of the star sensor, such as Figure 1 As shown, the working sequence relationship between the UTC time module and the internal time module is clarified. The working principle is further explained through the internal working process of the UTC time module, the internal time module and the time output module. The specific method is implemented by the following steps:
[0024] 1. If Figure 2 As shown, the second pulse signal and the time broadcast information are simultaneously input into the UTC time module and the internal time module, and the UTC time module and the internal time module output their respective time seconds plus microseconds, and then input into the time output module together with the UTC time signal identifier; that is, the UTC time module outputs UTC seconds + microseconds, and the UTC time signal identifier; the internal time module outputs internal time seconds + microseconds;
[0025] 2. In the UTC time module, first initialize the UTC second to zero. If a second pulse signal is received, the UTC second is increased by 1. Then determine whether the UTC time signal identifier is valid 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 returns to the second pulse detection state. At the same time, the UTC time signal identifier is output to the time output module. When the second pulse is received, the microsecond is reset to zero and counts from zero. The count ends at the maximum value of 999999 microseconds and returns to the second pulse detection state.
[0026] In the UTC time module, the time broadcast information is detected in parallel. If the time broadcast information is received, the time broadcast information is decoded first, and the difference between the reception time of the time broadcast information and the reception time of the second pulse signal is compared. If the time difference is ≤5ms, the UTC second is updated to the second in the time broadcast information, otherwise the UTC second is not updated;
[0027] like Figure 3 and Figure 4 As shown, in this implementation, the specific workflow of the UTC time module is:
[0028] Step A1, first initialize UTC seconds = zero;
[0029] Step A2, determine whether a second pulse signal is received, if yes, UTC second + 1, execute step A3; when receiving the second pulse, set microsecond = 0, execute step A4; otherwise, continue detection;
[0030] Step A3, determine whether the time interval of the second pulse signal is greater than 1001ms. If so, the UTC time signal identifier is 0 and invalid, and return to step A2; at the same time, the UTC time signal identifier is output to the time output module. Otherwise, the UTC time signal identifier is 1 and valid, and return to step A2; at the same time, the UTC time signal identifier is output to the time output module.
[0031] Step A4, set the microseconds and start counting from zero, i.e.: microseconds + 1;
[0032] Step A5, determine whether the microsecond count is greater than 999999 microseconds, if so, set microseconds = 999999 and return to step A2; otherwise, return to step A4;
[0033] Figure 4 In the process, the UTC time module detects the time broadcast information in parallel while determining the detection of the second pulse signal to determine whether the time broadcast information is received. If so, execute step A6; otherwise, continue to detect;
[0034] Step A6: Determine whether the time difference between the time when the time broadcast information is received and the time when the second pulse signal is received 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 the time broadcast information. Otherwise, return to continue detecting the time broadcast information.
[0035] 3. In the internal time module, when the power is turned on, the internal time seconds and microseconds are reset to zero, and then the internal time microseconds are counted by 1. When it exceeds 999999 microseconds, the internal time seconds are incremented by 1, and the microseconds are counted from zero again, and this process is repeated in a cycle. In this module, the second pulse signal is detected in parallel. If a second pulse signal is received, it is determined whether it is the first time to receive the second pulse. If it is the first detection, the microsecond is reset to zero and the second pulse flag is set to 1. If it is not the first time to receive the second pulse, it is determined whether the pulse interval is ≥ 60 seconds. If so, the microsecond is reset to zero and the second pulse flag is set to 1. If not, it returns to the second pulse detection state.
[0036] In this module, the time broadcast information is detected in parallel. If the time broadcast information is received, the second pulse flag is detected to see if it is 1. If so, the time interval between the time broadcast information reception time and the second pulse reception time is detected. If it is ≤5ms, the internal time second is updated to UTC second, that is, the internal time second is synchronized with the UTC second, and the second pulse flag is set to zero. Otherwise, it returns to the time broadcast information detection state.
[0037] Combination Figures 5 to 7 To illustrate this implementation, the specific process of the internal module is as follows:
[0038] Step B1, after power-on, the internal time of the internal module is seconds = 0, microseconds = 0;
[0039] Step B2, add 1 to microseconds;
[0040] Step B3, determine whether the number of microseconds is greater than 999999, if so, internal time seconds + 1, microseconds = 0, return to step B2; otherwise, return to step B2;
[0041] like Figure 6 As shown, in the internal module, the pulse-per-second signals are detected in parallel at the same time;
[0042] Step C1, determine whether a pulse-per-second signal is received, if yes, execute step C2, otherwise, continue detection;
[0043] Step C2, determine whether the second pulse signal is received for the first time, if yes, execute step C3; otherwise, execute step C4;
[0044] Step C3, microseconds = 0, second pulse flag = 1, return to step C1;
[0045] C4, determine whether the pulse signal interval is greater than or equal to 60s, if yes, execute step C3; otherwise, return to step C1;
[0046] like Figure 7 As shown, in the internal module, the time broadcast information is detected in parallel at the same time;
[0047] Step D1, determine whether the time broadcast information is received, if yes, execute step D2, otherwise, continue detection;
[0048] Step D2, determine whether the second pulse flag is 1, if yes, execute step D3, otherwise, continue to return to step D1;
[0049] Step D3, determine whether the time interval between the detection time broadcast information reception time and the second pulse reception time is less than or equal to 5ms, if so, set the internal time second = UTC second, and the second pulse flag = 0, and return to step D1.
[0050] 4. In the time output module, if the UTC time signal is marked as 1, the UTC seconds plus milliseconds are output, and if the UTC time signal is marked as 0, the internal time seconds plus milliseconds are output. That is, if the second pulse and time broadcast information are valid, the UTC seconds and milliseconds information are output, and the internal time module has the function of synchronizing UTC seconds. If the second pulse and time broadcast information are invalid, the internal time seconds and milliseconds are output, and the internal time module realizes the function of punctuality.
[0051] like Figure 8 As shown, the working steps of the time output module are:
[0052] Step E1, the time output module determines whether the UTC time signal identifier is 1, if yes, execute step E2; otherwise, execute step E3;
[0053] Step E2, output UTC seconds + milliseconds, and return to step E1;
[0054] Step E3: Output the internal time in seconds + milliseconds, and return to step E2.
[0055] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned 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 above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for synchronizing the output time of a star sensor, characterized in that: The method is implemented by the following steps: Step 1: Input the pulse-per-second signal and time broadcast information into the UTC time module and the internal time module simultaneously; Step 2: The UTC time module detects the second pulse signal. If a second pulse signal is received, the UTC second count is performed; and then the UTC time signal identifier is determined to be valid according to the time interval of the second pulse signal; While detecting the second pulse signal, the time broadcast information is detected in parallel. If the time broadcast information is received, the time when the time broadcast information is received is compared with the time difference when the second pulse signal is received, and whether to update the UTC second is selected according to the comparison result; Step 3: In the internal time module, after power-on, the internal time microseconds are counted. When the microsecond count exceeds 999999 microseconds, the internal time seconds are increased by 1, and the microsecond count starts from zero again, and this counting process is repeated in a cycle. At the same time, the second pulse signal is detected in parallel. If the second pulse signal is received, it is determined whether the second pulse signal is received for the first time. If the second pulse signal is received for the first time, the microsecond is set to zero and the second pulse flag is set to 1. If it is not the first time to receive a second pulse signal, determine whether the pulse signal interval is ≥ 60 seconds. If so, set the microsecond to zero and the second pulse flag to 1. If not, return to the state of detecting the second pulse signal. At the same time, the time broadcast information is detected in parallel. If the time broadcast information is received, the second pulse flag is detected to see if it is 1. If so, the time interval between the time broadcast information reception time and the second pulse reception time is detected. If it is ≤5ms, the internal time second is updated to UTC second, that is, the internal time second is synchronized with the UTC second, and the second pulse flag is set to zero; otherwise, all return to the state of detecting the time broadcast information; Step 4: The UTC seconds plus microseconds output by the UTC time module in step 2, as well as the UTC time signal identifier, and the internal time seconds plus microseconds output by the internal time module in step 3 are simultaneously input into the time output module. The time output module chooses to output UTC seconds plus milliseconds or internal time seconds plus milliseconds according to the UTC time signal identifier.
2. A method for synchronizing star sensor output time according to claim 1, characterized in that: In step 2, when the second pulse signal is received, the microsecond count starts from zero, and when the maximum count value reaches 999999 microseconds, the state of detecting the second pulse signal is returned.
3. A method for synchronizing star sensor output time according to claim 1, characterized in that: In step 2, 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, the UTC time signal identifier is valid and the status of detecting the second pulse signal is returned.
4. A method for synchronizing star sensor output time according to claim 1, characterized in that: In step 2, if time broadcast information is received, the time broadcast information is decoded first, and the reception time of the time broadcast information is compared with the reception 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.
5. A method for synchronizing star sensor output time according to claim 1, characterized in that: In step 3, the time broadcast information is detected in parallel. The specific steps are: Step D1, determine whether the time broadcast information is received, if yes, execute step D2, otherwise, continue detection; Step D2, determine whether the second pulse flag is 1, if yes, execute step D3, otherwise, return to step D1; Step D3, determine whether the time interval between the detection time broadcast information reception time and the second pulse reception time is less than or equal to 5ms, if so, set the internal time second = UTC second, and the second pulse flag = 0, and return to step D1; Otherwise, return to step D1.
6. A method for synchronizing star sensor output time according to claim 1, characterized in that: In step 4, the specific steps implemented by the time output module are: Step E1, the time output module determines whether the UTC time signal identifier is 1, if yes, execute step E2; otherwise, execute step E3; Step E2, output UTC seconds + milliseconds, and return to step E1; Step E3: Output the internal time in seconds + milliseconds, and return to step E2.
Citation Information
Patent Citations
Satellite time synchronization system
CN102882586A
Air interface timing method, terminal, and system
WO2023040889A1