A high-performance co-processing method for an extremely high-precision pointing measurement instrument
By adopting a dual-processor architecture and a unidirectional data bus transceiver mode, the communication anomaly problem in the master-slave processor data interaction in the star sensor was solved, ensuring the data update rate and communication stability, and improving the accuracy and performance of data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INST OF CONTROL ENG
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-26
AI Technical Summary
In the existing technology, the ultra-high precision star sensor using a single SOC2018 processor cannot process all software algorithms while ensuring the data update rate, and the data interaction between the master and slave processors is prone to mutual interference, leading to communication abnormalities.
A dual-processor architecture is adopted, dividing the software algorithm into real-time and non-real-time algorithms. The main processor processes the real-time algorithm and communicates with the outside world. Data interaction is carried out using the spacewire bus. By setting the data bus to a one-way transmission and reception mode, the main processor periodically starts data interaction tasks to determine the correctness and sequence number of the received data, so as to avoid duplicate or lost data.
This ensures that data interaction between the master and slave processors does not affect the master processor's external data update rate, thus guaranteeing the stability and correctness of communication and improving the accuracy and performance of data processing.
Smart Images

Figure CN122285586A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a high-performance collaborative processing method for an ultra-high precision pointing measurement instrument, belonging to the field of star sensor technology. Background Technology
[0002] On-orbit star sensors all use embedded processors with aerospace-grade reliability, with the SOC2018 processor currently offering the highest performance. However, for products with extremely high precision, such as milliarcsecond-level star sensors, the software involves numerous complex algorithms to meet accuracy requirements. Simultaneously, the product must maintain a high data update rate to ensure normal user operation. A single SOC2018 processor cannot handle all software algorithms while guaranteeing the update rate; therefore, a dual-processor architecture is used. The software algorithms are divided into real-time algorithms, which are the basic functions the product must complete each cycle and output valid data; and non-real-time algorithms, which acquire on-orbit data and process it to obtain better algorithm parameters and templates related to the real-time algorithms mentioned above, improving the performance and accuracy of the real-time algorithms. The dual processors consist of a master and a slave processor. The master processor handles the real-time algorithms and communicates externally, ensuring the product's real-time update rate requirements. The slave processor handles the non-real-time algorithms and transmits the calculation results to the master processor via a data bus for optimization and updating of the real-time algorithms. For the SOC2018 processor, the communication data bus uses the on-chip integrated Spacewire bus, which is the bus with the fastest data transmission rate among on-chip integrated data buses. It can be set to full-duplex bidirectional simultaneous transmit and receive mode, but this mode is prone to mutual interference between transmit and receive, which can lead to communication abnormalities. Summary of the Invention
[0003] The technical problem solved by this invention is to overcome the shortcomings of existing technologies and provide a high-performance collaborative processing method for extremely high-precision pointing measurement instruments. This method ensures that data interaction between master and slave processors does not affect the data update rate of the master processor.
[0004] The technical solution provided by this invention is as follows: This invention discloses a high-performance collaborative processing method for an ultra-high precision pointing measurement instrument, comprising: S1. Instruct the main processor of the measuring instrument to periodically start a data interaction task at regular intervals. S2. The main processor determines whether there is a timeout task. If so, it exits the data interaction task and proceeds to step S6; otherwise, it executes the data interaction task and triggers an interrupt from the slave processor, proceeding to step S3. S3, the main processor and the slave processor exchange data; S4. The main processor and the slave processor determine whether the received data is correct. If it is, the received data is stored and processed, and the process proceeds to step S6; otherwise, the process proceeds to step S5. S5. Determine whether the received data is multi-cycle data. If so, process it according to the packet sequence number of the received data and proceed to step S6; otherwise, discard the received data and proceed to step S6. S6, Exit.
[0005] Furthermore, in the above method, the main processor and the slave processor interact with each other, and the working process of the main processor is as follows: S21. Determine whether to execute the task; if yes, proceed to step S22; otherwise, proceed to step S27. S22. Determine if the bus is connected normally; if yes, proceed to step S23; otherwise, proceed to step S27. S23. Send one or more frames of data to the slave processor and proceed to step S24. S24. Has data been received from the processor? If yes, proceed to step S25; otherwise, proceed to step S26. S25. Receive data from the processor and determine the amount of data; S26. Wait to see if the timeout has occurred; if yes, proceed to step S27; otherwise, proceed to step S24. S27, End.
[0006] Furthermore, in the above method, the main processor and the slave processor interact with each other, and the slave processor's operation process is as follows: S31, Receive data sent by the main processor; S32. Has enough data been received? If yes, proceed to step S33; otherwise, end. S33, Send data to the main processor.
[0007] Furthermore, in the above method, the main processor and the slave processor determine whether the received data is correct by means of: Get the sequence number of the received data packet in the current frame; Determine if the sequence number of the received data packet in the current frame is equal to the sequence number of the data packet that should be received; if yes, the received data is correct; otherwise, the received data is incorrect.
[0008] Furthermore, in the above method, the processing based on the packet sequence number of the received data specifically includes: If the sequence number of the packet is greater than the sequence number of the data packet that should be received, the received data is discarded, and the other processor is notified to resend a data packet with the same sequence number as the data packet that should be received. If the sequence number of the packet is less than the sequence number of the data packet that should be received, the received data is discarded.
[0009] Furthermore, in the above method, the master or slave processor sends multiple frames of data to the other processor, specifically as follows: S61. Initialize the sequence number idxnow for sending data; S62. Determine whether a retransmission message has been received from the other party's processor; if yes, send the data packet to be retransmitted and set idxnow to the sequence number of the retransmitted data packet; if no, send the idxnow-th data packet. S63, increment the serial number idxnow by 1; S64. Determine whether the data has been sent completely; if yes, end; if no, proceed to step S62.
[0010] Furthermore, in the above method, when the master processor and the slave processor interact with each other, the data bus is set to a one-way transmit / receive mode to avoid bus conflicts caused by simultaneous bidirectional transmission and reception.
[0011] Furthermore, in the above method, the data sent by the main processor and the slave processor in each cycle carries checksum information.
[0012] Furthermore, in the above method, the main processor of the measuring instrument has a multi-tasking architecture.
[0013] Advantages of this invention compared to existing technologies: (1) Compared with single-task software, this invention adopts a multi-task design, which can divide the data interaction function between the main processor and the slave processor into a separate task on the main processor, without coupling with other tasks; at the same time, the task can be set to start at a fixed time in each cycle. Under normal circumstances, when the task is started, the main processor should have finished executing the current cycle and other tasks should be in an idle state. If other tasks time out in a certain cycle, the task of data interaction with the slave processor can be abandoned without affecting the external data update rate of the main processor. At the same time, if the data interaction task is executed, the task can be forcibly exited by setting a maximum execution time to prevent abnormal situations such as communication errors with the slave processor.
[0014] (2) Compared to continuously sending large amounts of data in multiple cycles, this invention designs to divide the data to be sent into packets and assigns a packet sequence number to each data packet, thereby ensuring that data packets are not received repeatedly or lost, thus preventing data transmission errors. In each cycle, the master and slave processors can determine whether the sequence number of the data packet sent by the other processor is the same as the sequence number of the data packet that the processor should receive before receiving it, so as to avoid receiving data packets repeatedly. If a data packet is found to be lost, the corresponding information can be transmitted in the interactive data to notify the other processor to resend the data packet.
[0015] (3) This invention is applied to star sensors and can be extended to other similar dual-processor architecture embedded platforms.
[0016] (4) The present invention satisfies the requirement that data interaction between master and slave processors does not affect the data update rate of the master processor; ensures continuous, stable and normal communication function; and ensures the correctness and reliability of the interactive data. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the implementation of the present invention; Figure 2 This invention relates to a master-slave processor architecture; Figure 3 This invention provides the task and interrupt runtime sequence for the master and slave processors. Figure 4 This is the master-slave interaction task execution flow in this invention; Figure 5 This is the master-slave interaction interruption execution process in this invention; Figure 6 This describes the process by which the master or slave processor receives data packets sent in multiple frames per cycle in this invention. Figure 7 This describes the data packet transmission process in this invention, where the master or slave processor sends data packets in multiple frames per cycle. Detailed Implementation
[0018] This invention discloses a high-performance collaborative processing method for an ultra-high precision pointing measuring instrument, comprising: S1. Instruct the main processor of the measuring instrument to periodically start a data interaction task at regular intervals. S2. The main processor determines whether there is a timeout task. If so, it exits the data interaction task and proceeds to step S6; otherwise, it executes the data interaction task and triggers an interrupt from the slave processor, proceeding to step S3. S3, the main processor and the slave processor exchange data; S4. The main processor and the slave processor determine whether the received data is correct. If it is, the received data is stored and processed, and the process proceeds to step S6; otherwise, the process proceeds to step S5. S5. Determine whether the received data is multi-cycle data. If so, process it according to the packet sequence number of the received data and proceed to step S6; otherwise, discard the received data and proceed to step S6. S6, Exit.
[0019] Preferably, the main processor and the slave processor interact with each other, and the working process of the main processor is as follows: S21. Determine whether to execute the task; if yes, proceed to step S22; otherwise, proceed to step S27. S22. Determine if the bus is connected normally; if yes, proceed to step S23; otherwise, proceed to step S27. S23. Send one or more frames of data to the slave processor and proceed to step S24. S24. Has data been received from the processor? If yes, proceed to step S25; otherwise, proceed to step S26. S25. Receive data from the processor and determine the amount of data; S26. Wait to see if the timeout has occurred; if yes, proceed to step S27; otherwise, proceed to step S24. S27, End.
[0020] Preferably, the master processor and the slave processor interact with each other, and the slave processor's operation process is as follows: S31, Receive data sent by the main processor; S32. Has enough data been received? If yes, proceed to step S33; otherwise, end. S33, Send data to the main processor.
[0021] Preferably, the main processor and the slave processor determine whether the received data is correct, specifically as follows: Get the sequence number of the received data packet in the current frame; Determine if the sequence number of the received data packet in the current frame is equal to the sequence number of the data packet that should be received; if yes, the received data is correct; otherwise, the received data is incorrect.
[0022] Preferably, the data is processed according to the packet sequence number, specifically as follows: If the sequence number of the packet is greater than the sequence number of the data packet that should be received, the received data is discarded, and the other processor is notified to resend a data packet with the same sequence number as the data packet that should be received. If the sequence number of the packet is less than the sequence number of the data packet that should be received, the received data is discarded.
[0023] Preferably, the master or slave processor sends multiple frames of data to the other processor, specifically as follows: S61. Initialize the sequence number idxnow for sending data; S62. Determine whether a retransmission message has been received from the other party's processor; if yes, send the data packet to be retransmitted and set idxnow to the sequence number of the retransmitted data packet; if no, send the idxnow-th data packet. S63, increment the serial number idxnow by 1; S64. Determine whether the data has been sent completely; if yes, end; if no, proceed to step S62.
[0024] Preferably, when the master processor and slave processor interact with each other, the data bus is set to a one-way transmit / receive mode to avoid bus conflicts caused by simultaneous bidirectional transmission and reception.
[0025] Preferably, the data sent by the main processor and the slave processor in each cycle includes checksum information.
[0026] Preferably, the main processor of the measuring instrument has a multi-tasking architecture.
[0027] Example This embodiment proposes a high-performance collaborative processing method for ultra-high precision pointing measuring instruments. The main processor communicates externally and performs real-time algorithm processing to ensure the product's external update rate. The slave processor performs complex non-real-time algorithm processing and transmits the processing results to the main processor via a master-slave data bus, improving the performance and accuracy of the main processor's related algorithms. First, the following design ensures the main processor's real-time update rate: 1. The main processor software is designed as a multi-task architecture, where a task (master-slave interaction task) is periodically started to interact with the slave processor. This task triggers a data reception interrupt on the slave processor (master-slave interaction interrupt), and the slave processor ensures immediate response to the interrupt and completes data interaction with the main processor in the interrupt service routine. 2. A maximum execution time for the master-slave interaction task is set to ensure that the task can be forcibly exited. 3. At the time the master-slave interaction task is triggered each cycle, it is checked whether other tasks on the main processor (processing real-time algorithms, etc.) have timed out. If not, the task is executed; otherwise, it exits directly. Furthermore, the following design ensures the reliability of the master-slave interaction data: 1. Master-slave communication uses a unidirectional data bus transmission and reception method to avoid bus conflicts caused by simultaneous bidirectional transmission and reception; simultaneously, the slave processor periodically checks whether the communication is normal. Second, both the master and slave processors send data with checksum information to determine the correctness and integrity of data transmission. Third, data that needs to be sent in multiple cycles is divided into packets, each packet is assigned a sequence number, and this information is used to ensure that data packets are not received repeatedly or lost. The software architecture designed in this invention can be widely applied to embedded computer platforms using a master-slave dual-processor mode. Figure 2 As shown.
[0028] like Figure 1 As shown, the specific steps of the method in this embodiment are as follows: (1) Set the main processor software to multi-tasking mode, with one task being a master-slave interaction task; (2) Data interaction between the master and slave processors is performed using the on-chip integrated spacewire communication bus. The slave processor's spacewire communication bus data reception interrupt is enabled, the interrupt handling function (master-slave interaction interrupt) is attached, and its interrupt priority is set to the highest. (3) The main processor uses the on-chip timer to keep track of time. It records the timer time at the start of each running cycle and starts the master-slave interaction task after a fixed delay.
[0029] a) When the master-slave interaction task starts, it checks whether other tasks running on the master processor have timed out. If none of them have timed out and the master processor is in an idle state, the task is executed; otherwise, the task is exited directly. b) If a master-slave interaction task is executed, the system checks if the spacewire communication connection with the slave processor is normal and begins exchanging data with the slave processor, triggering a master-slave interaction interrupt on the slave processor. The slave processor immediately responds to this interrupt. The task and interrupt execution sequence of the master and slave processors is as follows: Figure 3 As shown.
[0030] (4) The master-slave communication adopts a one-way transmit / receive method to avoid bus conflicts caused by simultaneous bidirectional transmission and reception. After the master processor enters the master-slave interaction task, it immediately sends data to the slave processor, triggering a data reception interrupt on the slave processor. The master processor continuously sends the data required for each cycle. The slave processor determines that it has received enough data before sending data back to the master processor (or exits the interrupt if it determines that it has not received enough data). After the master processor finishes sending data, it checks whether the slave processor has sent and received data. If it determines that it has received enough data, the current data interaction task ends and exits. After the master-slave interaction task starts, the master processor continues to time it. If the maximum execution time set for the task is reached and the task is still in progress, the task is forcibly terminated. The execution flowchart of the master-slave interaction task of the master processor is as follows: Figure 4 As shown, the flowchart of the master-slave interaction interrupt execution process of the processor is as follows: Figure 5 As shown.
[0031] (5) The processor periodically checks the status of the spacewire bus registers during the task to check for any abnormalities such as data transmission blockage. If any abnormality is found, a recovery operation is performed to ensure normal communication with the main processor.
[0032] (6) The data sent by the master and slave processors in each cycle are accompanied by checksum information to determine the correctness of the data transmission and prevent situations such as single-event knockout and abnormal communication interruption.
[0033] (7) Data sent in multiple cycles is packetized, with each packet carrying a sequence number. Both the master and slave processors must determine whether the sequence number of the data packet received in the current cycle matches the sequence number of the data packet that their processor should receive before receiving it, in order to avoid duplicate data reception. If a data packet is lost, the corresponding information is transmitted in the interactive data to notify the other party to resend the data packet. (See below) Figure 6As shown, idxpre is the sequence number of the data packet that the master or slave processor should receive each cycle, and idxnow is the sequence number of the data packet received by the master or slave processor from the other party each cycle. If idxnow equals idxpre, it means the received data packet is correct, the data packet is processed, and idxpre is incremented by 1; if they are not equal, there are two cases: if idxnow is less than idxpre, it means the data packet has already been received and is discarded directly; if idxnow is greater than idxpre, it means a data packet was lost during transmission, and the corresponding flag is set in the interaction information with the other processor to notify the other processor to resend the idxpre data packet. Corresponding to the data packet receiving process, the flowchart of the master or slave processor sending data packets in multiple frames each cycle is as follows: Figure 7 As shown.
[0034] In practice, after testing on star sensor products under various operating conditions, the software architecture designed in this invention can continuously ensure that the main processor's external update rate is normal, the communication between the master and slave processors is stable and normal, and the data transmission is correct.
[0035] The contents not described in detail in this specification are common knowledge to those skilled in the art.
Claims
1. A high-performance collaborative processing method for an ultra-high precision pointing measuring instrument, characterized in that, include: S1. Instruct the main processor of the measuring instrument to periodically start a data interaction task at regular intervals. S2. The main processor determines whether there is a timeout task. If so, it exits the data interaction task and proceeds to step S6; otherwise, it executes the data interaction task and triggers an interrupt from the slave processor, proceeding to step S3. S3, the main processor and the slave processor exchange data; S4. The main processor and the slave processor determine whether the received data is correct. If it is, the received data is stored and processed, and the process proceeds to step S6; otherwise, the process proceeds to step S5. S5. Determine whether the received data is multi-cycle data. If so, process it according to the packet sequence number of the received data and proceed to step S6; otherwise, discard the received data and proceed to step S6. S6, Exit.
2. The high-performance collaborative processing method for an ultra-high precision pointing measuring instrument according to claim 1, characterized in that, The main processor and the slave processor interact with each other, and the working process of the main processor is as follows: S21. Determine whether to execute the task; if yes, proceed to step S22. Otherwise, proceed to step S27; S22. Determine if the bus is connected normally; if yes, proceed to step S23; otherwise, proceed to step S27. S23. Send one or more frames of data to the slave processor and proceed to step S24. S24. Has data been received from the processor? If yes, proceed to step S25; otherwise, proceed to step S26. S25. Receive data from the processor and determine the amount of data; S26. Check if the timeout has occurred; if yes, proceed to step S27; otherwise, proceed to step S24. S27, End.
3. The high-performance collaborative processing method for an ultra-high precision pointing measuring instrument according to claim 1, characterized in that: The master processor and the slave processor interact with each other, and the slave processor's operation process is as follows: S31, Receive data sent by the main processor; S32. Has enough data been received? If yes, proceed to step S33; otherwise, end. S33, Send data to the main processor.
4. The high-performance collaborative processing method for an ultra-high precision pointing measuring instrument according to claim 1, characterized in that, The main processor and the slave processor determine whether the received data is correct in the following ways: Get the sequence number of the received data packet in the current frame; Determine if the sequence number of the received data packet in the current frame is equal to the sequence number of the data packet that should be received; if yes, the received data is correct; otherwise, the received data is incorrect.
5. The high-performance collaborative processing method for an ultra-high precision pointing measuring instrument according to claim 1, characterized in that, The process based on the sequence number of the received data packet is as follows: If the sequence number of the packet is greater than the sequence number of the data packet that should be received, the received data is discarded, and the other processor is notified to resend a data packet with the same sequence number as the data packet that should be received. If the sequence number of the packet is less than the sequence number of the data packet that should be received, the received data is discarded.
6. The high-performance collaborative processing method for an ultra-high precision pointing measuring instrument according to claim 2, characterized in that: The master or slave processor sends multiple frames of data to the other processor, specifically as follows: S61. Initialize the sequence number idxnow for sending data; S62. Determine whether a retransmission message has been received from the other party's processor; if yes, send the data packet to be retransmitted and set idxnow to the sequence number of the retransmitted data packet; if no, send the idxnow-th data packet. S63, increment the serial number idxnow by 1; S64. Determine whether the data has been sent completely; if yes, end; if no, proceed to step S62.
7. The high-performance collaborative processing method for an ultra-high precision pointing measuring instrument according to claim 1, characterized in that: When the master processor and slave processor interact with each other, the data bus is set to a one-way transmit / receive mode to avoid bus conflicts caused by simultaneous bidirectional transmission and reception.
8. The high-performance collaborative processing method for an ultra-high precision pointing measuring instrument according to claim 1, characterized in that: The data sent by the main processor and slave processor in each cycle includes checksum information.
9. The high-performance collaborative processing method for an ultra-high precision pointing measuring instrument according to claim 1, characterized in that: The main processor of the measuring instrument has a multi-tasking architecture.