An event-driven constellation cross-granularity state switching simulation method and system

By constructing a cross-granularity state switching method that combines macroscopic behavioral models and microscopic information flow models, the contradiction between computational resources and accuracy in large-scale constellation simulation is resolved, achieving efficient and stable constellation simulation and ensuring real-time simulation and long-term operation of critical tasks.

CN122452108APending Publication Date: 2026-07-24HARBIN INST OF TECH AT WEIHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN INST OF TECH AT WEIHAI
Filing Date
2026-04-08
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies cannot perform dynamic scheduling and state inheritance transitions between multi-level models, making it difficult to be compatible with large-scale constellation capacity and high-fidelity instruction-level precision. Macroscopic mathematical models cannot reflect the execution details of onboard software, and microscopic instruction-level simulations cannot support real-time simulations of large-scale constellations.

Method used

A multi-granularity digital satellite simulation entity is constructed, including a macroscopic behavior model and a microscopic information flow model. The state is switched when a specific event is triggered by a global event listening and arbitration engine. Cross-granularity state switching is achieved by using a global state mapping dictionary. Only the state that requires high-fidelity simulation is hot-started. When no event conditions are triggered, the macroscopic behavior model is maintained for large-step extrapolation.

Benefits of technology

It achieves a dynamic balance between computational efficiency and instruction-level precision in large-scale constellation simulation, ensuring high-fidelity simulation of critical tasks, reducing overall computing power consumption, and improving the real-time performance and stability of the simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122452108A_ABST
    Figure CN122452108A_ABST
Patent Text Reader

Abstract

The application provides a constellation cross-granularity state switching simulation method and system based on event driving, solves the technical problems that the macro mathematical model of the existing constellation simulation is difficult to reflect the execution details of the satellite-borne software, and the micro instruction level simulation is difficult to support large-scale constellation real-time deduction. It includes constructing a multi-granularity digital satellite simulation entity, including a macro behavior model and a micro information flow model; in the cruise stage of the multi-granularity digital satellite simulation entity, the macro behavior model of the satellite node is allocated a process, a trigger event condition is preset, and the events in the cruise stage are listened to and judged; when it is judged that a certain satellite node meets the trigger event condition, the state is switched to the micro information flow model and is hot started; the satellite nodes that do not meet the trigger event condition continue to be allocated a process by the macro behavior model; when the trigger event ends, the state is switched to the macro behavior model to continue cruising, and the process is recycled. The application can be widely applied to the technical field of satellite constellation simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of satellite constellation simulation technology, and more specifically, it relates to an event-driven constellation cross-granularity state switching simulation method and system. Background Technology

[0002] With the rapid development of space technology, large constellation systems, represented by low-Earth orbit internet constellations and remote sensing constellations, have become the core direction of development in the current aerospace field. Large constellations typically consist of hundreds to thousands of satellites, characterized by dynamic topology changes, frequent inter-satellite link reconfiguration, and complex collaborative missions. Computer simulation systems play an indispensable role throughout the entire lifecycle of a constellation, from scheme demonstration and research and development to integration testing and on-orbit operation and control.

[0003] Currently, existing satellite simulation systems mainly follow two technical approaches: system-level simulation systems based on macroscopic mathematical models and refined single-satellite simulation systems based on fully digital information flow. System-level simulation systems based on macroscopic mathematical models primarily perform numerical extrapolations by establishing orbital dynamics differential equations, attitude kinematic equations, space environment models (such as the J778 atmospheric model and the IGRF geomagnetic field model), and macroscopic network routing models. These simulations have a high level of abstraction and cannot directly run real onboard embedded software (such as the target code for satellite operations software and attitude / orbit control software). They struggle to simulate the instruction execution timing of the satellite's internal processor, the data flow mechanisms of peripheral interfaces (such as CAN bus, 1553B bus, and asynchronous / synchronous serial ports), and interrupt response logic. In constellation-coordinated missions, system-level anomalies caused by microscopic factors such as onboard software scheduling delays and timing conflicts at underlying hardware interfaces are difficult for these macroscopic simulation systems to effectively capture and evaluate.

[0004] A sophisticated single-satellite simulation system based on fully digital information flow has emerged, forming a layered digital satellite simulation technology from the underlying chip and circuit levels to the individual machine and system levels. This technology includes chip-level simulation units that can directly run onboard software target code and perform instruction set (such as SPARC V8 and ARM Cortex-R series) parsing, while also providing a register simulation interface for peripheral circuits. It can simulate the hardware behavior and data flow of real satellites with high fidelity. However, this technology incurs high computational overhead. Microscopic information flow simulation requires maintaining high-frequency instruction cycles of the virtual CPU (such as time precision on the order of hundreds of megahertz), high-frequency interrupt polling of peripheral buses, and real-time updates of the states of numerous peripheral registers. For a single satellite, this instruction-level simulation already consumes considerable computational resources. If applied to constellation simulations involving hundreds of satellites, requiring all satellite nodes to run simultaneously at the microscopic information flow granularity around the clock, existing computing clusters will face enormous computational burdens and state management pressures, making it difficult for the simulation system to maintain real-time physical time, thus affecting the stability of the simulation.

[0005] In summary, existing technologies cannot perform dynamic scheduling and state inheritance transitions between multi-level models, and are difficult to be compatible with large-scale constellation capacity and high-fidelity instruction-level precision. Summary of the Invention

