Embedded software design method of fine pointing mechanism control system

Through modular architecture design, the problem of duplicate design and low efficiency in embedded software development of precise mechanism control systems is solved, and the general design of software and the improvement of production efficiency is achieved.

CN119576291AInactive Publication Date: 2025-03-07NORTHWESTERN POLYTECHNICAL UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510139519.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-03-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing embedded software development of precisely targeted mechanism control systems has duplicate design and a lack of standardized development processes, resulting in low production efficiency and high production costs.

Method used

Using the functional modular design method, the unified embedded software design and development process of different types of precise mechanism control systems is achieved through the modular architecture of the hardware abstraction layer, the core service layer, the middleware layer and the application layer.

Benefits of technology

The general design of embedded software for different types of precise mechanism control systems is realized, which avoids repeated designs, improves production efficiency, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576291A_ABST
    Figure CN119576291A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded software design method of a fine pointing mechanism control system, which relates to the field of fine pointing mechanism control systems and comprises the following steps of: determining functions of embedded software according to hardware configuration and space task requirements of the fine pointing mechanism control system; designing a modular architecture of the embedded software according to the function and modular decomposition principle of the embedded software; and controlling the fine pointing mechanism to execute corresponding functions according to the modular architecture of the embedded software, and completing the design of the embedded software of the fine pointing mechanism control system. According to the invention, the problem of generalization of embedded software development of different types of fine pointing mechanisms in a laser communication system is solved, repeated design is avoided, the production efficiency is improved, and the production cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of precision pointing mechanism control systems, and in particular to an embedded software design method for a precision pointing mechanism control system. Background Art

[0002] With the continuous development of aerospace technology, future aerospace missions such as Mars exploration and manned lunar missions will become more complex and diversified. The data transmission of these missions has the characteristics of long transmission distance and large data volume, which requires more efficient and reliable communication methods. As an advanced aerospace communication technology, laser communication not only has the characteristics of large communication capacity and strong confidentiality, but also can reduce transmission time, improve mission efficiency, and provide strong support for the next generation of aerospace missions. The structure of the laser communication system is complex, including coarse aiming unit, optical antenna, fine aiming unit and other parts. The fine pointing mechanism system is usually part of the fine aiming unit and works with the coarse aiming unit to achieve precise alignment of the light beam. When the light beam is disturbed by satellite movement, platform vibration, space environment disturbance, etc., it will deviate. The fine pointing mechanism control system can achieve rapid deflection of the light beam with high precision through the fine pointing mechanism, thereby accurately compensating for the deviated light beam, ensuring the stability of the communication link, and improving the reliability and efficiency of communication.

[0003] As one of the core components of the laser communication system, the development of embedded control software for the precision pointing mechanism control system is crucial. In order to reduce the overall complexity and coupling of the system and improve the stability and reliability of the system, it is necessary to provide a universal embedded software model architecture. This architecture needs to be adapted to the software development of different types of precision pointing mechanism control systems to ensure that the same software model architecture can be used in different types of precision pointing mechanism control systems to achieve software modularization and reduce the workload of software maintenance.

[0004] The embedded software of the control system of the precision pointing mechanism generally has the functions of control algorithm implementation, data bus communication, analog signal high-speed sampling, digital signal high-speed output, etc. Due to the differences in the hardware configuration of the control system of different types of precision pointing mechanisms, their communication types, feedback input types and control output types are also different. In addition, for the laser communication of satellite groups such as formation satellites, their embedded software has the disadvantages of repeated design and lack of standardized development process. Therefore, the development of the embedded software model architecture of the precision pointing mechanism control system has the disadvantages of repeated design and low production efficiency. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, an embedded software design method for a precision pointing mechanism control system provided by the present invention solves the problem of universalization of embedded software development for different types of precision pointing mechanisms in laser communication systems, avoids repeated design, improves production efficiency, and reduces production costs.

[0006] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: an embedded software design method for a precision pointing mechanism control system, comprising the following steps: S1: Determine the functions of the embedded software based on the hardware configuration of the precision pointing mechanism control system and the space mission requirements; S2: Design the modular architecture of embedded software based on the functions and modular decomposition principles of embedded software; S3: Control the precision pointing mechanism to perform corresponding functions according to the modular architecture of the embedded software, and complete the embedded software design of the precision pointing mechanism control system.

[0007] Furthermore, the functions of the embedded software in S1 include task scheduling function, AD / DA conversion function, precise pointing control function, experimental data feedback function and communication management function.

[0008] Furthermore, the modular architecture of the embedded software in S2 includes: Hardware abstraction layer: The hardware abstraction layer is located at the bottom layer, interacts directly with hardware devices, and provides an abstract hardware interface for upper-layer software; Core service layer: The core service layer is located above the hardware abstraction layer and is used to provide core services and provide basic support for the middleware layer and the application layer; Middleware layer: The middleware layer is located above the core service layer and provides common service interfaces and functions for the application layer; Application layer: The application layer is located at the top layer and interacts directly with the user. It is the user-defined software part and calls the services provided by the middleware layer according to business needs to realize the specific functions of the precision-targeting organization.

