Parallel simulation engine and method for large-scale unmanned aerial vehicle cluster cooperative capability test
By using a parallel simulation engine based on Unreal Engine and employing technologies such as entity component systems, heterogeneous computing schedulers, and pipeline simulation accelerators, the performance bottleneck in large-scale UAV swarm simulation has been solved, achieving efficient real-time simulation and scalability, and supporting collaborative algorithm testing for swarms of thousands of UAVs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-12
AI Technical Summary
Existing drone swarm simulation platforms suffer from problems such as low memory access efficiency, insufficient parallelization, uneven distribution of computing resources, and difficulty in heterogeneous computing collaboration when handling scales of more than a thousand drones. This results in simulation speeds that are far slower than real-time, failing to meet the real-time requirements for algorithm iteration and verification.
A parallel simulation engine based on Unreal Engine is adopted. The UAV state data is stored in a structured array through the entity component system module. The heterogeneous computing scheduler performs task dependency analysis and dynamic load balancing. The pipeline simulation thruster adopts a double-buffered state synchronization mechanism. Combined with the spatial partitioning module and the simulation acceleration module, it performs efficient computing and realizes efficient scheduling and parallel processing of heterogeneous computing resources.
It significantly improves memory access efficiency and cache hit rate, enabling efficient and high-fidelity real-time simulation of large-scale UAV swarms. It supports the testing and verification of collaborative algorithms for swarms of thousands of UAVs, enhancing the real-time performance and scalability of the simulation.
Smart Images