[0006] The purpose of this application is to provide an event-driven constellation cross-granularity state switching simulation method and system to solve the technical problems in the prior art where the macroscopic mathematical model of constellation simulation is difficult to reflect the execution details of onboard software and the microscopic instruction-level simulation is difficult to support large-scale constellation real-time simulation.

[0007] To achieve the above objectives, a first aspect of this application provides an event-driven constellation cross-granularity state switching simulation method, comprising the following steps: Construct multi-granularity digital satellite simulation entities, including macroscopic behavior models and microscopic information flow models; During the cruise phase of the multi-granularity digital satellite simulation entity, a process is assigned to the macroscopic behavior model of the satellite node, trigger event conditions are preset, and events during the cruise phase are monitored and judged. When a satellite node is determined to meet the trigger event conditions, the state is switched to the micro-information flow model and a hot start is performed; for satellite nodes that do not meet the trigger event conditions, the process continues to be allocated by the macro-behavioral model. After the triggered event ends, the state switches to the macro-behavioral model to continue cruising, and this process is repeated.

[0008] Preferably, the macroscopic behavior model includes an attitude and orbit dynamics solution module and an energy balance calculation module; The attitude and orbit dynamics solution module is used to describe the macroscopic motion state of a satellite in space; The energy balance calculation module is used to assess the power consumption of a satellite during its orbital operation.

[0009] Preferably, the micro-information flow model includes a virtual CPU kernel, a peripheral interface circuit simulation unit, and a single-machine-level information flow protocol conversion unit; A virtual CPU kernel is used to execute onboard flight software instructions; Peripheral interface circuit simulation unit, used to simulate chip-level communication interaction; The stand-alone information flow protocol conversion unit is used to convert the continuous physical quantities output by the sensor physical model into digital message formats that conform to the actual interface control documents.

[0010] Preferably, the macro-behavioral model and the micro-information flow model switch states through a global state mapping dictionary; The global state mapping dictionary is equipped with a reverse parsing algorithm and a forward synthesis algorithm from digital quantities to physical quantities.

[0011] Preferably, an event priority sequence is defined. When multiple events that meet the triggering conditions are detected during the cruise phase, the time scheduler sends the events with lower priority weights into the waiting queue according to the priority weights of the time, and allocates processes to the events with higher priority weights.

[0012] Preferably, the process of switching to the microscopic information flow model includes: locking the current global simulation timestamp, temporarily storing the current internal state variables of the macroscopic behavior model in the target satellite node that meets the trigger event conditions, and blocking the process of the macroscopic behavior model; Based on the macroscopic continuous state vector of the target satellite node at the global simulation timestamp, the global state mapping dictionary is called, and the macroscopic continuous state vector is reversed and discretized using the reverse analysis algorithm to obtain the reverse analysis result; Based on the reverse analysis results, a micro-execution context corresponding to the current running time of the target satellite node is constructed, directly loaded into the micro-information flow model for execution, and the state is switched to the micro-information flow model to complete instruction-level precision operation.

[0013] Preferably, the process of performing a warm boot includes: loading the micro execution context into the target register, the receive buffer, and the interrupt context according to the global state mapping dictionary; Write the reverse analysis results into the peripheral FIFO and ADC, and set the counter to the time base position consistent with the current global simulation timestamp; The virtual CPU clock is interrupted and released, and the target code resumes execution from the preset interrupt node, directly responding to the interrupt and reading data.

[0014] Preferably, the process of switching to the macroscopic behavior model includes: determining that the microscopic task of the current microscopic information flow model has been completed, freezing the current timestamp, and extracting the control sequence, cumulative power consumption integral value, and attitude and orbit correction increment output by the onboard software to the actuators in the microscopic information flow model during the period from the global simulation timestamp to the current timestamp. The control sequence is numerically integrated over a time window using a forward synthesis algorithm to obtain the equivalent physical correction increment; the cumulative power consumption integral value and attitude correction increment are analyzed using a forward protocol to obtain the back injection compensation amount. Using Kalman gain, the equivalent physical correction increment is evenly distributed and compensated to the state vector of the macroscopic behavior model within several steps of the macroscopic behavior model; Reset the interrupted state of the micro-information flow model and the peripheral FIFO, release computing resources, resume the large-step numerical integration solution process of the target satellite node in the macro-behavioral model, and realize the cruise state of the macro-behavioral model.

[0015] Preferably, the process of obtaining the reverse analysis result using the reverse analysis algorithm includes: based on the macroscopic continuous state vector of the target satellite node at the global simulation timestamp; The global state mapping dictionary is retrieved based on trigger event conditions to obtain the data frame definition of the mapping target; Based on the data frame definition of the mapping target, the transformation operators in the global mapping dictionary are called to perform global mapping dictionary coordinate system transformation, quantization, byte order rearrangement, checksum calculation, and protocol framing on the macroscopic continuous state vector, and then generate the reverse parsing result.

[0016] The second aspect of this application provides an event-driven constellation cross-granularity state switching simulation system, including a macro-level simulation pool, a micro-level information flow simulation pool, a global event listening and arbitration engine, a simulation scheduling and control center, and a global state mapping dictionary; The macroscopic-level simulation pool is used to run the macroscopic behavior model of satellite nodes in a large-step numerical integration manner to realize the cruise state of the macroscopic behavior model; The global event listening and arbitration engine is used to listen for changes in the state of satellite nodes, determine whether the conditions for triggering events are met, and perform resource arbitration when multiple events occur concurrently. The simulation scheduling and control center is used for time synchronization, step size switching, process scheduling, and controlling the execution flow of state switching. The micro-level information flow simulation pool is used to run the micro-information flow model of the target satellite node that meets the triggering event conditions with instruction-level precision, so as to realize the simulation of the behavior of the onboard software. A global state mapping dictionary is used to establish bidirectional conversion rules between macroscopic behavioral models and microscopic information flow models, thereby completing state switching.