[0009] Furthermore, the application layer includes: Initialization module: The initialization module is used to configure and initialize various parts of the system after the precision pointing mechanism control system is powered on or reset, including setting the clock, reset signal and I / O port; during the initialization process, the initialization module is also used to detect the error state of the system, including configuration errors and hardware failures, and take corresponding recovery measures; Data processing module: The data processing module receives, processes and transmits the data of the precision pointing mechanism, including data filtering, conversion and control calculation operations; Task scheduling module: The task scheduling module is used to manage all tasks in the precision pointing mechanism control process, including equipment start, stop, status monitoring and fault handling operations; Communication module: The communication module is used for experimental data transmission and communication management.

[0010] Furthermore, the initialization module includes: Configuration storage unit: The configuration storage unit is used to store configuration data and program code of FPGA; Clock management unit: The clock management unit is used to provide a clock signal for the initialization module and perform clock synchronization and frequency adjustment; Reset control unit: The reset control unit is used to receive and process the reset signal and trigger the initialization process of the FPGA; Logic circuit configuration unit: The logic circuit configuration unit is used to configure the logic circuit inside the FPGA according to the read configuration data; Interface initialization unit: The interface initialization unit is used to initialize the I / O interface and communication interface of the FPGA.

[0011] Furthermore, the data processing module includes: Input-output unit: The input-output unit is used to interact with external signals, receive AD input signals from external eddy current sensors, and send DA control signals to external driving elements; Data calculation unit: The data calculation unit is used to perform data processing operations, and is composed of a programmable logic unit. The programmable logic unit is programmed using a hardware description language to implement filtering preprocessing of collected data and control instruction calculation operations; Data storage unit: The data storage unit is used to store data during processing.

[0012] Furthermore, the task scheduling module includes: Task queue storage unit: The task queue storage unit is used to issue task requests to be executed and sort them according to priority or deadline factors; Task scheduling computing unit: The task scheduling computing unit is used to dynamically allocate and execute tasks according to the task requests and system resources in the task queue storage unit; Resource management unit: The resource management unit is used to monitor and manage the hardware resources inside the FPGA; Status monitoring unit: The status monitoring unit is used to monitor the execution status of the task, including the start time, execution time and completion status of the task.

[0013] Furthermore, the communication module includes: Communication interface unit: The communication interface unit is used to connect to the interface of the external device, including a data interface and a control interface. The data interface is used to transmit experimental data, and the control interface is used to receive control signals and send status signals; Communication protocol processing unit: The communication protocol processing unit is used to encode and decode the received data according to the communication protocol and handle various abnormal situations during the communication process; Data cache unit: The data cache unit is used to store received experimental data and data to be sent; Communication control unit: The communication control unit is used to control the start, stop and data transmission process of the communication module according to the control signal and configuration parameters, so as to realize the overall control and management of the communication module.

[0014] Furthermore, S3 includes the following sub-steps: S31: After the embedded software of the precision pointing mechanism control system is powered on or reset, the precision pointing mechanism control system enters an initialization state and performs initialization operations and software self-check operations; S32: When the software self-check succeeds, it enters the loop running state and proceeds to step S33. When the software self-check fails, it enters the suspend or wait state, solves the fault through external intervention, and re-initializes; S33: When there is no interruption or event triggering, the cyclic operation state enables the precision pointing mechanism control system to continuously perform the preset task and enter step S34. When the external sensor data is abnormal or the communication interface fails, the software enters a suspended or waiting state, solves the failure through external intervention, and re-enters the cyclic operation state; S34: When the timer inside the program reaches the preset time threshold, the timer interrupt state or other interrupt state is triggered, causing the current task to switch to the interrupt processing task and execute the set operation. After the interrupt stops, the precision pointing mechanism control system returns to the previous cyclic operation state or continues to execute other tasks.

[0015] Furthermore, the other interruption states in S34 include a serial port interruption state, a measurement data collection interruption state and a fine pointing mechanism control interruption state.

[0016] The beneficial effects of the present invention are as follows: the present invention proposes an embedded software design method for a precision pointing mechanism control system, which realizes the unification of embedded software design and development processes for different types of precision pointing mechanism control systems through functional modularization. Specifically, for various types of precision pointing mechanisms, in the case of differences in hardware configurations, this model architecture can be adopted to meet the requirements of high-precision real-time pointing tasks. The software model architecture can be flexibly adapted to different projects to realize platform-based management of software models. This innovation not only reduces the burden of model maintenance, but also significantly shortens the software development cycle and improves development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1A flow chart of an embedded software design method for a precision pointing mechanism control system provided by an embodiment of the present invention.

[0018] Figure 2 It is a schematic diagram of the structure of a precise pointing mechanism control system provided by an embodiment of the present invention.

