Parallel simulation design method suitable for single-computer multi-aircraft real-time simulation
By combining Windows and RTX systems on a single machine, a parallel simulation architecture was designed, which solved the problem of real-time parallel simulation of multiple aircraft, met the real-time requirements and enabled program expansion, and is suitable for hardware-in-the-loop simulation systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING AEROSPACE TECH INST
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, it is difficult for a single machine to achieve real-time parallel simulation of multiple aircraft, resulting in a disconnect between simulation time and physical time, which fails to meet real-time requirements.
A parallel simulation design method based on Windows system and RTX real-time operating system is adopted. By creating a main scheduling module and multiple parallel simulation modules, the main scheduling module initializes parallel scheduling events, sets timer modules and termination instructions, and designs the computation logic of parallel simulation modules to realize parallel real-time simulation of multiple aircraft.
It achieves real-time parallel simulation of single-aircraft multi-aircraft, meets real-time requirements, and can expand the simulation program, making it suitable for hardware-in-the-loop simulation systems.
Smart Images

Figure CN122113713A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aircraft technology, and in particular to a parallel simulation design method suitable for real-time simulation of single-aircraft and multi-aircraft systems. Background Technology
[0002] Serial simulation has significant limitations in real-time verification scenarios for complex systems. The core problem is that the sequential execution model of a single node experiences a substantial increase in computational load when faced with complex dynamic modeling, multi-vehicle dynamic simulation, and high-fidelity dynamic response calculation. This leads to a disconnect between simulation time and physical time, making it impossible to meet real-time requirements. Parallel simulation, on the other hand, breaks down the simulation work that was originally processed serially by computing units into multiple sub-tasks according to certain rules. These sub-tasks are then distributed to different computing units for parallel computation, and the results are integrated through a synchronization mechanism. This addresses the problem of long simulation times for large-scale, highly complex systems.
[0003] However, existing single-machine simulations are insufficient for real-time parallel simulation of multiple aircraft. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a parallel simulation design method suitable for real-time simulation of multiple aircraft in a single machine, which can solve the problem that it is difficult for a single machine to perform real-time parallel simulation of multiple aircraft in the prior art.
[0005] The technical solution of this invention: a parallel simulation design method suitable for real-time simulation of single-aircraft multi-vehicle systems, wherein the method is executed based on the Windows system and the RTX real-time operating system, and the method includes:
[0006] Design a parallel real-time simulation architecture, which includes a main scheduling module and multiple parallel simulation modules;
[0007] Based on the RTX real-time software package, a main scheduling module is created for the initialization of the parallel real-time simulation program, the creation and scheduling of parallel simulation modules, and the termination of the parallel real-time simulation program according to the termination instruction.
[0008] Initialize parallel scheduling events using the main scheduling module;
[0009] Parallel sub-threads are created using the main scheduling module to obtain multiple parallel simulation modules;
[0010] Use the main scheduling module to set up the timing module;
[0011] The dynamic model, guidance control law, and shared memory are encapsulated into multiple parallel simulation modules, resulting in multiple dynamic simulation modules, multiple guidance control modules, and a shared module;
[0012] Design the computational logic for the parallel simulation module;
[0013] Set the end command for parallel real-time simulation.
[0014] Preferably, initializing parallel scheduling events using the main scheduling module includes:
[0015] Load variables and aircraft initialization parameters according to the simulation task requirements, and initialize the parallel real-time simulation program.
[0016] Preferably, setting the timing module includes setting the scheduling cycle and solution cycle of the parallel simulation module.
[0017] Preferably, the dynamics simulation module is used to perform atmospheric calculations, aerodynamic calculations, dynamic and kinematic equation calculations, and integral operations to obtain the aircraft state.
[0018] Preferably, multiple guidance and control modules are used to calculate control commands based on the aircraft state obtained from the dynamics simulation module.
[0019] Preferably, the shared module is used for data interaction between various independent parallel simulation modules and for storing aircraft trajectory data.
[0020] Preferably, the design of the parallel simulation module computational logic includes:
[0021] The first step is to wait for the timing module to issue the execution command;
[0022] The second step is that when the timing module issues an execution command, the parallel simulation module determines whether to end the simulation based on the actual simulation task requirements. If the result is true, the parallel simulation module ends the simulation; otherwise, it proceeds to the next step.
[0023] The third step is to perform dynamics and / or guidance and control calculation tasks.
[0024] Fourth step: After the simulation task is completed, set the scheduling event corresponding to the parallel simulation module to false, and return to the first step, repeating the process until the termination criterion is met.
[0025] Preferably, the termination instructions include internal termination instructions and external termination instructions. The internal termination instructions include the termination instructions of the main scheduling module and the termination instructions of the parallel simulation modules. The termination instructions of the main scheduling module are used to terminate the calculations of all parallel simulation modules, while the termination instructions of the parallel simulation modules are only used to terminate the calculations of the corresponding simulation modules. The external termination instructions are emergency termination instructions given from outside the parallel simulation program.
[0026] Based on the above technical solution, and considering the real-time simulation requirements of single-machine multi-aircraft systems, and taking into account the characteristics of Windows and RTX systems, the method of this invention provides a real-time simulation architecture for single-machine multi-aircraft systems that incorporates multi-threaded parallel technology. First, a main scheduling module is created to schedule the parallel simulation modules for multiple aircraft. Then, the operating logic of the parallel simulation modules is designed, and timer settings ensure that the parallel simulation modules strictly meet real-time requirements. Next, timer trigger intervals are set to strictly control the scheduling of the parallel real-time simulation program. Finally, a termination criterion is used to terminate the program's execution, thus solving the technical problem in existing technologies where single-machine systems struggle to perform real-time parallel simulation of multiple aircraft. The advantages of this method are as follows:
[0027] (1) It can solve the problem of parallel real-time simulation of multiple aircraft that is difficult to solve with a single machine;
[0028] (2) The program can be expanded by adding a parallel simulation module;
[0029] (3) This simulation architecture can be used in hardware-in-the-loop simulation systems. Attached Figure Description
[0030] The accompanying drawings, which form part of this specification, are provided to further illustrate embodiments of the invention and, together with the textual description, explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0031] Figure 1 A flowchart illustrating a parallel simulation design method suitable for real-time simulation of single-aircraft multi-vehicle systems, provided as an embodiment of the present invention;
[0032] Figure 2 This is a schematic diagram of the real-time simulation architecture for multiple aircraft in an embodiment of the present invention;
[0033] Figure 3 This is a schematic diagram of the computational logic of the parallel simulation module in an embodiment of the present invention. Detailed Implementation
[0034] Specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. In the following description, specific details are set forth for purposes of explanation and not limitation, in order to aid in a thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention may be practiced in other embodiments departing from these specific details.
[0035] It should be noted that, in order to avoid obscuring the invention with unnecessary details, only the device structure and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0036] Figure 1 A flowchart illustrating a parallel simulation design method suitable for real-time simulation of single-aircraft multi-vehicle systems, provided as an embodiment of the present invention.
[0037] like Figure 1 As shown, this embodiment of the invention provides a parallel simulation design method suitable for real-time simulation of single-aircraft multi-vehicle systems. This method is executed based on a Windows system and an RTX real-time operating system, and includes:
[0038] Design a parallel real-time simulation architecture, which includes a main scheduling module and multiple parallel simulation modules;
[0039] Based on the RTX real-time software package, a main scheduling module is created for the initialization of the parallel real-time simulation program, the creation and scheduling of parallel simulation modules, and the termination of the parallel real-time simulation program according to the termination instruction.
[0040] Initialize parallel scheduling events using the main scheduling module;
[0041] This lays the foundation for the parallel execution of each simulation module, ensuring that each parallel simulation module starts up in an orderly and conflict-free manner within the framework of the calling module.
[0042] Parallel sub-threads are created using the main scheduling module to obtain multiple parallel simulation modules;
[0043] Among them, the parallel simulation module is the core computing module for parallel real-time simulation.
[0044] Use the main scheduling module to set up the timing module (timer);
[0045] In this process, the trigger conditions of the timer are set according to the actual simulation task requirements. The timer is based on the RTX real-time software package and can strictly control the scheduling of the real-time simulation program.
[0046] The dynamic model, guidance control law, and shared memory are encapsulated into multiple parallel simulation modules, resulting in multiple dynamic simulation modules, multiple guidance control modules, and a shared module (data sharing module).
[0047] This facilitates the scheduling of parallel simulation modules.
[0048] Design the computational logic for the parallel simulation module;
[0049] By designing the computational logic of the parallel simulation module, it can be made to strictly meet the real-time requirements.
[0050] Set the end command for parallel real-time simulation.
[0051] Specifically, a termination criterion for the parallel real-time simulation program is set according to the actual simulation task requirements. This criterion is used to terminate the parallel simulation module's computation when the module completes its computation task.
[0052] Based on the above technical solutions, and considering the real-time simulation requirements of single-machine multi-aircraft systems, and taking into account the characteristics of Windows and RTX systems, the present invention provides a real-time simulation architecture for single-machine multi-aircraft systems that incorporates multi-threaded parallel technology. First, a main scheduling module is created to schedule the parallel simulation modules for multiple aircraft. Then, the operating logic of the parallel simulation modules is designed, and timer settings ensure that the parallel simulation modules strictly meet real-time requirements. Next, timer trigger intervals are set to strictly control the scheduling of the parallel real-time simulation program. Finally, the program execution is terminated using an end criterion, thus solving the technical problem in the prior art where a single machine cannot perform real-time parallel simulation of multiple aircraft.
[0053] The Windows system provides an easy-to-use interface and powerful data processing capabilities, supporting system development, debugging, and data analysis. The RTX real-time operating system handles real-time simulation and control, ensuring the system can execute programs within strict time constraints, improving reliability and deterministic response. Simultaneously, the RTX operating system provides corresponding software and algorithm libraries for multi-threaded parallel technology, used to configure the number of parallel threads. Furthermore, on the Windows platform, users can directly add RTX real-time packages to achieve real-time system performance.
[0054] According to one embodiment of the present invention, simulation requirements can be analyzed based on actual tasks, such as the requirements for real-time dynamics simulation of several aircraft, simulation step size of aircraft dynamics and guidance control, and storage scale of key data such as aircraft flight trajectory. This allows for the identification of specific modules involved in the simulation and simulation step size parameters, such as dynamics simulation modules, guidance control modules, and data sharing modules. Considering the real-time requirements of each module, programs with less stringent real-time requirements and those requiring disk access during operation can be loaded into Windows system threads; programs with strict real-time requirements can be loaded into RTX system threads.
[0055] According to one embodiment of the present invention, initializing parallel scheduling events using the main scheduling module includes:
[0056] Load variables and aircraft initialization parameters according to the simulation task requirements, and initialize the parallel real-time simulation program.
[0057] According to one embodiment of the present invention, setting the timing module includes setting the scheduling cycle and the calculation cycle of the parallel simulation module.
[0058] According to one embodiment of the present invention, the dynamics simulation module is used to perform atmospheric calculations, aerodynamic calculations, dynamic and kinematic equation calculations, and integral operations to obtain the aircraft state.
[0059] According to one embodiment of the present invention, multiple guidance and control modules are used to calculate control commands based on the aircraft state solution obtained by the dynamics simulation module.
[0060] According to one embodiment of the present invention, the shared module is used for data interaction between various independent parallel simulation modules and for storing key data of the aircraft trajectory.
[0061] In other words, it is used for data exchange between various dynamics simulation modules, between various guidance and control modules, and between the dynamics simulation module and the guidance and control module, as well as for storing aircraft trajectory data.
[0062] According to one embodiment of the present invention, the design of the computational logic for the parallel simulation module includes:
[0063] The first step is to wait for the timing module to issue an execution command (set the corresponding simulation event to true, i.e., issue an execution command);
[0064] The second step is that when the timing module issues an execution command, the parallel simulation module determines whether to end the simulation based on the actual simulation task requirements. If the result is true, the parallel simulation module ends the simulation; otherwise, it proceeds to the next step.
[0065] The third step is to perform dynamics and / or guidance and control calculation tasks.
[0066] Fourth step: After the simulation task is completed, set the scheduling event corresponding to the parallel simulation module to false, and return to the first step, repeating the process until the termination criterion is met.
[0067] According to one embodiment of the present invention, the termination instruction includes an internal termination instruction and an external termination instruction. The internal termination instruction includes the termination instruction of the main scheduling module and the termination instruction of the parallel simulation module. The termination instruction of the main scheduling module is used to terminate the calculation of all parallel simulation modules, while the termination instruction of the parallel simulation module is only used to terminate the calculation of the corresponding simulation module. The external termination instruction is an emergency termination instruction given from outside the parallel simulation program.
[0068] The parallel simulation design method applicable to real-time simulation of single-aircraft multi-vehicle systems, as described in this invention, is described below with examples. Specifically, the method includes:
[0069] The design of the parallel real-time simulation architecture is the foundation for running multiple simulation modules. This includes: creating a main scheduling module to schedule the parallel simulation program; initializing parallel scheduling events to ensure orderly and conflict-free startup of the parallel simulation modules; creating parallel sub-threads to run the parallel simulation modules; setting a timing module to configure trigger conditions based on simulation requirements for strict control of the real-time simulation program's scheduling; encapsulating the dynamic model, guidance control law, and shared memory; designing the computational logic of the parallel simulation modules to ensure they meet real-time requirements; and setting a termination instruction for the parallel real-time simulation program as the criterion for ending the parallel simulation.
[0070] S1: Create the main scheduling module
[0071] Based on the analysis of actual task requirements, the specific modules involved in the simulation and the simulation step size parameters were identified. A main scheduling module was created based on the RTX real-time software package. The main scheduling module is the main function module of the parallel real-time simulation program, used for program initialization, creation and scheduling of parallel simulation modules, and termination of the parallel real-time simulation program according to internal and external termination instructions.
[0072] S2: Parallel scheduling event initialization
[0073] Load variables and aircraft initialization parameters according to the simulation task requirements, and initialize the parallel real-time simulation program.
[0074] S3: Parallel Sub-thread Creation
[0075] A parallel simulation module is created based on the actual simulation task requirements. The parallel simulation module is the core computing module of the entire parallel real-time simulation program.
[0076] S4: Timer Module Settings
[0077] The creation and setting of timers are based on the RTX real-time operating system. RTX uses HAL extension technology to install the Real-Time Subsystem RTSS for the Windows operating system and provides the RtWinAPI standard dynamic link library, which can be called by the Windows environment. In this way, the timer can guarantee the real-time performance of its thread.
[0078] Then, based on the actual simulation task requirements, the scheduling cycle of the parallel simulation module is set. Assuming the time step for aircraft dynamics calculation is 5ms and the time step for guidance and control calculation is 10ms, the timer module is set to set the event corresponding to the dynamics calculation module to true every 5ms, and the event corresponding to the guidance and control calculation module to true every 10ms, etc. By setting the timer module as described above, the calculation cycle of aircraft dynamics and guidance and control can be strictly controlled.
[0079] S5: Dynamics Model, Guidance and Control Law, and Shared Memory Encapsulation
[0080] Based on the actual simulation task requirements, different aircraft dynamic models and guidance control laws can be encapsulated into dynamic simulation modules (dynamic solution modules) 1, 2, ... n and guidance control modules (guidance control solution modules) 1, 2, ... n. Shared memory can be encapsulated into shared modules (shared memory modules), and the above modules can be placed in the parallel simulation module.
[0081] The dynamics simulation module can handle atmospheric calculations, aerodynamic calculations, dynamic and kinematic equation solving, and integral operations. The guidance and control module calculates control commands based on the aircraft state obtained from the dynamics calculation module. The shared module is mainly used for data interaction between independent simulation threads and for storing aircraft trajectory data. Data interaction allows the dynamics calculation module to access control commands calculated by the guidance and control module, while the guidance and control module can read aircraft state information. Simultaneously, critical data storage functions are placed in the shared memory module to prevent excessive computational resources from being consumed by data reading and writing, ensuring that the dynamics calculation module and guidance and control can complete calculations within the specified time steps, thus guaranteeing the real-time requirements of the program.
[0082] S6: Computational Logic Design for Parallel Simulation Module
[0083] The parallel simulation module operates in four steps, as follows: Figure 3 As shown: First, wait for the timer to issue an execution command (the corresponding simulation event is set to true); Second, when the timer issues the execution command, the parallel simulation module determines whether to end the simulation based on the actual simulation task requirements. If the determination result is true, the parallel simulation module ends the simulation; otherwise, it proceeds to the next step; Third, execute tasks such as dynamics or guidance and control calculations; Fourth, after the simulation task is completed, set the corresponding event of the module to false and return to the first step, repeating this process until the termination criterion is met.
[0084] S7: Set the end command for parallel real-time simulation
[0085] Termination commands can be categorized into external termination commands and internal termination commands based on their source. External termination commands are those issued from outside the parallel simulation program due to unforeseen circumstances or other unforeseen factors. Internal termination commands are pre-set within the program according to the actual simulation task requirements, such as a total real-time simulation duration of 10 minutes. Internal termination commands can be further divided into two categories based on actual needs: termination commands in the main scheduling module and termination commands in the parallel simulation modules. Termination commands from the main scheduling module are used to terminate the calculations of all parallel simulation modules, while termination commands from the parallel simulation modules are used only to terminate the calculations of their respective modules.
[0086] The features described and / or illustrated above with respect to one embodiment may be used in the same or similar manner in one or more other embodiments, and / or in combination with or in lieu of features in other embodiments.
[0087] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, whole, step, or component, but does not exclude the presence or addition of one or more other features, wholes, steps, components, or combinations thereof.
[0088] The apparatus and methods described above can be implemented in hardware or in combination with software. This invention relates to computer-readable programs that, when executed by a logic component, enable that logic component to implement the apparatus or constituent parts described above, or to implement the various methods or steps described above. This invention also relates to storage media for storing the above programs, such as hard disks, magnetic disks, optical disks, DVDs, flash memory, etc.
[0089] Many features and advantages of these embodiments are apparent from this detailed description, and therefore the appended claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. Furthermore, since many modifications and alterations will readily occur to those skilled in the art, the embodiments of the invention are not intended to be limited to the precise structures and operations illustrated and described, but rather to encompass all suitable modifications and equivalents falling within their scope.
[0090] The parts of this invention not described in detail are techniques known to those skilled in the art.
Claims
1. A parallel simulation design method suitable for real-time simulation of single-aircraft multi-vehicle systems, characterized in that, This method is executed based on the Windows system and the RTX real-time operating system, and includes: Design a parallel real-time simulation architecture, which includes a main scheduling module and multiple parallel simulation modules; Based on the RTX real-time software package, a main scheduling module is created for the initialization of the parallel real-time simulation program, the creation and scheduling of parallel simulation modules, and the termination of the parallel real-time simulation program according to the termination instruction. Initialize parallel scheduling events using the main scheduling module; Parallel sub-threads are created using the main scheduling module to obtain multiple parallel simulation modules; Use the main scheduling module to set up the timing module; The dynamic model, guidance control law, and shared memory are encapsulated into multiple parallel simulation modules, resulting in multiple dynamic simulation modules, multiple guidance control modules, and a shared module; Design the computational logic for the parallel simulation module; Set the termination command for parallel real-time simulation.
2. The method according to claim 1, characterized in that, Initializing parallel scheduling events using the main scheduling module includes: Load variables and aircraft initialization parameters according to the simulation task requirements, and initialize the parallel real-time simulation program.
3. The method according to claim 2, characterized in that, Setting up the timing module includes setting the scheduling cycle and calculation cycle of the parallel simulation module.
4. The method according to claim 3, characterized in that, The dynamics simulation module is used to perform atmospheric calculations, aerodynamic calculations, dynamic and kinematic equations solving, and integral calculations to obtain the aircraft state.
5. The method according to claim 4, characterized in that, Multiple guidance and control modules are used to calculate control commands based on the aircraft state obtained from the dynamics simulation module.
6. The method according to claim 5, characterized in that, The shared module is used for data interaction between various independent parallel simulation modules and for storing aircraft trajectory data.
7. The method according to claim 6, characterized in that, The design of the parallel simulation module's computational logic includes: The first step is to wait for the timing module to issue the execution command; The second step is that when the timing module issues an execution command, the parallel simulation module determines whether to end the simulation based on the actual simulation task requirements. If the result is true, the parallel simulation module ends the simulation; otherwise, it proceeds to the next step. The third step is to perform dynamics and / or guidance and control calculation tasks. Fourth step: After the simulation task is completed, set the scheduling event corresponding to the parallel simulation module to false, and return to the first step, repeating the process until the termination criterion is met.
8. The method according to any one of claims 1-7, characterized in that, The termination instructions include internal termination instructions and external termination instructions. Internal termination instructions include the termination instructions of the main scheduling module and the termination instructions of the parallel simulation module. The termination instructions of the main scheduling module are used to terminate the calculation of all parallel simulation modules, while the termination instructions of the parallel simulation module are only used to terminate the calculation of the corresponding simulation module. External termination instructions are emergency termination instructions given from outside the parallel simulation program.