[0017] The beneficial effects of this application are as follows: This application provides an event-driven constellation cross-granularity state switching simulation method and system. By constructing digital satellite simulation entities with two different granularities—macro-behavioral models and micro-information flow models—a multi-level expression architecture from the physical field to the discrete digital domain is formed. This retains the computational efficiency advantages of macro-simulation while possessing the instruction-level precision capabilities of micro-simulation, providing structural support for the dynamic balance between computing power and accuracy, and realizing real-time extrapolation of execution details and large-scale constellations. During the system's normal cruise phase, processes are allocated to the macro-behavioral models of satellite nodes, and satellite orbit, attitude, and energy status are extrapolated using large-step numerical integration. Simultaneously, trigger event conditions are preset, and events during the cruise phase are continuously monitored and judged. Based on the trigger event conditions, a real-time perception mechanism is constructed to accurately determine the state switching between the macro-behavioral model and the micro-information model, ensuring timely capture when critical scenarios requiring high-fidelity simulation occur. Furthermore, a warm start is performed only for states requiring high-fidelity simulation. Satellite nodes without triggered events maintain large-step extrapolation of the macroscopic behavior model, ensuring that limited computing resources can be used to maintain the accuracy of onboard software instruction-level simulation and the real-time performance of the overall simulation in a large-scale constellation. In addition, after the triggered event ends, the state is switched to the macroscopic behavior model to continue cruising. This ensures the accuracy of onboard software instruction-level verification while maintaining the long-term stable operation of large-scale constellation simulation, reducing overall computing power consumption and improving the real-time performance and stability of large-scale constellation simulation. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart of an event-driven constellation cross-granularity state switching simulation method provided in an embodiment of this application; Figure 2 A schematic diagram of the structure of an event-driven constellation cross-granularity state switching simulation system provided in an embodiment of this application; Figure 3 A schematic diagram of the two-layer structure and state mapping relationship of a single-star macroscopic behavior model and a microscopic information flow model provided in an embodiment of this application; Figure 4 A flowchart of cross-particle size state settling, micro-thermal start-up and state-floating reinjection provided in an embodiment of this application; Figure 5This is a schematic diagram of time-triggered dynamic allocation and arbitration of computing resources provided in an embodiment of this application. Detailed Implementation

[0020] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.

[0021] This application provides an event-driven constellation cross-granularity state switching simulation method and system. It constructs macroscopic behavioral models and microscopic information flow models for each satellite node in the constellation. Through a global event listening and arbitration engine, when a specific spatial, network, or physical constraint event is triggered (meeting the trigger event conditions), the microscopic information flow model is activated only for the target satellite node. Simultaneously, a global state mapping dictionary is used to convert macroscopic continuous physical quantities into registers, caches, and interrupt contexts in the microscopic information flow model, achieving hot start through bypass injection. After the trigger event ends, the microscopic execution results are injected back into the macroscopic behavioral model after time window integration and error smoothing. This application reduces overall computing power consumption while ensuring high-fidelity simulation of critical tasks, and improves the real-time performance, stability, and engineering applicability of large-scale constellation simulations.

[0022] Please see Figure 1 The first embodiment of this application provides a constellation cross-granularity state switching simulation method based on event-driven methods, comprising the following steps: S1: Construct multi-granularity digital satellite simulation entities, including macroscopic behavior models and microscopic information flow models.

[0023] Please see Figure 2 For the satellite constellation to be simulated, a hierarchical dual-granularity digital satellite simulation entity is constructed for each satellite node in the constellation. This entity includes two types of granular models: a macroscopic behavioral model and a microscopic information flow model. Based on the model instances of all satellite nodes, a macroscopic hierarchical simulation pool and a microscopic hierarchical information flow simulation pool for the satellite constellation are formed respectively. The two are connected through a global state mapping dictionary and conversion rules to achieve bidirectional conversion between continuous physical quantities and discrete register / buffer states.

[0024] For details, please refer to Figure 3 The Low-Level of Detail (LLOD) model does not execute the actual binary target code onboard. Based on a system of ordinary differential equations, it uses large-step numerical integration (typically limited to 100 milliseconds to 10 seconds) to simulate the rigid body dynamics and kinematic characteristics of the satellite. Its state variables are continuous physical quantities of double-precision floating-point type. The LLOD model specifically includes: The attitude and orbit dynamics solution module includes an orbit recursive based on J2 perturbation and atmospheric drag, and a rigid body attitude dynamics and kinematics solver, which is used to describe the macroscopic motion state of the satellite in space.

[0025] The energy balance calculation module includes a solar vector-based illumination and shading determination module, as well as a macroscopic energy balance module for calculating the output power of the solar array and the charge / discharge depth of the batteries, used to assess the power budget of the satellite during its orbital operation.

[0026] The High-Level of Detail (HLOD) model fully mounts and executes the actual onboard binary target code. This model constructs a virtual hardware environment based on an instruction-level and register-level architecture. The time advancement step (second step) matches the virtual processor clock cycle (typically on the order of nanoseconds to microseconds). Its state variables are represented by discrete CPU register values, memory stack data, and I / O port levels. The HLOD model specifically includes: The virtual CPU core, equipped with instruction set decoding, pipeline, and memory-associative units, is used to precisely execute onboard flight software instructions.