[0019] Figure 3 It is a schematic diagram of the internal structure of the precise pointing mechanism provided by an embodiment of the present invention.

[0020] Figure 4 It is a functional diagram of the software of the precision pointing mechanism control system provided by an embodiment of the present invention.

[0021] Figure 5 It is a schematic diagram of the software model architecture of the precision pointing mechanism control system provided by an embodiment of the present invention.

[0022] Figure 6 It is a schematic diagram of the composition of the application layer module provided by an embodiment of the present invention.

[0023] Figure 7 It is a hierarchical structure diagram of the initialization module provided in an embodiment of the present invention.

[0024] Figure 8 It is a hierarchical structure diagram of the data processing module provided in an embodiment of the present invention.

[0025] Fig. 9 It is a hierarchical structure diagram of a task scheduling module provided in an embodiment of the present invention.

[0026] Fig.10 It is a hierarchical structure diagram of the communication module provided in an embodiment of the present invention.

[0027] Fig.11 It is a schematic diagram of the software operation process of the precision pointing mechanism control system provided by an embodiment of the present invention.

[0028] Fig.12 It is a software state transition relationship diagram of a fine pointing mechanism control system provided by an embodiment of the present invention.

[0029] Among them: 1. FPGA control board; 2. Communication interface; 3. Electrical connector interface; 4. Precision pointing mechanism; 5. Eddy current sensor interface; 6. Support shaft; 7. Hinge; 8. Reflection mirror; 9. Front end shell; 10. Mounting lug; 11. Precision pointing mechanism structure mounting hole; 12. Mirror mounting seat; 13. Voice coil actuator; 14. Eddy current probe; 15. Bottom shell. DETAILED DESCRIPTION

[0030] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0031] like Figure 1As shown, an embedded software design method for a precision pointing mechanism control system includes the following steps: S1: Determine the functions of the embedded software based on the hardware configuration of the precision pointing mechanism control system and the space mission requirements; S2: Design the modular architecture of embedded software based on the functions and modular decomposition principles of embedded software; S3: Control the precision pointing mechanism to perform corresponding functions according to the modular architecture of the embedded software, and complete the embedded software design of the precision pointing mechanism control system.

[0032] The precision pointing mechanism control system is an important part of the space laser communication system. It can achieve high-precision and rapid deflection of the light beam through the precision pointing mechanism to ensure the stability of the communication link. The main task of the system is to measure the deflection angle of the reflector through the displacement measurement module. After active pointing control calculation, the drive element receives the control command to deflect the precision pointing mechanism and upload the collected angle and control voltage information to the precision pointing mechanism main control software.

[0033] The precision pointing mechanism control software is an embedded software product of the precision pointing mechanism control system. It runs on the field programmable gate array (FPGA). After the hardware self-check is successful, it enters the preparation mode and automatically runs after receiving the start-up command of the main control software. The software uses FPGA as the control core, displacement measurement module and drive element as the execution components, and adopts active pointing control strategy to achieve real-time high-precision pointing function. The software can receive control instructions from the host computer and execute related functions and scientific data collection tasks according to the communication protocol rules.

[0034] In one embodiment of the present invention, Figure 2 and Figure 3As shown, the existing precise pointing mechanism control system in the laboratory includes FPGA control board 1, communication interface 2, electrical connector interface 3, precise pointing mechanism 4, eddy current sensor interface 5, support shaft 6, hinge 7, reflective mirror 8, front housing 9, mounting lug 10, precise pointing mechanism structure mounting hole 11, mirror mounting seat 12, voice coil actuator 13, eddy current probe 14, and bottom housing 15. Among them, FPGA control board 1 is the operating platform of the embedded software of the precise pointing mechanism control system, integrating AD / DA port and voice coil motor drive circuit. Communication interface 2 is used to communicate with the host computer and transmit scientific data back through this interface. Electrical connector interface 3 is used to power the board and provides a four-way drive connector connected to the voice coil actuator 13. Eddy current sensor interface 5 is used to measure the distance between the eddy current probe 14 and the plane of the hinge 7, so as to calculate the actual deflection angle of the precise pointing mechanism 4. The voice coil actuator 13 is an actuator of the fine pointing mechanism system. When current flows through the voice coil actuator 13, it generates displacement and deflects the fine pointing mechanism 4. The support shaft 6 and the hinge 7 are used to support the mirror to achieve mirror deflection. The mounting lug 10 is used to fix the fine pointing mechanism 4 to the spacecraft payload platform.

[0035] According to the hardware configuration of the precision pointing mechanism control system and the basic requirements of the space pointing task, the precision pointing mechanism control software is divided into modules according to its functions, such as Figure 4 As shown, its main functions are as follows: The functions of the embedded software in S1 include task scheduling function, AD / DA conversion function, precise pointing control function, experimental data return function and communication management function.