Figure CN122019380A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) simulation technology, and in particular to a parallel simulation engine and method for testing the collaborative capabilities of large-scale UAV swarms. Background Technology
[0002] With the rapid development of UAV technology, the collaborative execution of reconnaissance, search, and formation flight missions by UAV swarms has become an important application area. Against this backdrop, the need for research and verification of swarm collaborative control algorithms (such as formation maintenance, task allocation, and collaborative obstacle avoidance) is increasingly urgent. Due to the high cost and significant risks of real-world flight testing, conducting efficient and realistic testing of the collaborative capabilities of large-scale UAV swarms in simulation environments has become a crucial step in algorithm development.
[0003] Currently, drone swarm simulations are mostly implemented based on traditional object-oriented programming (OOP) architectures. This architecture typically instantiates an independent object for each drone, encapsulating all its attributes such as position, speed, state, and algorithm references. However, when the swarm size expands to hundreds or even thousands of drones, this traditional simulation architecture faces severe performance bottlenecks and struggles to meet real-time simulation requirements. Specifically, existing technologies mainly suffer from the following drawbacks: First, memory access efficiency is low: Traditional OOP architectures use an array of structures (AoS) memory layout, where the data of each drone object is discretely distributed in physical memory. When the system needs to traverse and process a large number of drones, the CPU accesses this non-contiguous data, which leads to a sharp drop in cache hit rate and frequent cache misses, severely restricting the efficiency of data reading and updating.
[0004] Second, insufficient parallelization: In traditional architectures, simulation logic is typically processed at the level of a single UAV, or uses coarse-grained multi-threaded parallelism, making it difficult to achieve fine-grained data-level parallelism. This prevents it from fully utilizing the Single Instruction, Multiple Data (SIMD) instruction set of modern CPUs for vectorized computation, and also makes it difficult to efficiently schedule CPU / GPG to execute large-scale parallel computing tasks, such as collision detection and neighborhood lookup.
[0005] Third, uneven distribution of computing resources: Traditional simulation platforms lack efficient dynamic task scheduling and load balancing mechanisms. Due to the potentially uneven distribution of UAVs in the simulation space, computing hotspots can easily form, causing some computing cores to be overloaded while others remain idle. The overall simulation performance is limited by the most heavily loaded computing unit, making it impossible to achieve cross-core load balancing.
[0006] Fourth, heterogeneous computing collaboration is difficult: traditional architectures struggle to flexibly and efficiently allocate different types of computing tasks (such as logical decision-making, physical calculations, and perception simulations) to the most suitable computing units. For example, computationally intensive collision detection tasks cannot be effectively loaded onto GPUs for parallel processing, while CPUs still have to handle a large amount of computation that could be accelerated in parallel, resulting in low utilization of heterogeneous computing resources.
[0007] The aforementioned defects in existing technologies have led to problems such as decreased frame rate, simulation speed far below real-time speed, and inability to meet the real-time requirements of algorithm iteration verification when existing simulation platforms handle swarms of more than a thousand drones.
[0008] Therefore, there is an urgent need for a brand-new simulation engine architecture that can fundamentally overcome bottlenecks in memory access, parallel computing, and resource scheduling, in order to support efficient and high-fidelity real-time simulation testing of large-scale UAV swarm collaboration capabilities. Summary of the Invention
[0009] In a first aspect, to address the aforementioned technical problems, a parallel simulation engine for testing the collaborative capabilities of large-scale unmanned aerial vehicle (UAV) swarms is provided. The engine is built upon Unreal Engine and includes a parallel simulation engine core layer and a functional module layer built upon the parallel simulation engine core layer, wherein: The core layer of the parallel simulation engine includes: The entity component system module is configured to decompose the state data of the UAV entity into independent components and store the data of the same type of components in contiguous memory using a structured array layout. The heterogeneous computing scheduler is configured to perform task dependency analysis and dynamic load balancing based on a directed acyclic graph constructed from simulation tasks. The pipeline simulation actuator is configured to drive the simulation cycle according to the simulation time step using a double-buffered state synchronization mechanism; The functional module layer includes: The drone swarm modeling module is configured to create and manage drone entities and their components based on the entity component system module; The algorithm plugin management module is configured to integrate and manage cluster collaborative algorithm plugins and provide parallel processing interfaces to the algorithm plugins; The simulation acceleration module is configured to allocate computationally intensive tasks such as collision detection and neighborhood query to the GPU and perform parallel computation through computation shaders; The spatial partitioning module is configured to dynamically partition the three-dimensional simulation space using an octree structure to support fast querying and task allocation based on spatial location. The heterogeneous computing scheduler performs load assessment based on the output of the spatial partitioning module and dynamically allocates tasks to the CPU / GPU; the pipeline simulation accelerator coordinates the entity component system module, the algorithm plug-in management module, and the simulation acceleration module to sequentially perform state reading, parallel decision calculation, and batch state update within each simulation time step.
[0010] Furthermore, the entity component system module includes: Entity Manager, used for assigning and reclaiming identifiers for drone entities; The component memory is used to store the position component, velocity component, attitude component and mission component data of the UAV in the form of independent and contiguous arrays; The system scheduler is used to schedule the execution of each logical system that performs batch processing of data in the component memory.
[0011] Furthermore, in the component memory, the position component is a three-dimensional floating-point vector array, and the attitude component is a quaternion array.
[0012] Furthermore, the spatial partitioning module uses an octree structure to dynamically adjust its partitioning depth according to the density of UAVs within the subspace.
[0013] Furthermore, the simulation acceleration module is also configured as follows: The GPU is used to calculate the pairwise distances between the drones in parallel using the shaders to generate a distance matrix. Spatial hash tables are built in parallel using GPUs to reduce the complexity of neighborhood lookups to constant levels. Coarse screening of collision detection based on bounding boxes is performed in parallel using GPUs.
[0014] Furthermore, the functional module layer also includes a perception sensor parallel simulation module, which generates LiDAR point cloud data of multiple UAVs in parallel through GPU ray projection, and generates depth map data of multiple UAVs' depth cameras in batches through instantiation rendering technology; the generated data is stored as a component in the component memory of the entity component system module.
[0015] Furthermore, the double-buffered state synchronization mechanism specifically includes: Set up a front buffer and a back buffer to store the read-only state data of the current frame and the state data to be updated in the next frame, respectively. At the end of a simulation time step, the roles of the front buffer and the back buffer are swapped.
[0016] A second aspect of the present invention provides a parallel simulation method for testing the collaborative capabilities of large-scale UAV swarms based on the engine, comprising the following steps: Configure the test scenario and create a corresponding number of drone entities with initial states in the drone cluster modeling module; Load at least one cluster collaboration algorithm plugin through the algorithm plugin management module; The parallel simulation engine is started, and the heterogeneous computing scheduler and the pipeline simulation accelerator coordinate to execute parallel simulations that include the cluster collaborative algorithm. During the simulation, the status data of each UAV is recorded through the physical component system module; Based on the recorded state data, metrics reflecting the cluster's collaborative performance are calculated.
[0017] Furthermore, the calculation of indicators reflecting cluster coordination performance includes calculating formation maintenance accuracy, specifically: Set the target formation in the simulation; Record the cluster formation transformation process; Based on the location component data, the deviation between the actual position of the UAV and the target formation position at each time step is calculated.
[0018] Furthermore, the calculation of metrics reflecting cluster cooperative performance includes evaluating cooperative obstacle avoidance performance, specifically: Configure obstacles in the test scenario; Assign the task of traversing the obstacles to the cluster; Based on simulation records, statistical analysis was conducted on collision events and obstacle avoidance maneuvers.
[0019] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: This invention utilizes a collaborative design of the core layer and functional module layer of a parallel simulation engine built on Unreal Engine. It employs entity component system modules to continuously store UAV state data in a structured array format, significantly improving memory access locality and cache hit rate. A heterogeneous computing scheduler based on a directed acyclic graph achieves dynamic task scheduling and load balancing. Combined with the octree dynamic partitioning of the spatial partitioning module and GPU parallel computing of the simulation acceleration module, it efficiently handles computationally intensive tasks such as collision detection and neighborhood lookup. Furthermore, leveraging the double-buffered state synchronization mechanism of the pipeline simulation propeller, it achieves conflict-free pipelined execution of state reading, decision calculation, and updates. This ensures simulation determinism while significantly improving the real-time performance, scalability, and overall throughput of large-scale UAV swarm simulations, effectively supporting the testing and verification of collaborative algorithms for swarms of thousands of UAVs. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a diagram of the overall architecture disclosed in this invention.
[0022] Figure 2 This is a schematic diagram illustrating the SoA memory layout and cache optimization principle disclosed in this invention.
[0023] Figure 3 This is a schematic diagram of the core workflow of heterogeneous computing task scheduling and pipelined simulation advancement disclosed in this invention.
[0024] Figure 4 This is a flowchart of the large-scale UAV swarm collaborative capability testing method disclosed in this invention.
[0025] Figure 5 This is a schematic diagram of the operation status and data flow of a large-scale UAV swarm disclosed in this invention under a typical mission scenario. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] This invention provides a parallel simulation engine for testing the collaborative capabilities of large-scale UAV swarms. Its core lies in building a data-driven, highly parallel simulation framework that supports heterogeneous computing, in order to overcome the performance bottleneck of traditional simulation platforms when handling UAV swarms of more than a thousand aircraft.
[0028] Please see Figure 1 The simulation engine in this solution is based on the Unreal Engine's entity component system architecture and adopts a four-layer layered architecture design, from top to bottom: parallel simulation engine core layer, functional module layer, cluster collaborative testing layer, and physical backend and visualization layer. These are described in detail below.
[0029] First, the core layer of the parallel simulation engine will be explained in detail.
[0030] In this solution, the core layer of the parallel simulation engine is the cornerstone of the entire system, responsible for the lowest level of parallel computing management and data organization. It includes three key sub-modules: the Entity Component System (ECS) module, the heterogeneous computing scheduler, and the pipeline simulation accelerator.
[0031] The Entity Component System Module, as the core of data organization, adopts the ECS paradigm. This module decomposes the state data of UAV entities into independent components and stores data of the same type of component in contiguous memory using a structured array layout. The Entity Component System Module includes an Entity Manager, a Component Memory, and a System Scheduler. The Entity Manager allocates and reclaims identifiers for UAV entities; the Component Memory stores the UAV's position, velocity, attitude, and mission component data in separate contiguous arrays; and the System Scheduler schedules the execution of various logical systems that perform batch processing of data in the Component Memory.
[0032] Specifically, the entity manager is responsible for generating, allocating, and recycling unique identifiers for UAV entities. Entities themselves do not contain any data; they serve only as lightweight indexes. In the component memory, position components are three-dimensional floating-point vector arrays, and attitude components are quaternion arrays; the component memory adopts a Structure of Arrays (SoA) memory layout. All UAV position data is stored contiguously in one array, all velocity data in another contiguous array, and so on. This layout greatly optimizes CPU cache hit rates and creates conditions for SIMD parallel computing. The system scheduler manages a series of stateless "systems" (such as motion systems and collision detection systems). The system scheduler analyzes the data dependencies between systems, constructs a directed acyclic graph (DAG), and thus schedules dependent systems to execute in parallel.
[0033] The fundamental differences in memory layout and access efficiency between the OOP architecture and the ECS architecture used in this invention are compared.
[0034] Traditional OOP architectures typically employ an array of structures (AoS) layout. Each drone object (e.g., UAV_Object1) is an independent structure, containing all of the drone's attributes contiguously: position, velocity, attitude, state, algorithm references, sensor data, etc. When processing the positions of all drones, the CPU cache line loads each object from memory in a jump-like manner. However, since only a small portion of the data within each object is currently needed for computation, cache utilization is extremely low, resulting in numerous cache misses.
[0035] The ECS architecture used in this invention completely changes this model: (a) Entity: Only ID (0, 1, 2, … N), no data.
[0036] (b) Components: Data of the same type is stored contiguously. All data in Position[0...N] is arranged contiguously in memory; Velocity[0...N] is arranged in another contiguous block of memory.
[0037] (c) System: Such as a motion system, its logic is to traverse all position and velocity components and update the position based on the velocity. When it executes, the CPU can sequentially and efficiently read data from the Position and Velocity arrays. A single cache line load can obtain the positions or velocities of multiple drones, and the hardware prefetcher can predict and load subsequent data, making full use of memory access bandwidth and naturally adapting to SIMD instructions for parallel computing.
[0038] Please see Figure 2 This SoA layout enables the data access mode to change from random jumps to sequential continuity, which is one of the key foundations for the present invention to achieve real-time simulation of thousands of drones.
[0039] In a further proposed solution, a heterogeneous computing scheduler is used for task dependency analysis and dynamic load balancing based on a directed acyclic graph constructed from simulation tasks. As the brain of task scheduling, it is responsible for rationally allocating different computing tasks to CPUs / GPUs for execution. Its workflow includes: (1) Task classifier: Identify computationally intensive tasks (such as distance calculation and collision detection) and logic-intensive tasks (such as path planning and decision-making).
[0040] (2) DAG Dependency Graph Construction and Analysis: Analyze the data dependencies between tasks, perform topology sorting and critical path identification.
[0041] (3) Dynamic load balancing: Real-time monitoring of the load of each CPU core and GPU, combined with the UAV density information of each region provided by the spatial partitioning module, dynamically migrate tasks to achieve load balancing across heterogeneous hardware.
[0042] The pipeline simulation actuator is used to control the stepping rhythm of the simulation. It adopts a double-buffered state synchronization mechanism to drive the simulation cycle according to the simulation time step.
[0043] Specifically, the double-buffered state synchronization mechanism allocates independent buffers for the state data of the current frame and the next frame. Within a single simulation time step, all systems read data from the front buffer and write updated results to the back buffer. At the end of the time step, the roles of the two buffers are swapped. This mechanism eliminates read-write conflicts, supports lock-free parallelism, and ensures the determinism and efficiency of the simulation.
[0044] A further proposed solution establishes efficient data exchange channels between the CPU and GPU, as well as between multiple CPU cores. Through memory pool management and buffer reuse, zero-copy or low-copy data transfer is achieved, reducing data movement overhead.
[0045] Next, the functional module layer will be described in detail.
[0046] The functional module layer, built upon the parallel framework provided by the core layer, implements specific simulation functions. This layer includes a UAV swarm modeling module, an algorithm plugin management module, a simulation acceleration module, a spatial partitioning module, a parallel simulation module for sensing sensors, and a data acquisition module.
[0047] The UAV swarm modeling module creates and manages UAV entities and their components based on the entity component system module. Specifically, it utilizes the ECS architecture to instantiate large-scale UAV swarms by creating entities and binding components such as position, velocity, attitude, and task, supporting dynamic scaling of the swarm size.
[0048] The algorithm plugin management module provides a standardized plugin interface, integrating and managing cluster-based collaborative algorithm plugins and providing parallel processing interfaces to these plugins. Specifically, user-developed algorithms such as path planning, formation control, and collaborative obstacle avoidance can be encapsulated as plugins and dynamically loaded. This module ensures that the algorithms can process all relevant UAV component data in a batch parallel manner.
[0049] The simulation acceleration module is specifically designed to handle parallelizable computationally intensive tasks. It allocates computationally intensive tasks such as collision detection and neighborhood lookup to the GPU for parallel computation via computation shaders. Specifically, on the one hand, the simulation acceleration module uses GPU computation shaders to compute the distance matrix between all pairs of UAVs in parallel; on the other hand, it utilizes the GPU to construct a spatial hash table in parallel, reducing the complexity of neighborhood lookup from O(n) to O(1); in addition, the simulation acceleration module uses the GPU for coarse screening of collision detection.
[0050] The spatial partitioning module employs a dynamic octree algorithm to recursively divide the 3D simulation space, supporting fast location-based queries and task allocation. This module dynamically adjusts the tree depth based on the density of UAVs within each subspace, achieving adaptive spatial subdivision and providing a foundation for rapid neighborhood queries and load balancing.
[0051] The parallel simulation module for perception sensors generates simulated sensor data for each drone in the cluster in real time. For example, it uses GPU parallel ray casting technology to batch calculate the LiDAR point clouds of all drones; and it uses Unreal Engine's instantiated rendering to generate depth maps from the perspective of all drones in a single render call. The generated data is also stored in ECS as components.
[0052] The data acquisition module is used to record the status data, system events (such as collisions), and performance indicators of all unmanned vehicles during the simulation process at high frequency and asynchronously, providing a data source for subsequent analysis.
[0053] Those skilled in the art will understand that the heterogeneous computing scheduler performs load assessment based on the output of the spatial partitioning module and dynamically allocates tasks to the CPU / GPU; the pipeline simulation accelerator coordinates the entity component system module, algorithm plug-in management module and simulation acceleration module to sequentially perform state reading, parallel decision calculation and state batch update within each simulation time step.
[0054] Then, the cluster collaborative testing layer will be described in detail.
[0055] The cluster collaborative testing layer is a dedicated layer designed for final testing requirements. It includes a distributed communication simulation module, a collaborative algorithm stress testing unit, and an extreme environment simulation module.
[0056] The distributed communication simulation module is used to simulate real network environments. It can inject configurable network latency (0-500ms), packet loss rate (0-30%), and bandwidth limits, and can set different communication topologies.
[0057] The collaborative algorithm stress testing unit verifies the algorithm's decision consistency at a scale of thousands of aircraft, the stability of formation under disturbances, and obstacle avoidance robustness in highly dynamic environments by designing extreme test scenarios.
[0058] The extreme environment simulation module is used to simulate faults and abnormal situations such as node failure, communication interruption, and dynamic addition or removal of drones, and to test the fault tolerance and recovery capabilities of the cluster system.
[0059] Furthermore, the physical backend and visualization layer are explained in detail.
[0060] The physics backend and visualization layer are built upon Unreal Engine's mature physics system and rendering pipeline, providing physical realism and visualization support for upper-layer simulations. It includes a physics engine interface, a rendering engine interface, a visualization module, and result analysis output.
[0061] Specifically, the physics engine interface integrates Unreal Engine's rigid body dynamics system, responsible for calculating the six degrees of freedom motion, gravity, air resistance, and other physical effects of the drone entities, and handling precise collision responses between entities. The rendering engine interface calls Unreal Engine's rendering pipeline to perform real-time 3D scene rendering of the 3D simulation environment, drone swarm, obstacles, etc., and outputs the rendering results to the display device. The visualization module provides diverse data display methods, including real-time drawing and historical playback of drone trajectories, a monitoring panel for the overall status of the swarm (such as formation and mission progress), and real-time charts of system performance (frame rate, CPU / GPU usage). After the simulation ends, the collected data (such as trajectories and event logs) is automatically exported to CSV or JSON format, and a test report containing key performance indicators is generated.
[0062] Please see Figure 3 This embodiment also details how simulation tasks are efficiently scheduled and executed. The workflow of this heterogeneous computing task scheduler is as follows: (1) Task submission: Each module in the functional module layer (such as the collision detection system and the perception simulation system) submits the computation task to the scheduler.
[0063] (2) Task analysis and DAG construction: The scheduler analyzes the characteristics of tasks (computation density, data scale) and the dependencies between tasks to construct a DAG.
[0064] (3) Dynamic scheduling and execution: The scheduler assigns tasks to different execution queues based on the DAG and real-time load monitoring results. CPU task queue: Executes tasks with low parallelism or requiring complex control flow, such as decision-making logic and communication protocol processing.
[0065] GPU task queue: Executes highly parallel tasks such as distance field calculation, collision detection batch processing, and sensor data generation. The scheduler invokes the GPU computation shader acceleration module, utilizing the GPU's thousands of stream processors to execute these tasks concurrently.
[0066] (4) Load balancing: The scheduler continuously monitors the load of each computing unit. If a CPU core is overloaded due to processing high-density drones in a region, the scheduler may migrate some of the computing tasks in that region to other idle cores or GPUs, or redistribute tasks among CPU threads through a work-stealing algorithm.
[0067] The pipeline simulation accelerator divides the processing of a single simulation frame into three stages and combines this with a double-buffering mechanism to achieve inter-frame parallelism: Phase 1, CPU: Logic and Decision-Making – The system reads the current state from the front buffer and performs logical calculations such as drone decision-making and task allocation.
[0068] The second stage, GPU: Parallel computing – submit the parallel computing tasks required for this frame (such as distance matrix, collision coarse screening) to the GPU queue for asynchronous execution.
[0069] The third stage, synchronization and submission, involves waiting for the GPU to complete its computation, synchronizing and integrating the CPU decision results and GPU computation results, and writing them in batches to the back buffer. At the end of the frame, the buffer pointers are swapped.
[0070] At the same time, the first stage of the next frame can begin reading the new data that has just been swapped and become the front buffer, realizing pipeline parallelism between CPU computing and GPU computing, as well as between adjacent frames, maximizing hardware utilization.
[0071] Please see Figure 4 This paper also provides a standard procedure for testing cluster collaboration capabilities based on the aforementioned parallel simulation engine: Step 1: Configure the test scenario: Users can set parameters such as the size of the simulation space, the distribution of obstacles (static / dynamic), the size of the drone swarm (1-2000 drones), the mission type (formation / search / strike), the initial deployment location, and communication environment parameters (latency, packet loss rate), node failure rate (0-20%) and simulation duration through a graphical interface or configuration file.
[0072] Step 2: Initialize the cluster and load the algorithm: Based on the configuration, the engine calls the cluster modeling module to create a specified number of drone entities and components in the ECS. Users load the collaborative control algorithm plugin to be tested through the algorithm plugin management module.
[0073] Step 3: Start the parallel simulation engine: The user starts the simulation, and the heterogeneous computing scheduler and pipeline simulation accelerator start working, initiating the pipeline simulation process.
[0074] Step 4: Execute the simulation loop: Within each simulation time step, the engine executes a series of calculations in parallel according to the scheduling order, including motion update, sensor simulation, collision detection, and loaded cooperative algorithm decision-making, and updates the UAV status.
[0075] Step 5, Data Acquisition: Throughout the simulation process, the data acquisition module asynchronously records the position, speed trajectory, collision events, communication messages, algorithm decision logs, etc. of each UAV.
[0076] Step 6: Determine if the simulation has ended: Determine if the preset simulation termination conditions have been met (such as task completion or reaching the maximum simulation time). If not, return to step 4 to continue the simulation calculation; if it has ended, proceed to the next step.
[0077] Step 7, Performance Evaluation and Report Generation: After the simulation, analyze the collected data and calculate several quantitative indicators, including formation maintenance accuracy, collision avoidance success rate, mission completion efficiency, and system throughput. Specifically, formation maintenance accuracy is calculated as the root mean square error between the actual position and the ideal formation position of each UAV throughout the entire mission; the collision avoidance success rate is equal to (total simulation time - total duration of collisions) / total simulation time. 100%; Task completion efficiency refers to the time required to complete a specified task, or the number of tasks completed per unit time; System throughput is the number of times the engine can update the drone status per second (frame rate × cluster size).
[0078] Please see Figure 5 This demonstrates the operational status and data flow of a drone swarm within a parallel simulation engine. The drone swarm operational status section showcases a cooperative formation diagram and entity status components. The cooperative formation consists of a lead drone (L) and multiple wingmen (1-6), with communication links between the lead drone and each wingman represented by dashed lines. The entity status components adopt an ECS architecture and include position, velocity, communication, and task components.
[0079] Taking a collaborative region search task as an example: Input: Task parameters (search area boundaries, number of drones) are distributed through the test layer.
[0080] Processing: The spatial partitioning module dynamically divides the search area into several sub-regions. The task allocation system assigns an initial search sub-region to each UAV and writes it into its task component. The path planning algorithm plugin is invoked to plan a path for each UAV to its assigned region, and the result is written into the path component. In the simulation loop, the motion system updates the position component based on the path and velocity. The perception sensor parallel simulation module generates a virtual LiDAR point cloud for each UAV to simulate obstacle detection. When a UAV detects a target, the communication system simulates broadcasting a message to surrounding UAVs. UAVs receiving the message have their task components updated, potentially triggering path replanning.
[0081] Output: Real-time status data stream (the position, speed, and mission status of all drones are continuously recorded), performance monitoring data (frame processing time and CPU / GPU utilization are monitored), test result data (search coverage change curve over time and target discovery time point are recorded), and visualization rendering (the search movement trajectory and covered area of the drone swarm are displayed in real time in the Unreal Engine rendering interface).
[0082] Typical task scenario data flow examples illustrate three scenarios: Scenario 1 Collaborative Area Search: Input the search area and number of drones, process area segmentation and path planning, communicate target discovery broadcast, output coverage and search time, data volume is N drones × sampling frequency.
[0083] Scenario 2 Dynamic Formation Flight: Input target formation and navigation trajectory, process formation maintenance and obstacle avoidance planning, communication position synchronization and formation commands, output formation error and response delay, collision detection computation is N×(N-1) / 2 pairs / frame.
[0084] Scenario 3 Multi-target Cooperative Strike: Input target list and threat level, process task allocation and trajectory planning, communicate target locking and cooperative decision-making, output strike success rate and cooperative efficiency, and the decision-making synchronization adopts distributed consensus.
[0085] The characteristics of the data stream are summarized as follows: Status data consists of continuous values such as position, velocity, and attitude, and is sampled at high frequency; event data consists of discrete events such as collisions, task completion, and communication, and is recorded asynchronously; performance data consists of system indicators such as frame time and resource usage, and is collected periodically.
[0086] The double buffering mechanism ensures read-write separation, asynchronous writing avoids blocking the simulation main loop, and supports real-time visualization and offline analysis.
[0087] Throughout the process, the dual buffering mechanism ensures the separation of data production and data consumption, avoids competition, and guarantees the smoothness of the simulation main loop. All core data is efficiently organized and accessed through ECS components, forming a complete, efficient, and scalable closed-loop simulation environment of "perception-decision-execution".
[0088] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A parallel simulation engine for testing the collaborative capabilities of large-scale unmanned aerial vehicle (UAV) swarms, characterized in that, The engine is built on Unreal Engine and includes a parallel simulation engine core layer and a functional module layer built on top of the parallel simulation engine core layer, wherein: The core layer of the parallel simulation engine includes: The entity component system module is configured to decompose the state data of the UAV entity into independent components and store the data of the same type of components in contiguous memory using a structured array layout. The heterogeneous computing scheduler is configured to perform task dependency analysis and dynamic load balancing based on a directed acyclic graph constructed from simulation tasks. The pipeline simulation actuator is configured to drive the simulation cycle according to the simulation time step using a double-buffered state synchronization mechanism; The functional module layer includes: The drone swarm modeling module is configured to create and manage drone entities and their components based on the entity component system module; The algorithm plugin management module is configured to integrate and manage cluster collaborative algorithm plugins and provide parallel processing interfaces to the algorithm plugins; The simulation acceleration module is configured to allocate computationally intensive tasks such as collision detection and neighborhood query to the GPU and perform parallel computation through computation shaders; The spatial partitioning module is configured to dynamically partition the three-dimensional simulation space using an octree structure to support fast querying and task allocation based on spatial location. The heterogeneous computing scheduler performs load assessment based on the output of the spatial partitioning module and dynamically allocates tasks to the CPU / GPU; the pipeline simulation accelerator coordinates the entity component system module, the algorithm plug-in management module, and the simulation acceleration module to sequentially perform state reading, parallel decision calculation, and batch state update within each simulation time step.
2. The parallel simulation engine for testing the collaborative capabilities of large-scale UAV swarms according to claim 1, characterized in that, The entity component system module includes: Entity Manager, used for assigning and reclaiming identifiers for drone entities; The component memory is used to store the position component, velocity component, attitude component and mission component data of the UAV in the form of independent and contiguous arrays; The system scheduler is used to schedule the execution of each logical system that performs batch processing of data in the component memory.
3. The parallel simulation engine for testing the collaborative capabilities of large-scale UAV swarms according to claim 2, characterized in that, In the component memory, the position component is a three-dimensional floating-point vector array, and the attitude component is a quaternion array.
4. The parallel simulation engine for testing the collaborative capabilities of large-scale UAV swarms according to claim 1, characterized in that, The spatial partitioning module uses an octree structure to dynamically adjust its partitioning depth based on the density of UAVs within the subspace.
5. The parallel simulation engine for testing the collaborative capabilities of large-scale UAV swarms according to claim 1, characterized in that, The simulation acceleration module is also configured to: The GPU is used to calculate the pairwise distances between the drones in parallel using the shaders to generate a distance matrix. Spatial hash tables are built in parallel using GPUs to reduce the complexity of neighborhood lookups to constant levels. Coarse screening of collision detection based on bounding boxes is performed in parallel using GPUs.
6. The parallel simulation engine for testing the collaborative capabilities of large-scale UAV swarms according to claim 1, characterized in that, The functional module layer also includes a perception sensor parallel simulation module, which generates LiDAR point cloud data of multiple UAVs in parallel through GPU ray projection, and generates depth map data of multiple UAVs' depth cameras in batches through instantiation rendering technology; the generated data is stored as a component in the component memory of the physical component system module.
7. The parallel simulation engine for testing the collaborative capabilities of large-scale UAV swarms according to claim 1, characterized in that, The dual-buffer state synchronization mechanism specifically includes: Set up a front buffer and a back buffer to store the read-only state data of the current frame and the state data to be updated in the next frame, respectively. At the end of a simulation time step, the roles of the front buffer and the back buffer are swapped.
8. A parallel simulation method for testing the collaborative capabilities of large-scale UAV swarms based on the engine described in any one of claims 1-7, characterized in that, Includes the following steps: Configure the test scenario and create a corresponding number of drone entities with initial states in the drone cluster modeling module; Load at least one cluster collaboration algorithm plugin through the algorithm plugin management module; The parallel simulation engine is started, and the heterogeneous computing scheduler and the pipeline simulation accelerator coordinate to execute parallel simulations that include the cluster collaborative algorithm. During the simulation, the status data of each UAV is recorded through the physical component system module; Based on the recorded state data, metrics reflecting the cluster's collaborative performance are calculated.
9. The parallel simulation method for testing the collaborative capabilities of large-scale UAV swarms according to claim 8, characterized in that, The calculation of indicators reflecting the cluster's collaborative performance includes calculating formation preservation accuracy, specifically: Set the target formation in the simulation; Record the cluster formation transformation process; Based on the location component data, the deviation between the actual position of the UAV and the target formation position at each time step is calculated.
10. The parallel simulation method for testing the collaborative capabilities of large-scale UAV swarms according to claim 8, characterized in that, The calculation of metrics reflecting cluster collaboration performance includes evaluating collaborative obstacle avoidance performance, specifically: Configure obstacles in the test scenario; Assign the task of traversing the obstacles to the cluster; Based on simulation records, statistical analysis was conducted on collision events and obstacle avoidance maneuvers.