[0027] The peripheral interface circuit simulation unit features configurable peripheral interfaces (such as UART, SPI, CAN, 1553B, etc.) and includes an independent transmit / receive FIFO and register / interrupt controller for simulating chip-level communication interactions.

[0028] Specifically, the peripheral interface circuit simulation unit supports configurable modeling. By parsing external XML configuration files, it dynamically maps the register structures of various peripheral interfaces in the virtual memory space. Taking the UART interface as an example, the micro-information flow model maps core registers such as the receive data register (RX_REG) and the status register (STATUS_REG, containing flags such as RX_FIFO_NOT_EMPTY). The peripheral interface circuit simulation unit has an independent transmit / receive FIFO and interrupt controller, and encapsulates a timer process for simulating interface timing. When external data is written to the RX_FIFO, the transmission delay (approximately 86.8 microseconds / byte) is calculated based on the configured baud rate (e.g., 115200bps). After each delay cycle, the model automatically updates the status bits of STATUS_REG and, when the receive interrupt is enabled, sends the corresponding interrupt request line (IRQ) request to the interrupt controller via the virtual bus, thereby accurately simulating the real-time behavior of chip-level communication interaction.

[0029] The stand-alone information flow protocol conversion unit converts the continuous physical quantities output by the sensor physical model into digital message formats that conform to the actual interface control document (ICD), thereby realizing the connection between physical quantities and digital instructions.

[0030] Furthermore, a global state mapping dictionary is constructed and registered to establish mapping and transformation rules between continuous state parameters in the physical space and discrete register / memory address spaces in the microscopic information flow model. The global state mapping dictionary is configured with reverse parsing algorithms from physical quantities to digital quantities (such as A / D conversion quantization operators in sinking mapping, floating-point number to standard byte order conversion, and protocol framing encapsulation operators) and forward synthesis algorithms from digital quantities to physical quantities, for cross-granularity state switching between the macroscopic behavioral model and the microscopic information flow model.

[0031] Specifically, the global state mapping dictionary is used to decouple the macroscopic continuous physical quantities in the macroscopic behavior model from the microscopic discrete data protocols in the microscopic information flow model. This dictionary is represented in memory as a hash-map-based mapping tree data structure, implemented using XML configuration files and a DLL dynamic link library, establishing mapping transformation rules between continuous state parameters in physical space and discrete register / memory address spaces in the microscopic information flow model. Each mapping node in the mapping transformation rules contains the following key underlying fields: Mapping source identifier (Source_ID), which points to a memory pointer of a macroscopic state variable (such as ¯o_Roll_Angle); The target set (Target_List) allows the same physical quantity to be mapped to multiple underlying registers (e.g., macroscopic temperature values ​​need to be injected into the virtual thermistor ADC channel register and the watchdog environmental monitoring register at the same time). The safety fallback logic (Fallback_Policy) states that if the physical quantity calculated by the macroscopic behavior model exceeds the maximum bit width of the target register after quantization (such as exceeding the 0xFFFF range of a 16-bit ADC), the saturation clamping algorithm built into the global state mapping dictionary will forcibly lock the injected physical quantity at the physical maximum value and throw a mapping out-of-bounds alarm to prevent the onboard software from reading erroneous data after overflow wrap-around.

[0032] The mapping version number (Map_Version) is used to identify the onboard software version, peripheral protocol version, and mission configuration version corresponding to the current mapping conversion rule, so as to avoid misuse of old mapping relationships in different mission scenarios.

[0033] The Map_Checksum flag is used to perform consistency checks on the target data frame format, length, and key field of the mapping node before the event is triggered. If the check fails, the sinking injection will be rejected and a mapping mismatch alarm will be output.

[0034] S2: During the cruise phase of the multi-granularity digital satellite simulation entity, a process is allocated to the macroscopic behavior model of the satellite node, trigger event conditions are preset, and events during the cruise phase are monitored and judged.

[0035] During system initialization or when the constellation is in normal cruise mode, the simulation system's time scheduler primarily allocates computation time to the macroscopic behavioral models of the satellite nodes. The microscopic information flow model processes are in a dormant or suspended state. The clock synchronization device drives the macroscopic behavioral models in steps (e.g., 1000 milliseconds), solving ordinary differential equations related to satellite orbits and attitudes through numerical integration.

[0036] A global event listener runs within the global event listening and arbitration engine. At the end of each first step, it collects macroscopic state data vectors from all satellite nodes and performs logical judgments based on the trigger rule base. Specifically, the trigger event conditions set in the trigger rule base include: Spatial geometric proximity events: nodes With nodes relative position vector magnitude The distance is less than the preset inter-satellite communication link establishment threshold or rendezvous and docking distance threshold.

[0037] Network topology and command scheduling events: The uplink transmission software of the ground telemetry and control station reconstructs the injected frame in orbit, or the onboard network routing table switches links based on ephemeris predictions.

[0038] Physical parameter limit exceeding alarm event: The depth of discharge (DOD) of the power system of a certain node or the thermal control temperature of a critical unit exceeds the set threshold. It is necessary to evaluate the autonomous fault diagnosis and system-level fault-tolerant control logic of the underlying onboard software.

[0039] To prevent the concurrent sinking of multiple nodes in a giant constellation from causing a collapse in the host's physical server's computing power, a weighted resource arbitration mechanism is built into the global event listener. This defines an event priority sequence (e.g., hardware fault tolerance exceeding limits alarm [highest priority]). Complex attitude maneuver planning 】).