[0036] Task scheduling function: including FPGA event processing mechanism and task scheduling algorithm. Events may come from external interrupts, internal state changes or timers, etc. Event processing usually involves interrupt processing mechanism. Interrupt is a key mechanism to ensure real-time response to various asynchronous events. It allows the processor to suspend the execution of the current task while processing the current program, and execute the handler for handling emergency events, that is, the interrupt service routine. When the interrupt event is processed, the processor can automatically resume execution of the original program. Task scheduling is a key task in FPGA embedded systems to ensure that tasks are completed on time. Reasonable task scheduling algorithms can improve the real-time performance, resource utilization and responsiveness of the system. Commonly used task scheduling algorithms in FPGA embedded systems include priority scheduling algorithm, earliest deadline scheduling algorithm (EDF), minimum slack scheduling algorithm (LLF), etc. In this embodiment, the priority scheduling algorithm is used to implement task scheduling.

[0037] The task scheduling function is mainly responsible for managing and coordinating various tasks and events within the system to ensure that they can be executed at the scheduled time and order. This function is similar to the task scheduler in the operating system, but it is aimed at specific tasks in the FPGA hardware environment. The FPGA system event scheduling function emphasizes real-time performance and can ensure that tasks are completed within the scheduled time, which is crucial for systems such as precision pointing mechanisms that require high real-time response.

[0038] AD / DA conversion function: The AD converter converts the analog signal collected by the eddy current sensor into a digital signal, which is convenient for the FPGA to process the digital signal. The DA converter converts digital signals such as control instructions into analog signals, which are used to drive the actuators of the precision pointing mechanism, such as voice coil motors and piezoelectric actuators. The input data of the precision pointing mechanism control system is multiple AD signals, and the output data is multiple DA voltage values. In order to ensure the accuracy and stability of the AD / DA conversion, it is necessary to ensure that the clock signal of the FPGA is synchronized with the clock signal of the AD / DA converter.

[0039] Precision pointing control function: mainly includes input signal processing, FxLMS algorithm implementation, and output signal generation. The precision pointing mechanism control module receives the voltage signal from the displacement measurement module, obtains the actual angle information of the precision pointing mechanism through filtering, angle calculation and other processing methods, and then calculates the required control output based on the reference input using the FxLMS algorithm. The driving element receives the control signal to realize the deflection of the precision pointing mechanism.

[0040] The precise pointing control function can receive the feedback signal from the sensor in real time and give control instructions based on the feedback signal to ensure the accuracy and stability of the pointing control. Compared with the traditional DSP (digital signal processor) and MCU (microcontroller unit), FPGA has obvious advantages in processing complex algorithms and multi-task parallel execution. This makes FPGA more competitive in the precise pointing mechanism system that requires high-frequency and high-precision control.

[0041] Experimental data transmission function: The scientific experimental data transmission function receives various instructions from the host computer, such as control instruction information, data input operation identification, etc., and then performs secondary analysis and performs corresponding operations according to the communication protocol. The relevant scientific experimental data is transmitted back to the host or other storage devices in real time at high speed for further analysis.

[0042] FPGA can process large amounts of data at high speed and high efficiency, and can transmit the generated data or status information to external devices or hosts in real time or regularly through a communication interface (such as serial port, Ethernet, USB, etc.), which can be used to debug and verify the functions and performance of the system. By transmitting experimental data back, developers can understand the operating status and existing problems of the system in real time, and make corresponding adjustments and optimizations. The experimental data transmission function is a conditional call, which is called only when the data transmission instruction of the host computer is received.

[0043] Communication management function: This function determines the communication agreement between the laser communication subsystem software and the precision pointing mechanism control software, mainly including communication protocol processing, data exchange and transmission, error detection and recovery. Among them, the communication protocol processing can parse the received data according to the predefined communication protocol and extract useful information. At the same time, it can also encapsulate the data to be sent according to the protocol requirements to ensure the correct transmission of the data. Data exchange and transmission adopt the form of parallel transmission, which can transmit multiple data bits at the same time, with large transmission capacity, suitable for the transmission of large amounts of data in laser communication. Its function is to inject control parameters into the precision pointing mechanism controller, forward the calculation instructions of the controller, collect test data and send it back to the internal controller of the laser communication subsystem. Error detection algorithm and recovery, by adding redundant check codes to the data frame to detect errors in the data transmission process, once an error is detected, corresponding recovery measures can be taken. For example, for errors detected by CRC, the sender can be requested to resend the data frame, or the error correction code (ECC) can be used to correct the erroneous data. This mechanism can ensure the stability and reliability of communication.

[0044] This communication management function can support multiple communication protocols such as UART, SPI, I2C, etc., which facilitates data exchange with other devices and further improves the modularity level of the precision pointing mechanism software.

[0045] The modular architecture of the embedded software in S2 includes: Hardware abstraction layer: The hardware abstraction layer is located at the bottom layer, interacts directly with hardware devices, and provides an abstract hardware interface for upper-layer software; Core service layer: The core service layer is located above the hardware abstraction layer and is used to provide core services and provide basic support for the middleware layer and the application layer; Middleware layer: The middleware layer is located above the core service layer and provides common service interfaces and functions for the application layer; Application layer: The application layer is located at the top layer and interacts directly with the user. It is the user-defined software part and calls the services provided by the middleware layer according to business needs to realize the specific functions of the precision-targeting organization.

[0046] According to the functions described by the precision pointing mechanism control software and the principle of modular decomposition, the FPGA-based precision pointing mechanism control software model architecture is as follows: Figure 5 As shown in the figure, it can be divided into four parts: hardware abstraction layer, core service layer, middleware layer, and application layer. The design description of each part is as follows: The hardware abstraction layer is a set of software interfaces that aims to abstract the complexity and diversity of FPGA hardware and provide a unified and simplified hardware access interface for the upper-level software part of the precision pointing mechanism control software. Its main purpose is to achieve the decoupling of hardware and software, so that the upper-level software does not need to care about the specific implementation details of the underlying hardware, thereby improving the portability and maintainability of the precision pointing mechanism control software.

[0047] The core service layer directly provides core services for upper-layer applications, which are necessary for upper-layer applications to realize their functions. These services include but are not limited to device management, inter-process communication, thread scheduling, interrupt handling, memory management, etc. The core service layer accesses and controls FPGA hardware resources by calling the interface provided by the hardware abstraction layer, thus providing a stable, efficient and reliable operating environment for upper-layer applications.

[0048] The middleware layer is located above the hardware abstraction layer and below the core service layer. It is the key bridge for the precision pointing mechanism control software to connect the underlying hardware and the upper-layer application. The middleware layer provides a series of abstract services and interfaces, allowing the upper-layer application to access and control FPGA hardware resources more conveniently and efficiently, simplifying the application development process.

[0049] The application layer is the highest layer in the precision pointing mechanism control software, which interacts directly with the user to implement specific business logic and functions. It is located above the middleware layer, and accesses and controls FPGA hardware resources by calling the services and interfaces provided by the middleware layer to complete specific tasks and functions. Such as data processing, control algorithms, communication protocols, etc. In addition, it can also monitor the operating status of the system, manage the system's resources and tasks, and ensure the stability and reliability of the system. The application layer should adopt a modular design to divide different functions and business logic into independent modules. Each module should have a clear interface and functional description to facilitate integration and testing between modules. Figure 6 As shown, the application layer mainly consists of the following modules: The application layer includes: Initialization module: The initialization module is used to configure and initialize various parts of the system after the precision pointing mechanism control system is powered on or reset, including setting the clock, reset signal and I / O port; during the initialization process, the initialization module is also used to detect the error state of the system, including configuration errors and hardware failures, and take corresponding recovery measures to ensure the stability and reliability of the system; Data processing module: The data processing module receives, processes and transmits the data of the precision pointing mechanism, including data filtering, conversion and control calculation operations; Task scheduling module: The task scheduling module is used to manage all tasks in the precision pointing mechanism control process, including equipment start, stop, status monitoring and fault handling operations; Communication module: The communication module is used for experimental data transmission and communication management; The communication module has two main functions. The first is the experimental data return function. This module receives scientific data such as external eddy current sensors, experimental data generated by internal calculations of FPGA, and state parameters sent by the data processing module. These data are encoded and returned to the host computer or other external data receiving devices through the communication interface. The second is the communication management function. This module is responsible for managing and maintaining the communication connection between the precision pointing mechanism control software and the laser communication system software. It can configure communication parameters (such as baud rate, data bit, stop bit, etc.) according to system requirements and establish a stable communication link so that the main control software can realize network control of the precision pointing mechanism control software.

[0050] like Figure 7 As shown, the initialization module includes: Configuration storage unit: The configuration storage unit is used to store the configuration data and program code of the FPGA. This unit is an external memory (such as EEPROM, Flash memory, etc.) and is read when the FPGA is started; Clock management unit: The clock management unit is used to provide a clock signal for the initialization module, and perform clock synchronization and frequency adjustment, which can ensure the timing accuracy of the initialization process; Reset control unit: The reset control unit is used to receive and process the reset signal and trigger the initialization process of the FPGA. It can provide necessary reset logic, such as de-jitter, reset delay, etc. Logic circuit configuration unit: The logic circuit configuration unit is used to configure the logic circuit inside the FPGA according to the read configuration data, which includes setting the connection relationship of the logic unit, configuring the internal memory, etc.; Interface initialization unit: The interface initialization unit is used to initialize the I / O interface and communication interface of the FPGA, including setting the I / O standard, drive current, pull-up / pull-down resistor, communication initialization parameter setting, etc.

[0051] Input of the initialization module: used to initialize the configuration data of the internal logic circuit and memory of the FPGA, provide a clock signal for the initialization module to synchronize the clock, and trigger the reset signal of the FPGA initialization process and the interface signal connected to the external device.