[0040] When multiple triggering events are detected within the same simulation cycle, the time scheduler calculates the core computing power requirement corresponding to the total number of micro-information flow instances to be activated. If core computing power requirements Greater than the current physical server's remaining computing power threshold The time scheduler will push low-priority nodes into the event waiting queue according to priority weights to postpone their sinking, ensuring that the target satellite of high-priority nodes can be allocated an exclusive virtual CPU process, thus guaranteeing the strict real-time performance of the microscopic simulation.

[0041] Among them, core computing power requirements The remaining computing power threshold is estimated by combining the number of micro-information flow instances to be activated, the main frequency of the virtual processor attached to each instance, the number of peripheral models, and the expected interrupt density during the event. It can be expressed as the sum of the computational load of each target satellite node within a unit simulation time window. The number of idle virtual CPU cores, allocable memory, and virtual bus scheduling overhead on the current host machine are allotted.

[0042] S3: When a satellite node is determined to meet the trigger event conditions, the state is switched to the micro information flow model and a hot start is performed; for satellite nodes that do not meet the trigger event conditions, the process continues to be allocated by the macro behavior model.

[0043] When a satellite node is detected to meet the trigger event conditions, the system enters the cross-granularity state sinking and micro-hot start phase. When the global event listener determines that the target satellite node (denoted as node A) meets any trigger event condition, the system initiates the switching process from the macro-behavioral model LLOD to the micro-information flow model HLOD.

[0044] Please see Figure 3-4 The time scheduler first locks the current global simulation timestamp. The current internal state variables of the macroscopic behavior model of the target satellite node (node ​​A) are temporarily stored, and the macroscopic behavior model process corresponding to the node is placed in a blocked state (macroscopic suspension) to prevent the macroscopic state from continuing to evolve during the execution of the microscopic information flow model, which would lead to cross-granularity state mismatch.

[0045] Based on the target satellite node (Node A) in the global simulation timestamp Macroscopic continuous state vector at time t (including location) ,speed Posture Quaternions angular velocity Bus voltage (etc.), call the global state mapping dictionary, use the preset transformation operator in the reverse analysis algorithm to reverse analyze and discretize the macroscopic continuous state vector (continuous physical quantity), convert it into register values, cache data and interrupt context information that can be recognized by the underlying hardware, and obtain the reverse analysis result.

[0046] Specifically, based on the global state mapping dictionary, a reverse parsing process from macro to micro (i.e., sinking mapping) is implemented, with the following specific steps: The global mapping dictionary is retrieved based on the triggering event conditions to obtain the data frame definition of the mapping target (including frame header, data field length, checksum rules, etc.). Based on the data frame definition of the mapping target, the conversion operators in the DLL (Dynamic Link Library) of the global mapping dictionary are called to convert the macroscopic continuous physical quantity (macroscopic continuous state vector, such as attitude Euler angles) into a discrete expression in the target coordinate system (such as quaternions), and quantize it into an integer digital quantity by scaling factor according to the interface protocol. Based on the micro-hardware architecture (such as big-endian / little-endian mode), the byte order is rearranged, the checksum is calculated, and the protocol is framed to generate a byte stream (reverse parsing result, binary sensor data stream). The generated byte stream is directly written into the RX_FIFO underlying data structure of the corresponding peripheral interface (such as UART) of the micro-information flow model in a bypass injection manner (bypassing the conventional external bus timing), providing an initial environment for the hot start of the onboard software.

[0047] Based on the reverse analysis results, a micro-execution context corresponding to the current running time of the target satellite node (node ​​A) is constructed, specifically including: The generated reverse parsing results (byte stream or binary sensor data stream) are framed according to the preset spaceborne protocol format and mapped to the target peripheral interface according to the configured address offset; bus voltage Engineering parameters such as ambient temperature are converted into digital quantities according to the quantization resolution of the corresponding ADC (analog-to-digital converter); Generation and global simulation timestamps Aligned RTC / Timer (real-time clock or timer in spaceborne hardware) counts ensure complete time synchronization between the microscopic information flow model and the macroscopic behavioral model; Based on the target hardware's operating state, determine the status registers that need to be set and the external interrupt request sources that need to be triggered.

[0048] This creates a micro-execution context that can be directly loaded into the micro-information flow model, including register snapshots, cached contents, and interrupt triggering conditions.

[0049] In the hot-start phase of the microscopic information flow model, hot start in this application does not refer to the conventional system power-on reset startup, but rather to the freezing of the global simulation timestamp. Under the premise of [unclear context], the micro-execution context is transformed through quantization and bit-field concatenation, bypassing the conventional bus transmission delay (bypass injection), and instantaneously statically written into the receive FIFO, ADC result register, and RTC / Timer counter, and then the corresponding interrupt request line (IRQ) is forcibly pulled high. When the virtual CPU resumes the clock pulse, the target code directly responds to the interrupt and reads the ready data, thereby maintaining the spatiotemporal continuity of the logic execution flow. Specifically, the system executes in the following order: Freeze the macroscopic timestamp and external input sampling time corresponding to the target satellite node (Node A); Based on the global state mapping dictionary, the micro execution context is loaded into the target register, receive buffer, interrupt context and shared memory region respectively; The binary sensor data stream (byte stream, reverse parsing result) is bypassed and written to the target peripheral's receive FIFO. The quantized engineering parameters are written to the virtual ADC controller's result register, and the RTC / Timer counter is set to match the current global simulation timestamp. Consistent time base position; Set the corresponding status bits and drive the corresponding external hardware interrupt request pin IRQ of the virtual CPU interrupt controller to be valid (i.e., pull IRQ high). Release the process lock of the micro-information flow model of the target satellite node (Node A), switch the propulsion step size allocated to the target satellite node (Node A) to the second step size, and release the virtual CPU clock, so that the onboard target code can resume execution from the preset breakpoint.