[0052] Output of the initialization module: internal logic circuit configuration completion signal, indicating that the logic circuit inside the FPGA has been correctly configured according to the configuration data, which can trigger subsequent workflows or start the main program of the FPGA. In addition, the module can output an error indication signal. If an error occurs during the initialization process (such as configuration data reading failure, clock synchronization problem, etc.), the initialization module will output an error indication signal, which can be used to diagnose and solve the initialization problem.

[0053] like Figure 8 As shown, the data processing module includes: Input-output unit: The input-output unit is used to interact with external signals, receive AD input signals from external eddy current sensors, and send DA control signals to external driving elements; Data calculation unit: The data calculation unit is used to perform data processing operations and is composed of programmable logic units (such as lookup tables, registers, triggers, etc.). The programmable logic unit is programmed using a hardware description language (such as VHDL or Verilog) to implement filtering preprocessing of collected data and control instruction calculation operations based on the FxLMS algorithm; Data storage unit: The data storage unit is used to store data in the processing process, such as intermediate results, historical data, and other scientific data or status parameters that need to be communicated back.

[0054] The input of the data processing module: the original data signal, that is, the voltage signal from each eddy current sensor in the precision pointing mechanism control system and the operating parameters of the configuration data processing module, such as filter parameters, controller parameters, etc.

[0055] Output of the data processing module: control signal, used to drive the precision pointing mechanism or transmitted to the storage module as stored data or transmitted back to external devices. In addition, the visualized scientific data will be transmitted to the communication module for further analysis, display or control.

[0056] like Fig. 9 As shown, the task scheduling module includes: Task queue storage unit: The task queue storage unit is used to issue task requests to be executed and sort them according to priority or deadline factors; Task scheduling operation unit: the task scheduling operation unit is used to dynamically allocate and execute tasks according to the task requests and system resources in the task queue storage unit. The scheduling operation unit can adopt a variety of scheduling algorithms, such as priority scheduling algorithm, earliest deadline scheduling algorithm (EDF) and minimum slack scheduling algorithm (LLF); Resource management unit: The resource management unit is used to monitor and manage the hardware resources inside the FPGA to ensure that there are sufficient resources to support the task during execution; Status monitoring unit: The status monitoring unit is used to monitor the execution status of the task, including the start time, execution time and completion status of the task, so as to schedule and adjust the task when necessary.

[0057] Inputs to the task scheduling module: task request information, system resource status, system clock, reset signal, external interrupt signal, and user input.

[0058] Outputs of the task scheduling module: task execution status (such as success, failure, delay, etc.) and execution results (such as calculation results, data output, etc.).

[0059] like Fig.10 As shown, the communication module includes: Communication interface unit: The communication interface unit is used to connect to the interface of the external device, including a data interface and a control interface. The data interface is used to transmit experimental data, and the control interface is used to receive control signals and send status signals; Communication protocol processing unit: The communication protocol processing unit is used to encode and decode the received data according to the communication protocol (such as serial port protocol, network protocol, etc.), and handle various abnormal situations in the communication process, such as data loss, verification error, etc.; Data cache unit: The data cache unit is used to store the received experimental data and the data to be sent. This module can ensure the continuity and integrity of the data and avoid data loss or damage; Communication control unit: The communication control unit is used to control the start, stop and data transmission process of the communication module according to the control signal and configuration parameters, so as to realize the overall control and management of the communication module.

[0060] Input of the communication module: scientific data, communication protocol configuration parameters.

[0061] Output of the communication module: The experimental data after encoding and verification is sent to the host computer or other data receiving device through the communication interface. Status signal: Indicates the working status of the communication module, such as data transmission completion, communication abnormality, etc. These status signals can be used for system monitoring and debugging. Debug information: During the design and implementation of the communication module, it may be necessary to output some debugging information for debugging and testing. This debugging information may include the received raw data, processed data, module working status, etc.

[0062] like Fig.11 As shown in Figure 1, the software of the precision pointing mechanism control system includes the following state machines: initialization state machine, main loop state machine, timer interrupt state machine, serial communication interrupt state machine, control signal interrupt state machine and fault detection state machine. The state transition relationship of the software running process is shown in Figure 1. Fig.12 As shown, it can be divided into the following operating states: initialization state, loop running state, suspension / wait state, timer interrupt state, and other interrupt states (serial port interrupt, fine pointing mechanism control interrupt).

[0063] The S3 includes the following sub-steps: S31: After the embedded software of the precision pointing mechanism control system is powered on or reset, the precision pointing mechanism control system enters an initialization state and performs initialization operations and software self-check operations; S32: When the software self-check succeeds, it enters the loop running state and proceeds to step S33. When the software self-check fails, it enters the suspend or wait state, solves the fault through external intervention, and re-initializes; S33: When there is no interruption or event triggering, the cyclic operation state enables the precision pointing mechanism control system to continuously perform the preset task and enter step S34. When the external sensor data is abnormal or the communication interface fails, the software enters a suspended or waiting state, solves the failure through external intervention, and re-enters the cyclic operation state; S34: When the timer inside the program reaches the preset time threshold, the timer interrupt state or other interrupt state is triggered, causing the current task to switch to the interrupt processing task and execute the set operation. After the interrupt stops, the precision pointing mechanism control system returns to the previous cyclic operation state or continues to execute other tasks.

[0064] The other interrupt states in S34 include a serial port interrupt state, a measurement data collection interrupt state and a fine pointing mechanism control interrupt state.

[0065] like Fig.12As shown in the figure, after the precision pointing mechanism control system software is powered on or reset, the system first enters the initialization state. In this stage, a series of initialization operations will be performed, including configuring the internal logic structure, initializing the precision pointing mechanism sensor interface, drive interface, communication interface and other peripherals, setting internal registers, counters and status flags, etc. These initialization operations are key steps to ensure that the FPGA platform can correctly run the precision pointing mechanism control software. The initialization process will be accompanied by software self-checking. After the software self-checking succeeds, it will enter the loop running state. If the software self-checking fails, it will enter the waiting state. At this time, external intervention is required to solve the fault and re-initialize. After the initialization is completed, the precision pointing mechanism control software enters the infinite loop running state. When there is no interruption or specific event triggering, this state will enable the precision pointing mechanism system to continue to perform regular and periodic preset tasks, such as status monitoring, establishing a connection with the host computer or external communication equipment, and continuing to operate the peripheral interfaces of the hardware abstraction layer such as AD / DA. When the external sensor data is abnormal or the communication interface fails, the task scheduling module will cause the software to suspend the execution of the control algorithm and wait for fault recovery or external intervention. At this time, the software enters the suspended or waiting state. In the suspended state, the software will keep the current state information and data so that it can continue processing when resuming execution. When the timer inside the program reaches the preset time threshold, the timer interrupt state machine is triggered. As a common interrupt type in FPGA, the timer interrupt is controlled by the task scheduling module in the precision pointing mechanism control software. It can be used to realize normal data processing, timing control, communication with the laser communication system main control software, and return measurement data. When the timer reaches the preset time threshold, an interrupt signal will be generated to switch the current task to the interrupt processing task. In the interrupt processing task, some specific operations are performed, such as periodic sampling, periodic transmission, control parameter update, control quantity reset, control target adjustment, etc. After the timing interrupt stops, the system returns to the previous state or continues to execute other tasks. In addition to the timer interrupt, the precision pointing mechanism control software also contains three other important interrupts. One is the serial port interrupt. When the serial port receives data sent by an external device, a serial port interrupt will be generated. In the interrupt handler, by parsing the task instruction, the flag is set and the serial port data is received, parsed, and processed. Next, the corresponding operation is performed according to the content of the data. For example, the external device may send a new control instruction or parameter setting, and the FPGA needs to update the control algorithm or parameters to adapt to the new requirements. The second is the measurement data acquisition interrupt. In the precision pointing mechanism control system, it is usually necessary to collect data of some key parameters in real time within a certain period of time. When an interrupt data acquisition instruction is received, an interrupt signal is generated, causing the FPGA to enter the interrupt processing state. In the interrupt handler, the collected data is placed in a queue or buffer. The data processing module can further process or store the data, and the communication module can also transmit the newly measured experimental data and control status back.The third is the precision pointing mechanism control interrupt. In some emergency situations, when the precision pointing mechanism system receives the start or stop control command from the communication module, the precision pointing mechanism control interrupt can execute the corresponding control logic to handle the corresponding operation. After processing all events and interrupts, the logic interface module returns control to the beginning of the loop operation and continues to periodically query the operation identifier and process events.

[0066] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed in the present invention, and these variations and combinations are still within the protection scope of the invention.

Claims

1. An embedded software design method for a precision pointing mechanism control system, characterized in that: The following steps are involved: S1: Determine the functions of the embedded software based on the hardware configuration of the precision pointing mechanism control system and the space mission requirements; S2: Design the modular architecture of embedded software based on the functions and modular decomposition principles of embedded software; S3: Control the precision pointing mechanism to perform corresponding functions according to the modular architecture of the embedded software, and complete the embedded software design of the precision pointing mechanism control system.

2. The embedded software design method for a precise pointing mechanism control system according to claim 1, characterized in that: The functions of the embedded software in S1 include task scheduling function, AD / DA conversion function, precise pointing control function, experimental data return function and communication management function.

3. The embedded software design method for a precise pointing mechanism control system according to claim 1, characterized in that: The modular architecture of the embedded software in S2 includes: Hardware abstraction layer: The hardware abstraction layer is located at the bottom layer, interacts directly with hardware devices, and provides an abstract hardware interface for upper-layer software; Core service layer: The core service layer is located above the hardware abstraction layer and is used to provide core services and provide basic support for the middleware layer and the application layer; Middleware layer: The middleware layer is located above the core service layer and provides common service interfaces and functions for the application layer; Application layer: The application layer is located at the top layer and interacts directly with the user. It is the user-defined software part and calls the services provided by the middleware layer according to business needs to realize the specific functions of the precision-targeting organization.