[0050] Through the above sequential processing, the onboard software can directly read the ready registers and cache data after resuming execution and respond to the corresponding interrupt requests. This allows cross-granularity state inheritance to be completed without replaying the conventional bus transmission delay, avoiding race conditions, logic mismatches and time continuity disruptions caused by first restoring the virtual CPU and then injecting the state.

[0051] During this process, the target satellite node (node ​​A) that meets the trigger event conditions operates in a micro-information flow model, and the onboard software performs instruction-level data processing, bus scheduling, and control law calculation; while the remaining satellite nodes in the satellite constellation that do not meet the trigger event conditions continue to maintain the large-step extrapolation of the macro-behavioral model.

[0052] S4: After the triggered event ends, switch to the macro behavior model to continue cruising, and repeat this process.

[0053] Please see Figure 3-4 After the micro-tasks executed by the micro-information flow model are completed and the exit conditions are met, the system enters the state floating back injection and macro-recovery phase.

[0054] Specifically, the global event listener determines whether the micro-tasks related to the triggering event have been completed based on the memory variables of the micro-information flow model or the state of specific peripheral registers (such as the completion flag of the inter-satellite link underlying handshake protocol).

[0055] If it is determined that the current micro-task has been completed, freeze the current timestamp. Pause the clock pulse of the microscopic information flow model of the target satellite node (Node A). Extract the global simulation timestamp. up to the current timestamp During this period, the onboard software outputs control sequences, cumulative power consumption integral values, and attitude and trajectory correction increments to micro-actuators (such as reaction flywheel controllers and magnetic torque converters).

[0056] Using the forward transformation operator of the forward synthesis algorithm in the global state mapping dictionary, time-window integral synthesis and back-injection are performed on the extracted control sequence, cumulative power consumption integral value, and attitude correction increment within the software. Specifically, the underlying discrete control sequence is synthesized using time-window numerical integration to solve for the equivalent physical correction increment; the cumulative power consumption integral value and the attitude correction increment within the software are directly parsed by the forward protocol and used as back-injection compensation amounts. For example, based on the physical model of the actuator (such as a flywheel), the discrete control command sequence (such as PWM duty cycle) is restored to the actual output torque sequence. Subsequently Within the interval, higher-order numerical integration (such as the fourth-order Runge-Kutta method) is used to solve the problem, obtaining the cumulative correction increment (such as attitude fine-tuning) within that time window. ).

[0057] To prevent the cumulative correction increment within this time window from being directly injected into the macroscopic behavior model, which could cause non-convergent numerical chattering in the first derivative (such as angular velocity), the system employs Kalman gain smoothing filtering. This allows the cumulative correction increment within the time window to be evenly distributed and compensated for in the state vector of the macroscopic behavior model over several subsequent steps. This ensures the numerical stability of the system during cross-level switching.

[0058] In this system, the state variable of the Kalman gain smoothing filter is the back-injection compensation amount to be allocated (cumulative correction increment), and the observables are the equivalent physical correction value output by the microscopic information flow model at the end of the event and the attitude correction increment inside the software. Based on the set release window length (one or more macroscopic step sizes), the system gradually releases and compensates the equivalent physical correction value to the state vector of the macroscopic behavior model in a time-weighted manner. In order to suppress numerical step and derivative mutation caused by instantaneous switching across granularities.

[0059] Reset the interrupted state and peripheral FIFO of the microscopic information flow model, suspending its host process. Release the computing resources occupied by the target satellite node (Node A), resume the large-step numerical integration solution process of the macroscopic behavior model of the target satellite node (Node A), and the constellation as a whole returns to the full macroscopic cruise state.

[0060] Please see Figure 2The second embodiment of this application provides an event-driven constellation cross-granularity state switching simulation system, which includes: a macro-level simulation pool, a micro-level information flow simulation pool, a global event listening and arbitration engine, a simulation scheduling and control center, and a global state mapping dictionary.

[0061] The macroscopic-level simulation pool is used to run the macroscopic behavior model of satellite nodes in a large-step numerical integration manner to realize the cruise state of the macroscopic behavior model.

[0062] The micro-level information flow simulation pool is used to run the micro-information flow model of the target satellite node that meets the trigger event conditions with instruction-level precision, so as to realize the simulation of the behavior of the onboard software.

[0063] The global event listening and arbitration engine is used to listen for changes in the state of satellite nodes, determine whether the conditions for triggering events are met, and perform resource arbitration when multiple events occur concurrently.

[0064] The simulation scheduling and control center is used for time synchronization, step size switching, process scheduling, and controlling the execution flow of state switching.

[0065] A global state mapping dictionary is used to establish bidirectional conversion rules between macroscopic behavioral models and microscopic information flow models, thereby completing state switching.

[0066] Example 1: Closed-loop simulation of inter-satellite laser communication link establishment events in large constellations.

[0067] The following example uses a constellation simulation scenario containing 1000 low-Earth orbit satellites to illustrate in detail how this application completes the dynamic adaptive simulation and deduction of "inter-satellite laser communication link establishment handshake" based on event-driven principles.