4. The embedded software design method for a precise pointing mechanism control system according to claim 3 is characterized in that: The application layer includes: Initialization module: The initialization module is used to configure and initialize various parts of the system after the precision pointing mechanism control system is powered on or reset, including setting the clock, reset signal and I / O port; during the initialization process, the initialization module is also used to detect the error state of the system, including configuration errors and hardware failures, and take corresponding recovery measures; Data processing module: The data processing module receives, processes and transmits the data of the precision pointing mechanism, including data filtering, conversion and control calculation operations; Task scheduling module: The task scheduling module is used to manage all tasks in the precision pointing mechanism control process, including equipment start, stop, status monitoring and fault handling operations; Communication module: The communication module is used for experimental data transmission and communication management.

5. The embedded software design method for a precise pointing mechanism control system according to claim 4, characterized in that: The initialization module includes: Configuration storage unit: The configuration storage unit is used to store configuration data and program code of FPGA; Clock management unit: The clock management unit is used to provide a clock signal for the initialization module and perform clock synchronization and frequency adjustment; Reset control unit: The reset control unit is used to receive and process the reset signal and trigger the initialization process of the FPGA; Logic circuit configuration unit: The logic circuit configuration unit is used to configure the logic circuit inside the FPGA according to the read configuration data; Interface initialization unit: The interface initialization unit is used to initialize the I / O interface and communication interface of the FPGA.

6. The embedded software design method for a precise pointing mechanism control system according to claim 4, characterized in that: The data processing module comprises: Input-output unit: The input-output unit is used to interact with external signals, receive AD input signals from external eddy current sensors, and send DA control signals to external driving elements; Data calculation unit: The data calculation unit is used to perform data processing operations and is composed of a programmable logic unit. The programmable logic unit is programmed using a hardware description language to implement filtering preprocessing of collected data and control instruction calculation operations; Data storage unit: The data storage unit is used to store data during processing.

7. The embedded software design method for a precise pointing mechanism control system according to claim 4, characterized in that: The task scheduling module includes: Task queue storage unit: The task queue storage unit is used to issue task requests to be executed and sort them according to priority or deadline factors; Task scheduling computing unit: The task scheduling computing unit is used to dynamically allocate and execute tasks according to the task requests and system resources in the task queue storage unit; Resource management unit: The resource management unit is used to monitor and manage the hardware resources inside the FPGA; Status monitoring unit: The status monitoring unit is used to monitor the execution status of the task, including the start time, execution time and completion status of the task.

8. The embedded software design method for a precise pointing mechanism control system according to claim 4, characterized in that: The communication module comprises: Communication interface unit: The communication interface unit is used to connect to the interface of the external device, including a data interface and a control interface. The data interface is used to transmit experimental data, and the control interface is used to receive control signals and send status signals; Communication protocol processing unit: The communication protocol processing unit is used to encode and decode the received data according to the communication protocol and handle various abnormal situations during the communication process; Data cache unit: The data cache unit is used to store received experimental data and data to be sent; Communication control unit: The communication control unit is used to control the start, stop and data transmission process of the communication module according to the control signal and configuration parameters, so as to realize the overall control and management of the communication module.

9. The embedded software design method for a precise pointing mechanism control system according to claim 1, characterized in that: The S3 includes the following sub-steps: S31: After the embedded software of the precision pointing mechanism control system is powered on or reset, the precision pointing mechanism control system enters an initialization state and performs initialization operations and software self-check operations; S32: When the software self-check succeeds, it enters the loop running state and proceeds to step S33. When the software self-check fails, it enters the suspend or wait state, solves the fault through external intervention, and re-initializes; S33: When there is no interruption or event triggering, the cyclic operation state enables the precision pointing mechanism control system to continuously perform the preset task and enter step S34. When the external sensor data is abnormal or the communication interface fails, the software enters a suspended or waiting state, solves the failure through external intervention, and re-enters the cyclic operation state; S34: When the timer inside the program reaches the preset time threshold, the timer interrupt state or other interrupt state is triggered, causing the current task to switch to the interrupt processing task and execute the set operation. After the interrupt stops, the precision pointing mechanism control system returns to the previous cyclic operation state or continues to execute other tasks.

10. The embedded software design method for a precise pointing mechanism control system according to claim 9, characterized in that: The other interrupt states in S34 include a serial port interrupt state, a measurement data collection interrupt state and a fine pointing mechanism control interrupt state.

Citation Information

Patent Citations

  • Modular embedded software architecture and customization method and customization system thereof

    CN111309291A

  • Comprehensive control system

    CN114114985A

  • Component type control system simulation platform and method based on soft bus

    CN114625024A

  • Process control system and method for spaceflight embedded equipment

    CN114995226A

  • Reliable embedded software system for aerospace application

    CN115268893A