[0068] Initially, the simulation platform's time scheduler sets the time step. The timeout period is set to 1000 milliseconds. All 1000 satellites in the system run the macroscopic attitude and orbit dynamics calculation and energy balance calculation modules with relatively low computational overhead. The global event listener reads the macroscopic position vectors of each satellite node during each simulation cycle. .

[0069] When the simulation progresses to At a certain time, the global event listener calculates and determines the relative distance between satellite node S12 and satellite node S58, which are located in adjacent orbits. If the distance is shortened to within a preset triggering distance threshold (e.g., 5000 km), the system determines that the triggering event conditions for the inter-satellite link establishment preparation event are met.

[0070] At this time, the global clock is The process is currently paused. The system's time scheduler allocates simulation computing resources for the microscopic information flow model to satellite nodes S12 and S58, loads their actual onboard software firmware (including the laser communication APT acquisition and tracking algorithm) into memory, and initializes the virtual processor kernel.

[0071] In macro behavioral models The illumination conditions, relative position vector, and platform attitude deviation angle at each second are converted into the ADC voltage value and the digital coordinates of the laser communication terminal's spot center required in the microscopic information flow model. This data is then directly written into specific I / O registers of the microscopic information flow model of satellite node S12 and satellite node S58 via a global state mapping dictionary, and the real-time clock (RTC) is set synchronously.

[0072] The clock synchronization device switches the time step allocated to satellite nodes S12 and S58 from 1000 milliseconds to 10 microseconds. The virtual CPU kernel resumes from the hibernation interrupt, the onboard software detects data updates in the underlying sensor registers, triggers the corresponding interrupt response, and begins executing the microcontroller logic.

[0073] During this phase, the 998 satellite nodes in the constellation that did not participate in link building still maintained a large step size of 1000 milliseconds to save system computing power.

[0074] Meanwhile, the onboard software of target satellite node S12 and satellite node S58 performs high-frequency laser terminal control law and servo mechanism drive calculation, and sends low-level handshake signaling through virtual serial port interface.

[0075] If, during this highly sequential chain-building process, the node software causes the chain-building to be interrupted due to task stack overflow, watchdog reset, or protocol verification failure, such anomalies caused by inherent software logic defects or hardware timing mismatches will be effectively recorded in the test log by the micro-simulation system, thereby making up for the shortcomings of traditional macro-simulation in being unable to detect underlying software defects.

[0076] Assuming normal interaction between the onboard software and the underlying handshake protocol, the chain establishment is completed after 2 seconds of simulation (i.e., the simulation time reaches...). At a certain time (seconds), the register flags representing the state of the laser terminal in the microscopic information flow model (such as LINK_ESTABLISHED) change.

[0077] The global time listener captures this flag and determines that the current micro-cooperative task has ended.

[0078] The system pauses the microscopic model advancement and extracts data from satellite nodes S12 and S58. Instant The cumulative amount of actual reaction torque generated by the attitude control flywheel driven by the control algorithm during the second, and the actual high-frequency energy consumption integral value during the period.

[0079] By using the forward transformation of the state mapping dictionary, the aforementioned torque and energy consumption correction values ​​are compensated into the macroscopic behavior models of satellite nodes S12 and S58, updating their attitude and battery capacity.

[0080] Finally, the system resets and suspends the microprocess resources of satellite nodes S12 and S58. Satellite nodes S12 and S58 return to the macroscopic inference mode with a step size of 1000 milliseconds, and the constellation as a whole resumes low-power cruise state, completing one closed-loop computing power elastic allocation cycle, and waiting for the next event to be triggered.

[0081] If a mapping dictionary verification failure, target register being unwritable, critical peripheral initialization not completed, or required computing power is detected during the sinking injection phase, the system will not execute the micro-information flow model activation. Instead, it will mark the current event as a degraded processing event and keep the target satellite node running in the macro-behavioral model. At the same time, it will record the cause of the anomaly and the pending processing identifier for arbitration in subsequent simulation cycles.

[0082] Please see Figure 5 This application dynamically assesses the demand for additional core computing power based on the triggering and resolution of events along the simulation timeline. Compared with the host machine's computing power capacity threshold The relationship is established, and the allocation, delayed sinking, and release and recovery of micro-simulation resources of the focus node are realized through resource arbitration and event waiting queue mechanism.

[0083] In summary, this application utilizes spatial and network constraint events to establish a dynamic resource allocation mechanism and constructs a cross-level data conversion channel through the injection of underlying registers and environmental states. Without compromising the accuracy of key collaborative mission simulations or the fidelity of onboard software operation, it significantly improves the utilization rate of the simulation system's computational resources, thereby providing efficient and stable fully digital closed-loop testing support for large-scale mega-constellations.

[0084] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0085] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An event-driven simulation method for constellation cross-granularity state switching, characterized in that, Includes the following steps: Construct multi-granularity digital satellite simulation entities, including macroscopic behavior models and microscopic information flow models; During the cruise phase of the multi-granularity digital satellite simulation entity, a process is assigned to the macroscopic behavior model of the satellite node, trigger event conditions are preset, and events during the cruise phase are monitored and judged. When it is determined that a certain satellite node meets the triggering event condition, the state is switched to the microscopic information flow model and a hot start is performed. For satellite nodes that do not meet the trigger event conditions, the process will continue to be assigned by the macroscopic behavior model; After the triggering event ends, the state switches to the macroscopic behavior model to continue cruising, and this process is repeated.

2. The event-driven constellation cross-granularity state switching simulation method as described in claim 1, characterized in that, The macroscopic behavior model includes an attitude and orbit dynamics solution module and an energy balance calculation module; The attitude and orbit dynamics solution module is used to describe the macroscopic motion state of the satellite in space; The energy balance calculation module is used to assess the power consumption of a satellite during its orbital operation.

3. The event-driven constellation cross-granularity state switching simulation method as described in claim 1, characterized in that, The micro-information flow model includes a virtual CPU kernel, a peripheral interface circuit simulation unit, and a single-machine-level information flow protocol conversion unit. The virtual CPU kernel is used to execute onboard flight software instructions; The peripheral interface circuit simulation unit is used to simulate chip-level communication interaction; The stand-alone information flow protocol conversion unit is used to convert the continuous physical quantities output by the sensor physical model into digital message formats that conform to the actual interface control document.

4. The event-driven constellation cross-granularity state switching simulation method as described in claim 1, characterized in that, The macro-behavioral model and the micro-information flow model switch states through a global state mapping dictionary; The global state mapping dictionary is equipped with a reverse parsing algorithm and a forward synthesis algorithm from digital quantities to physical quantities.

5. The event-driven constellation cross-granularity state switching simulation method as described in claim 1, characterized in that, An event priority sequence is defined. When multiple events that meet the trigger event conditions are detected during the cruise phase, the time scheduler sends the events with lower priority weights into the waiting queue according to the priority weights of the time, and allocates processes to the events with higher priority weights.

6. The event-driven constellation cross-granularity state switching simulation method as described in claim 4, characterized in that, The process of switching to the microscopic information flow model includes: locking the current global simulation timestamp, temporarily storing the current internal state variables of the macroscopic behavior model in the target satellite node that meets the trigger event conditions, and blocking the process of the macroscopic behavior model; Based on the macroscopic continuous state vector of the target satellite node at the global simulation timestamp, the global state mapping dictionary is called, and the macroscopic continuous state vector is reverse-analyzed and discretized using the reverse analysis algorithm to obtain the reverse analysis result; Based on the reverse analysis results, a micro-execution context corresponding to the current running time of the target satellite node is constructed, directly loaded into the micro-information flow model for execution, and the state is switched to the micro-information flow model to complete instruction-level precision operation.

7. The event-driven constellation cross-granularity state switching simulation method as described in claim 6, characterized in that, The process of performing the warm start includes: loading the micro execution context into the target register, the receive buffer, and the interrupt context according to the global state mapping dictionary; Write the reverse analysis result into the peripheral FIFO and ADC, and set the counter to the time base position consistent with the current global simulation timestamp; The virtual CPU clock is interrupted and released, and the target code resumes execution from the preset interrupt node, directly responding to the interrupt and reading data.

8. The event-driven constellation cross-granularity state switching simulation method as described in claim 6, characterized in that, The process of switching to the macroscopic behavior model includes: determining that the microscopic task of the current microscopic information flow model has been completed, freezing the current timestamp, and extracting the control sequence, cumulative power consumption integral value, and attitude and orbit correction increment output by the onboard software to the actuators in the microscopic information flow model during the period from the global simulation timestamp to the current timestamp. Using the forward synthesis algorithm, the control sequence is numerically integrated over a time window to obtain the equivalent physical correction increment; the cumulative power consumption integral value and the attitude correction increment are analyzed using the forward protocol to obtain the injection compensation amount. Using Kalman gain, the equivalent physical correction increment is evenly distributed and compensated to the state vector of the macroscopic behavior model within several steps of the macroscopic behavior model; The interruption state and peripheral FIFO of the microscopic information flow model are reset, computing resources are released, the large-step numerical integration solution process of the target satellite node in the macroscopic behavior model is resumed, and the cruise state of the macroscopic behavior model is realized.

9. The event-driven constellation cross-granularity state switching simulation method as described in claim 6, characterized in that, The process of obtaining the reverse analysis result using the reverse analysis algorithm includes: based on the macroscopic continuous state vector of the target satellite node at the global simulation timestamp; Based on the triggering event conditions, the global state mapping dictionary is retrieved to obtain the data frame definition of the mapping target; Based on the data frame definition of the mapping target, the reverse parsing result is generated by calling the transformation operators in the global mapping dictionary to perform global mapping dictionary coordinate system transformation, quantization, byte order rearrangement, checksum calculation and protocol framing on the macroscopic continuous state vector.

10. An event-driven constellation cross-granularity state transition simulation system, applied to the event-driven constellation cross-granularity state transition simulation method described in any one of claims 1-9, characterized in that, include: Macro-level simulation pool, micro-level information flow simulation pool, global event listening and arbitration engine, simulation scheduling and control center, and global state mapping dictionary; The macroscopic-level simulation pool is used to run the macroscopic behavior model of the satellite node in a large-step numerical integration manner to realize the cruise state of the macroscopic behavior model; The global event listening and arbitration engine is used to listen to the state changes of the satellite nodes, determine whether the triggering event conditions are met, and perform resource arbitration when multiple events occur concurrently. The simulation scheduling and control center is used for time synchronization, step size switching, process scheduling, and controlling the execution flow of state switching. The micro-level information flow simulation pool is used to run the micro-information flow model of the target satellite node that meets the trigger event conditions with instruction-level precision, so as to realize the simulation of the behavior of the onboard software. The global state mapping dictionary is used to establish bidirectional conversion rules between the macroscopic behavior model and the microscopic information flow model to complete state switching.