Large-scale unmanned aerial vehicle cluster motion simulation method and system

By designing path planning functions and motion data tables in the Unreal Engine Mass framework, the problem of inefficiency in large-scale drone cluster motion simulation is solved, and the motion of thousands of drones is efficiently simulated on a single computer.

CN119805958APending Publication Date: 2025-04-11BEIJING GUOKE FUNDAMENTAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411941919.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When simulating large-scale drone clusters, it is difficult to ensure the operation efficiency of the simulation. It usually requires relying on distributed computing clusters, resulting in the number of supported drones being limited by computing resources.

Method used

Using collaborative planning simulation technology for large-scale drone clusters based on the Unreal Engine Mass framework, efficient motion simulation is achieved through the design of path planning functions and motion data tables.

Benefits of technology

Efficiently simulate the movement of thousands of drones on a single computer, overcome the dependence on distributed computing resources, and significantly improve the accuracy and efficiency of simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119805958A_ABST
    Figure CN119805958A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of motion simulation, and provides a large-scale unmanned aerial vehicle cluster motion simulation method, which comprises the following steps: S1, starting motion planning, responding to a motion planning result, inputting the motion planning result into a path planning function, and outputting a continuous path position and a motion planning list of flight attitudes under the current path position; s2, based on the motion planning list, speed matching problem solving is carried out, a motion data table with time as an index is solved, and the motion data table with time as the index comprises information including time and motion distance; and S3, starting motion simulation based on a motion processor written by an unreal engine Mass framework, searching a corresponding path segment in a motion data table with time as an index by using accumulated motion time in each frame, obtaining a path position and a flight attitude of the current path segment, and setting the path position and the flight attitude on the unmanned aerial vehicle. Movement of thousands of unmanned aerial vehicles can be efficiently simulated on a single computer, and dependence on distributed computing resources is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motion simulation, and in particular to a large-scale unmanned aerial vehicle cluster motion simulation method and system. Background Art

[0002] In the collaborative planning simulation of large-scale drone swarms, the motion simulation of the swarm is one of the core links. Most swarm behaviors involve complex motion planning, which usually includes generating a motion trajectory, expected speed, and speed at the end of the trajectory for each drone. The motion trajectory usually consists of several sparse waypoints and headings. The drones perform motion simulation based on the motion planning results during the simulation process.

[0003] Existing single-drone motion simulation methods usually include flight control and flight dynamics modules. The flight control module performs path planning based on the current state of the aircraft and the motion planning results, combined with the speed, altitude and performance limitations of the drone, generates a smooth curved path, and outputs thrust and rudder control signals according to real-time state data during flight. The flight dynamics module receives the control signal and calculates the real-time position and attitude in the aircraft model.

[0004] The above methods are computationally heavy, and a single CPU can only simulate dozens of drones at most. When it is necessary to process a large-scale cluster of thousands of drones, the existing methods are difficult to guarantee the efficiency of the simulation, and usually need to rely on distributed computing clusters to solve the problem. Therefore, the number of drones it supports is limited by the computing resources in the distributed environment, and it is impossible to efficiently simulate a large-scale drone cluster on a single computer. Summary of the invention

[0005] In view of the above problems, the purpose of the present invention is to provide a large-scale UAV cluster motion simulation method and system, which is a collaborative planning simulation technology for large-scale UAV clusters based on the Unreal Engine Mass framework, especially an efficient technology for cluster motion simulation. The present invention can efficiently simulate the motion of thousands of UAVs on a single computer, overcoming the reliance on distributed computing resources in the prior art.

[0006] The above-mentioned object of the present invention is achieved through the following technical solutions:

[0007] A large-scale UAV cluster motion simulation method comprises the following steps:

[0008] S1: Start motion planning, respond to the motion planning result, input the motion planning result into a pre-written path planning function, and output a motion planning list of continuous path positions and flight postures under the current path position;

[0009] S2: Based on the motion planning list, solving the speed matching problem, solving a motion data table indexed by time, wherein the motion data table indexed by time includes information including time and motion distance;

[0010] S3: The motion processor written based on the Unreal Engine Mass framework starts motion simulation, uses the accumulated motion time for each frame to search for the corresponding path segment in the motion data table indexed by time, obtains the path position and the flight attitude of the current path segment, and sets the path position and the flight attitude to the drone.

[0011] Further, in step S1, motion planning is started, and in response to the motion planning result, the motion planning result is input into a pre-written path planning function, and a motion planning list of continuous path positions and flight postures under the current path position is output, specifically:

[0012] Performing the motion planning for each drone in the drone cluster, and outputting the motion planning results including a sparse motion trajectory, a desired speed, and a terminal speed;

[0013] The motion planning result is input into the pre-written path planning function, and the path position of the continuous specified path sampling interval and the motion planning list of the flight posture under the current path position are output as the final path.

[0014] Furthermore, the path planning function is specifically:

[0015] The path planning function uses the path planning module in the Matlab UAV toolbox to write a 3D-Dubins path planning function, and finally exports the 3D-Dubins path planning function as a C language dynamic library and integrates it into the Unreal Engine Mass framework;

[0016] Among them, the 3D-Dubins path planning function combines basic motion models including straight segments, left turns, and right turns when performing path planning, and considers the minimum turning radius of the drone to ensure that the drone flies along the shortest path from the starting point to the end point, while satisfying the dynamics and controllability constraints of the drone to generate the final path.

[0017] Further, in step S2, based on the motion planning list, the speed matching problem is solved to obtain the motion data table indexed by time, specifically:

[0018] Constructing three types of motion data tables including the motion data table TBMDT indexed by time, the motion data table DBMDT indexed by motion distance, and the motion data table TDBMDT indexed by distance when motion state is changed;

[0019] The path generation processor written based on the Unreal Engine Mass framework performs the following operations:

[0020] Inserting the motion data of the path points in the motion planning list into the motion data table DBMDT indexed by the motion distance, the initial data including the path position, the flight attitude and the distance;

[0021] Call the motion data table calculation function, calculate the motion state transition points of the path segment based on the speed matching problem, generate the motion data table TDBMDT indexed by the distance at the motion state transition, and based on the motion data table DBMDT indexed by the motion distance and the motion data table TDBMDT indexed by the distance at the motion state transition, finally merge and interpolate to generate the motion data table TBMDT indexed by time.

[0022] Further, the motion data table calculation function is called, the motion state transition point of the path segment is calculated based on the speed matching problem, and the motion data table TDBMDT indexed by the distance at the motion state transition is generated, and based on the motion data table DBMDT indexed by the motion distance and the motion data table TDBMDT indexed by the distance at the motion state transition, the motion data table TBMDT indexed by time is finally merged and interpolated, specifically:

[0023] Solve the speed matching problem, calculate the motion state transition point of the path segment based on the current speed, acceleration, deceleration, expected speed of the path and the speed when reaching the end of the path, generate the motion data table TDBMDT indexed by the distance when the motion state transition is performed, at this time, the motion data includes the motion state, speed, time and distance, if the path is too short and cannot be adjusted to the speed when reaching the end of the path at the end of the path, then calculate the distance point after the drone continuously accelerates and decelerates after reaching the end of the path, and approaches the speed when reaching the end of the path at the end of the path, as the final motion state transition point in the motion data table TDBMDT indexed by the distance when the motion state transition is performed;

[0024] Traversing the motion data table DBMDT indexed by motion distance, searching for path segments in the motion data table TDBMDT indexed by the distance at the time of motion state conversion according to the distance, calculating the motion state, time and speed missing in the motion data, and inserting them into the motion data table TBMDT indexed by time;

[0025] Traversing the motion data table TDBMDT indexed by the distance at the time of motion state conversion, searching for path segments in the motion data table DBMDT indexed by the motion distance according to the distance, calculating the path position and the flight attitude missing in the motion data, and inserting them into the motion data table TBMDT indexed by time;

[0026] Finally, the time-indexed motion data table TBMDT stores the motion data of all path segments and motion state transition points.

[0027] Further, in step S3, the motion processor written based on the Unreal Engine Mass framework starts motion simulation, and uses the accumulated motion time for each frame to search for the corresponding path segment in the motion data table indexed by time, obtains the path position and the flight attitude of the current path segment, and sets the path position and the flight attitude to the drone, specifically:

[0028] The motion processor written based on the Unreal Engine Mass framework performs the following operations:

[0029] For each frame, the accumulated motion time is used to search for a corresponding time period in the motion data table TBMDT indexed by time;

[0030] If the accumulated motion time is greater than the maximum time in the motion data table TBMDT indexed by time and no corresponding segment is found, the UAV moves at a uniform speed according to the current speed and the flight attitude;

[0031] If the corresponding segment is found, the relative distance of the drone on the current segment is calculated according to the motion state of the current segment, and the interpolation factor is calculated according to the relative distance and the total distance of the segment;

[0032] According to the interpolation factor, the interpolation motion position and the interpolation motion attitude on the path segment are interpolated, and finally the path position and the flight attitude of the UAV are set according to the interpolation result.

[0033] Furthermore, the path position and the flight attitude of the UAV are finally set according to the interpolation result, specifically:

[0034] The path position of the UAV is set as the interpolated motion position;

[0035] The attitude heading angle of the UAV is set to the heading angle in the interpolated motion attitude;

[0036] The pitch angle of the drone's attitude takes the pitch angle in the interpolated motion attitude as the target value and is approximated by the pitch angle change rate set by the drone;

[0037] The attitude roll angle of the drone does not use the calculation result of the interpolated motion attitude, but calculates the roll angle target value based on the heading angle change rate set by the drone, and approximates it through the roll angle change rate set by the drone.

[0038] A large-scale UAV swarm motion simulation system for executing the large-scale UAV swarm motion simulation method as described above comprises:

[0039] A motion path planning module, used to start motion planning, respond to motion planning results, input the motion planning results into a pre-written path planning function, and output a motion planning list of continuous path positions and flight postures at current path positions;

[0040] A motion data table calculation module, used to solve the speed matching problem based on the motion planning list, and solve a motion data table indexed by time, wherein the motion data table indexed by time includes information including time and motion distance;

[0041] The motion simulation module is started, which is used to start motion simulation based on the motion processor written in the Unreal Engine Mass framework. The accumulated motion time is used for each frame to find the corresponding path segment in the motion data table indexed by time, and the path position and the flight attitude of the current path segment are obtained, and the path position and the flight attitude are set on the drone.

[0042] A computer device comprises a memory and one or more processors, wherein the memory stores computer codes, and when the computer codes are executed by the one or more processors, the one or more processors execute the above method.

[0043] A computer-readable storage medium stores computer codes. When the computer codes are executed, the above method is executed.

[0044] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0045] (1) By providing a large-scale UAV swarm motion simulation method, with precise path planning and efficient data processing, accurate and fast simulation of large-scale UAV swarms can be achieved on a single computer, greatly improving the accuracy and efficiency of the simulation. Relying on the Unreal Engine Mass framework, it is adaptable to a variety of complex scenarios and has good scalability, whether it is expanding the simulation scale or enriching functions. At the same time, it efficiently utilizes hardware resources and lowers technical barriers, reducing hardware cost investment and development difficulty, and effectively promoting the application and development of UAV swarm simulation technology in more fields, opening up a broad and convenient path for related research, development and testing work.

[0046] (2) Efficiency: Through the optimized 3D-Dubin s path planning algorithm and the path generation processor UMassMovementPathGenerateProcessor and motion processor UMassMovementHandleProcessor written in the specially designed Unreal Engine Mass framework, accurate and reasonable flight paths can be generated for thousands of drones in a short time, and motion data can be processed efficiently. UMassMovementPathGenerateProcessor can quickly parse the path planning results into motion data tables with different indexes, reducing the time overhead of data conversion and processing, thereby accelerating the entire simulation process, enabling large-scale drone simulation to be efficiently implemented on a single computer, and significantly improving simulation efficiency. UMassMovementHandleProcessor uses the mechanism of interpolating the position and attitude of drones based on motion data tables to simulate the real-time motion state of drones with high accuracy. In large-scale simulation scenarios, this precise simulation helps reduce the error accumulation caused by approximate calculations, ensures that the motion trajectory of each drone meets expectations, further improves the accuracy and reliability of the simulation, and indirectly improves the simulation efficiency.

[0047] (3) Resource saving: Without the help of distributed computing resources, the simulation task of thousands of fixed-wing drones can be completed by relying on a single computer, avoiding the high hardware cost required to purchase a large number of distributed computing nodes. For example, there is no need to build a complex cluster server architecture, which reduces the demand for high-performance network equipment, a large number of server hosts and related storage devices, thereby significantly reducing the overall hardware investment. Not relying on distributed systems means that there is no need to deal with many complex issues in distributed computing, such as communication synchronization between nodes, data consistency maintenance, task allocation and coordination, etc. This greatly simplifies the architecture and complexity of the software design of the entire simulation system, reduces the workload and difficulty of development, debugging and later maintenance, and reduces the potential risks and costs caused by system complexity.

[0048] (4) Scalability: The Entity Component System (ECS) architecture is adopted to abstract the various attributes and behaviors of drones into independent components, and the system is used to process entity sets with specific components. This decoupled design makes it easy to add new entity types (such as drones of different models or functions), components (such as new sensor components or weapon system components), and systems (such as path planning systems or environmental interaction systems for new scenarios) when facing larger-scale and more complex cluster simulation needs, without causing large-scale changes to the existing architecture, thus providing a solid foundation for the continuous expansion of the system. The various types of motion data tables (MDTs) and related data processing algorithms can well adapt to simulation needs of different scales. Whether it is a small number of drones or a large-scale cluster, performance can be optimized by flexibly adjusting data indexing and processing methods. For example, as the number of drones increases, TDBMDT can effectively manage the distance data during motion state transitions, facilitating the precise control and analysis of drone motion states in large-scale scenarios, further demonstrating the scalability of the system at the data level, enabling it to cope with the challenges of growing simulation scale and complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 This is an overall flow chart of the large-scale UAV cluster motion simulation method of the present invention;

[0050] Figure 2 A flow chart of starting motion planning and starting motion simulation of the present invention;

[0051] Figure 3 This is the overall structural diagram of the large-scale UAV cluster motion simulation system of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0053] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0054] The technical abbreviations involved in the present invention are introduced as follows:

[0055] (1)ECS (Entity Component System)

[0056] Meaning: Entity Component System is a software architecture pattern that is widely used in fields such as game development.

[0057] Specific explanation:

[0058] Entity: It can be understood as a specific "object" in the game world or application scenario, such as a character or a car in the game. It is just an "identity" and does not contain specific data or behavior logic. It is mainly used to be identified and referenced in the system.

[0059] Component: It is used to add specific properties and data to an entity. For example, for a character in a game, there may be a "health component" to represent its current health value, and a "position component" to record its coordinate position in the game scene. Each component focuses on a certain aspect of the property description.

[0060] System: Responsible for processing and operating a collection of entities with specific components. For example, the "mobile system" will process all entities with "position components" and "speed components", update their positions based on their speed and other information, and implement the movement logic of entities in the scene. This architectural pattern makes the code organization clearer and easier to expand and maintain. Different systems can independently process qualified entities, and the combination of entities and components can flexibly create various complex objects and scenes.

[0061] (2) MDT (Movement Data Table)

[0062] Meaning: It is a data collection in tabular form specifically used to record sports-related data.

[0063] Function: It can contain various motion-related parameter information such as the object's speed, acceleration, direction of movement, motion time, etc. Through such a table, it is convenient to query and analyze the object's motion and implement further motion-related calculations or logical processing based on these data, such as predicting the object's future position, adjusting the object's behavior according to different motion stages, etc.

[0064] TBMDT (Time Based Movement Data Table) Time-based movement data table

[0065] Meaning: It is a specific type of MDT, which mainly organizes and records motion data based on time as the key factor.

[0066] Features: In this data table, the data related to the motion state of the object at different time points may be recorded in detail. For example, the speed, position and other information of the object are recorded at a certain time interval (such as every second). In this way, when analyzing the motion process of the object later, you can clearly see how the object changes its motion state over time according to the timeline. This is very useful for scenarios involving time-related motion simulation and analyzing the motion trajectory of an object in a specific time period.

[0067] DBMDT (Distance Based Movement Data Table) Distance Based Movement Data Table

[0068] Meaning: It is also a variant of MDT, but it focuses on recording sports data based on distance.

[0069] Features: This data sheet will focus on the relevant data of the object when it passes through different sections during the movement. For example, when the object moves a certain distance (such as every 10 meters), the speed, acceleration and other data of the object are recorded. This is very helpful for analyzing the movement characteristics of the object at different stages of the journey, such as the relationship between the change of the speed of the object and the distance in long-distance movement, and adjusting the subsequent movement strategy of the object based on the distance.

[0070] TDBMDT (Transition Distance Based Movement Data Table) Movement data table based on the distance of motion state transition

[0071] Meaning: It is a more detailed motion data table, focusing on recording the distance-related data of an object when its motion state changes.

[0072] Features: When the motion state of an object changes, such as from uniform motion to accelerated motion, or from linear motion to curved motion, the distance the object has traveled and the related motion data after the conversion (such as the converted speed, acceleration, etc.) will be recorded. This data table is of great significance for in-depth research on the characteristics of objects in the process of motion state transformation, and for accurately controlling the subsequent motion behavior of objects based on the distance points of these state conversions.

[0073] (3)CPU (Central Processing Unit)

[0074] Meaning: It is one of the core components of a computer and is often called the "brain" of the computer.

[0075] Function: It is mainly responsible for executing the instructions in the computer program, performing data processing and calculations. It reads instructions and data from the computer's memory, and then performs various arithmetic operations (such as addition, subtraction, multiplication, division, etc.) and logical operations (such as AND, OR, NOT, etc.) according to the requirements of the instructions, and writes the processing results back to the memory or transmits them to other devices (such as monitors, hard disks, etc.). The performance of the CPU has a crucial impact on the operating speed and processing power of the entire computer system. Its performance indicators usually include main frequency, number of cores, cache size, etc.

[0076] (4) 3D-Dubins: 3D Dubins path planning

[0077] Meaning: It is a method for path planning in three-dimensional space.

[0078] Principle: It is based on certain mathematical models and algorithms, and aims to find an optimal path in three-dimensional space that meets specific conditions (such as the shortest path, avoiding obstacles, etc.). Usually, factors such as the position, posture, and motion constraints (such as maximum speed, minimum turning radius, etc.) of the object in three-dimensional space are taken into consideration. Through comprehensive analysis and calculation of these factors, a suitable path from the starting point to the target point is determined. This path planning method has a wide range of applications in the fields of robot motion planning and aircraft route planning to ensure that objects can move to the target position safely and efficiently in three-dimensional space.

[0079] (5)UMassMovementPathGenerateProcessor: A custom path generation processor written in the Mass framework

[0080] Meaning: It is a processor specifically used to generate motion paths under a specific Mass framework.

[0081] Function: It will generate a suitable motion path in the Mass framework based on the input parameters (such as starting point, target point, motion constraints, etc.), using specific algorithms and logic. This processor is customized and developed according to the characteristics and requirements of the Mass framework, so that the path generation function can be more efficiently implemented under the framework, providing a suitable path basis for subsequent motion processing.

[0082] The application in the present invention is responsible for parsing the path planning result into a movement data table (Movement Data Table, MDT) of the drone on the path with movement time and movement distance as indexes according to the movement properties of the drone.

[0083] (6)UMassMovementHandleProcessor: A custom motion processor written in the Mass framework

[0084] Meaning: It is also a processor in the Mass framework that is specifically used to handle motion-related affairs.

[0085] Function: It may receive relevant information such as the path generated by the path generation processor mentioned above, and then use the specific algorithms and logic within the Mass framework to further process the object's movement based on the object's current motion state (such as speed, position, etc.), such as adjusting the object's speed, controlling the object to move along the generated path, and handling various situations encountered by the object during movement (such as collision detection, adjusting the movement mode according to different road sections, etc.), so as to achieve reasonable and efficient movement of the object under the Mass framework.

[0086] The application in the present invention is to perform interpolation on the MDT to calculate the position and attitude of the drone.

[0087] The present invention is based on the Mass framework of the Unreal Engine and utilizes its Entity Component System (ECS) architecture. The ECS has the characteristics of CPU cache friendliness, easy parallel processing, and lightweight memory allocation. It can efficiently manage and process massive objects and improve the execution efficiency of object logic. Different from the prior art, this solution does not introduce a large number of flight control modules and flight dynamics modules that consume a lot of computing resources, but performs path planning calculations based on the performance of the drone. The present invention is applicable to the path planning of many different types of drones, such as the path planning calculation of fixed-wing drones.

[0088] The innovative points of the present invention are mainly:

[0089] Mass Framework Application: Use the ECS architecture of the Unreal Engine Mass Framework to accelerate the logical execution of large-scale objects and achieve efficient cluster management and processing.

[0090] Efficient path planning and interpolation method: The 3D-Dubins path planning algorithm is used in combination with a reasonable interpolation method. The flight control and flight dynamics modules, which are computationally intensive in large-scale simulations, are omitted, and the position and attitude interpolation calculations are performed directly based on the output of path planning, which significantly reduces the computational burden.

[0091] Motion data table (MDT) design: Through the multi-dimensional data table structure of time, distance and motion state conversion, the motion data of the drone is recorded and managed in detail, supporting real-time and efficient interpolation calculation.

[0092] The application scenarios of the technical solution of the present invention mainly include:

[0093] Military simulation and training: used to simulate the coordinated actions and tactical exercises of large-scale drone swarms.

[0094] Traffic management simulation: used to simulate the coordinated flight and path planning of drones in air traffic.

[0095] Scientific research and education: As a scientific research tool, it is used to study large-scale cluster behavior and coordination mechanisms, or as a simulation platform in education and teaching.

[0096] The following is described by specific examples:

[0097] First embodiment

[0098] like Figure 1 and 2 As shown, this embodiment provides a large-scale UAV cluster motion simulation method, including the following steps:

[0099] S1: Start motion planning, respond to motion planning results, input the motion planning results into a pre-written path planning function, and output a motion planning list of continuous path positions and flight postures under the current path position.

[0100] In this embodiment, step S1 is specifically as follows:

[0101] Perform motion planning for each drone in the drone cluster, and output the motion planning results including sparse motion trajectory, expected speed, and terminal speed; input the motion planning results into the pre-written path planning function, and output the motion planning list of the path positions at the continuous specified path sampling intervals and the flight attitude at the current path position as the final path.

[0102] Among them, the path planning function is specifically:

[0103] The path planning function uses the path planning module in the Matlab UAV toolbox to write a 3D-Dubins path planning function, and finally exports the 3D-Dubins path planning function as a C language dynamic library and integrates it into the Unreal Engine Mass framework; when performing path planning, the 3D-Dubins path planning function combines basic motion models including straight segments, left turns, and right turns, and considers the minimum turning radius of the UAV to ensure that the UAV flies along the shortest path from the starting point to the end point, while satisfying the dynamics and controllability constraints of the UAV, and generates the final path.

[0104] In this embodiment, specific examples of the above technical solutions are:

[0105] (1) Combination of 3D-Dubins path planning algorithm and basic motion model

[0106] Basic Research on Algorithms

[0107] Deeply study the mathematical principles of the 3D-Dubins path planning algorithm, including understanding how to construct paths through geometric shapes (such as straight lines, arcs, etc.) in three-dimensional space, as well as the connection rules and mathematical relationships between these geometric shapes. Learn relevant knowledge of spatial geometry, vector operations, trigonometric functions, etc. to provide theoretical support for algorithm implementation.

[0108] Definition of Basic Motion Models

[0109] Straight-line Segment Model: Use three-dimensional coordinate points to define the starting and ending points of a straight-line segment. For example, in the code, a structure can be created to represent a straight-line segment, and the structure members include the starting point coordinates (x1, y1, z1) and the ending point coordinates (x2, y2, z2).

[0110] Turning Models (Left Turn and Right Turn): For the turning part, use arcs to represent. Define a structure with members including the center coordinates of the arc (cx, cy, cz), radius r, starting angle θ1, and ending angle θ2. Through these parameters, a circular arc turn can be accurately described.

[0111] Formulation of Combination Strategies

[0112] According to the starting point, ending point, and environmental information (such as obstacle positions), determine the initial path generation direction. First, try to connect the starting point and the ending point with a straight-line segment. If there are no obstacles, this may be the initial path.

[0113] If there are obstacles, turning operations (left turn or right turn) need to be inserted at appropriate positions before encountering the obstacles to bypass the obstacles. According to the shape, size, and position of the obstacles, calculate the parameters of the turning arc to ensure that the path safely passes through the obstacle area. After turning, continue to use a straight-line segment to connect to the next target point or decide again whether to continue turning according to the situation. By continuously adjusting the combination of straight-line segments and turning arcs, a continuous path from the starting point to the ending point is generated.

[0114] (2) Consider the Characteristics of Fixed-Wing UAVs

[0115] Treatment of the Minimum Turning Radius

[0116] Obtain the minimum turning radius value r_min of the fixed-wing UAV from the technical manual or through experimental tests.

[0117] When generating a turning arc, check the calculated arc radius r. If r < r_min, adjust the arc radius to r_min. This can be achieved by adding conditional judgments in the code for generating the turning model. For example:

[0118] if r <r_min:

[0119] r=r_min

[0120] Dynamic and handling constraints satisfaction

[0121] Speed ​​constraint: According to the maximum speed v_max of the drone, the speed of the straight segment and the turning arc is limited in the path planning. For the straight segment, the speed cannot exceed v_max. In the turning arc, the maximum allowed turning speed v_turn is calculated according to the arc radius and the maximum speed (for example, using the formula v_turn = ω*r, where ω is the angular velocity, which is determined according to the control performance of the drone), ensuring that the speed of the drone does not exceed v_turn when turning.

[0122] Angle constraint: According to the maximum roll angle φ_max, maximum upward pitch angle θ_up_max and maximum downward pitch angle θ_down_max of the drone, the starting angle and ending angle of the arc are restricted when generating the turning arc. For example, when calculating the turning angle, ensure that the angle change is within the allowed range to prevent the drone from making actions beyond its control capabilities.

[0123] (3) Use Matlab UAV Toolbox to write 3D-Dubins path planning function

[0124] Familiar with Matlab UAV Toolbox path planning module

[0125] Carefully read the documentation of the Matlab UAV Toolbox, focusing on the functions, function interfaces, and data types of the path planning module. Run the sample code provided by the toolbox to understand how to call path planning related functions, as well as the format and meaning of input and output data.

[0126] Function header definition

[0127] Create a new .m file in Matlab and define the function header of the 3D-Dubins path planning function. The function name can be customized, for example, generate_3D_Dubins_path. The function input parameters include:

[0128] Sparse motion trajectory: stored in a suitable data structure (such as a matrix), each row may represent the coordinate information of a time point or a key path point.

[0129] MaxSpeed: A scalar value indicating the maximum speed the drone can fly.

[0130] Max Roll Angle: A scalar value indicating the maximum roll angle allowed for the drone.

[0131] Maximum Up and Down Pitch Angles: Two scalar values ​​representing the maximum up and down pitch angles, respectively.

[0132] Path Sampling Interval: A scalar value that specifies the distance or time interval between samples when generating paths.

[0133] The function output parameters are:

[0134] Continuous path positions at specified sampling intervals: stored in matrix form, with each row being the 3D coordinates of a sampling point.

[0135] Flight attitude: stored in a suitable data structure (such as a matrix or structure array), each element contains the attitude information of the corresponding sampling point (such as Euler angle or quaternion representation).

[0136] Data preprocessing

[0137] For the input sparse motion trajectory data, check its data integrity and format correctness. If necessary, perform data cleaning, conversion or interpolation operations to make it more suitable for subsequent path planning calculations. For example, if the trajectory data is missing at certain time points or in certain areas, interpolation methods can be used to supplement it.

[0138] Perform rationality checks on other input parameters to ensure that their values ​​are within a reasonable range. For example, parameters such as maximum speed, roll angle, pitch angle, etc. cannot be negative or exceed the actual physical limitations of the drone.

[0139] Call the path planning module function

[0140] According to the interface of the Matlab UAV toolbox path planning module, the preprocessed input parameters are passed to the corresponding path planning functions. These functions may be the core functions of the toolbox to implement the 3D-Dubins algorithm, and the path planning process is started by calling them.

[0141] Result processing and output

[0142] The original path result returned by the path planning module is processed to meet the output requirements. The original path is resampled or interpolated according to the specified path sampling interval. For example, if the original path result is information on key path points, and the output requires more dense sampling points, an interpolation algorithm (such as linear interpolation or spline interpolation) can be used to generate new sampling points between key path points, including path position and flight attitude information.

[0143] (4) Export the function as a C language dynamic library and integrate it into the Unreal Engine Mass framework

[0144] Matlab functions exported as C language dynamic libraries

[0145] Make sure that the 3D-Dubins path planning function written in Matlab meets the requirements of Matlab Coder. Avoid using Matlab-specific advanced functions and unsupported functions, such as some graphical interface-related functions or interactive functions specific to the Matlab environment.

[0146] Open the Matlab Coder tool and configure the export parameters. Select the target platform as a platform compatible with the Unreal Engine (such as Windows, Linux, etc.), and specify the output library type as a dynamic library (such as .dll or .so). According to the input and output parameters of the 3D-Dubins path planning function, set the C language interface definition, including parameter type, function name, etc., so that it can be called correctly in the C language environment.

[0147] Start the compilation process of Matlab Coder, convert the Matlab function into C language code, and generate a dynamic library file. This process may take some time, depending on the complexity of the function and the performance of the computer.

[0148] Integrated into Unreal Engine Mass Framework

[0149] Study the architecture and programming interface of the Unreal Engine Mass Framework, and learn how to introduce external C language dynamic libraries into the Mass Framework. Check out the relevant documents, tutorials, and sample projects to master the methods of defining new modules, processors, or functions in the Mass Framework.

[0150] Copy the generated C language dynamic library file to the appropriate directory of the Unreal Engine project, such as the project's plugin directory or a specific third-party library directory.

[0151] Write code in the Mass framework to call the 3D-Dubins path planning function in the dynamic library. This may involve creating a new Mass processor class or adding calling logic to an existing processor. In the code, use the dynamic library loading mechanism (such as dlopen, dlsym and other functions) to load the dynamic library, get the function pointer, then pass the corresponding parameters and call the 3D-Dubins path planning function to obtain the path position and flight attitude data for subsequent drone control and simulation.

[0152] S2: Based on the motion planning list, solve the speed matching problem and obtain a motion data table indexed by time, wherein the motion data table indexed by time includes information including time and motion distance.

[0153] In this step, before starting the motion simulation, you first need to build the motion data table MDT: the motion state of the drone is divided into three types: deceleration motion, acceleration motion and uniform motion. The data structure of the motion data table MDT contains the position, attitude, speed, motion state, cumulative time and distance from the starting point of the path planning to the point.

[0154] The motion data table MDT is divided into three types:

[0155] TBMDT (Time Based Movement Data Table): A movement data table indexed by time.

[0156] DBMDT (Distance Based Movement Data Table): A movement data table indexed by movement distance.

[0157] TDBMDT (Transition Distance Based Movement Data Table): A motion data table indexed by the distance traveled during motion state transition.

[0158] In this embodiment, the specific steps of constructing the motion data table MDT are:

[0159] Constructing three types of motion data tables including the motion data table TBMDT indexed by time, the motion data table DBMDT indexed by motion distance, and the motion data table TDBMDT indexed by distance when motion state is changed;

[0160] The path generation processor UMassMovementPathGenerateProcessor written based on the Unreal Engine Mass framework performs the following operations:

[0161] Inserting the motion data of the path points in the motion planning list into the motion data table DBMDT indexed by the motion distance, the initial data including the path position, the flight attitude and the distance;

[0162] Call the motion data table calculation function, calculate the motion state transition point of the path segment based on the speed matching problem, generate the motion data table TDBMDT indexed by the distance at the motion state transition, and finally merge and interpolate to generate the motion data table TBMDT indexed by time based on the motion data table DBMDT indexed by the motion distance and the motion data table TDBMDT indexed by the distance at the motion state transition. This step is specifically as follows:

[0163] a: Solve the speed matching problem, calculate the motion state transition point of the path segment based on the current speed, acceleration, deceleration, expected speed of the path and the speed when reaching the end of the path, generate the motion data table TDBMDT with the distance when the motion state transition is used as the index, and the motion data includes the motion state, speed, time and distance at this time. If the path is too short and cannot be adjusted to the speed when reaching the end of the path at the end of the path, then calculate the distance point after the drone continuously accelerates and decelerates after reaching the end of the path and approaches the speed when reaching the end of the path at the target, as the final motion state transition point in the motion data table TDBMDT with the distance when the motion state transition is used as the index;

[0164] b: traverse the motion data table DBMDT indexed by motion distance, search for path segments in the motion data table TDBMDT indexed by the distance at the time of motion state conversion according to the distance, calculate the motion state, time and speed missing in the motion data, and insert them into the motion data table TBMDT indexed by time;

[0165] c: traverse the motion data table TDBMDT indexed by the distance at the time of motion state conversion, search for path segments in the motion data table DBMDT indexed by the motion distance according to the distance, calculate the path position and the flight attitude missing in the motion data, and insert them into the motion data table TBMDT indexed by time;

[0166] Finally, the time-indexed motion data table TBMDT stores the motion data of all path segments and motion state transition points.

[0167] S3: The motion processor written based on the Unreal Engine Mass framework starts motion simulation, uses the accumulated motion time for each frame to search for the corresponding path segment in the motion data table indexed by time, obtains the path position and the flight attitude of the current path segment, and sets the path position and the flight attitude to the drone.

[0168] In this embodiment, step S3 is specifically as follows:

[0169] The motion processor UMassMovementHandleProcessor written based on the Unreal Engine Mass framework updates the motion position and posture of the drone in each frame and stores the cumulative motion time of the drone in this path planning. The calculation process is as follows:

[0170] For each frame, the accumulated motion time is used to search for a corresponding time period in the motion data table TBMDT indexed by time;

[0171] If the accumulated motion time is greater than the maximum time in the motion data table TBMDT indexed by time and no corresponding segment is found, the UAV moves at a uniform speed according to the current speed and the flight attitude;

[0172] If the corresponding segment is found, the relative distance of the drone on the current segment is calculated according to the motion state of the current segment, and the interpolation factor is calculated according to the relative distance and the total distance of the segment (interpolation factor = relative path / total distance of the segment);

[0173] According to the interpolation factor, the interpolation motion position and the interpolation motion attitude on the path segment are interpolated, and finally the path position and the flight attitude of the UAV are set according to the interpolation result.

[0174] Among them, the path position and the flight attitude of the drone are finally set according to the interpolation result, specifically:

[0175] The path position of the UAV is set as the interpolated motion position;

[0176] The attitude heading angle of the UAV is set to the heading angle in the interpolated motion attitude;

[0177] The pitch angle of the drone's attitude takes the pitch angle in the interpolated motion attitude as the target value and is approximated by the pitch angle change rate set by the drone;

[0178] The attitude roll angle of the drone does not use the calculation result of the interpolated motion attitude, but calculates the roll angle target value based on the heading angle change rate set by the drone, and approximates it through the roll angle change rate set by the drone.

[0179] Second embodiment

[0180] like Figure 3 As shown, this embodiment provides a large-scale UAV swarm motion simulation system for executing the large-scale UAV swarm motion simulation method in the first embodiment, including:

[0181] A motion path planning module 1 is used to start motion planning, respond to motion planning results, input the motion planning results into a pre-written path planning function, and output a motion planning list of continuous path positions and flight postures at current path positions;

[0182] A motion data table calculation module 2 is used to solve the speed matching problem based on the motion planning list, and solve a motion data table with time as the index, wherein the motion data table with time as the index includes information including time and motion distance;

[0183] The motion simulation module 3 is started, which is used to start the motion simulation based on the motion processor written in the Unreal Engine Mass framework. The accumulated motion time is used for each frame to find the corresponding path segment in the motion data table indexed by time, and the path position and the flight attitude of the current path segment are obtained, and the path position and the flight attitude are set on the drone.

[0184] A computer-readable storage medium stores a computer code. When the computer code is executed, the above method is executed. A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium can include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0185] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

[0186] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0187] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims

1. A large-scale UAV swarm motion simulation method, characterized in that: The following steps are involved: S1: Start motion planning, respond to the motion planning result, input the motion planning result into a pre-written path planning function, and output a motion planning list of continuous path positions and flight postures under the current path position; S2: Based on the motion planning list, solving the speed matching problem, solving a motion data table indexed by time, wherein the motion data table indexed by time includes information including time and motion distance; S3: The motion processor written based on the Unreal Engine Mass framework starts motion simulation, uses the accumulated motion time for each frame to search for the corresponding path segment in the motion data table indexed by time, obtains the path position and the flight attitude of the current path segment, and sets the path position and the flight attitude to the drone.

2. The large-scale UAV swarm motion simulation method according to claim 1 is characterized in that: In step S1, motion planning is started, and in response to the motion planning result, the motion planning result is input into a pre-written path planning function, and a motion planning list of continuous path positions and flight postures under the current path position is output, specifically: Performing the motion planning for each drone in the drone cluster, and outputting the motion planning results including a sparse motion trajectory, a desired speed, and a terminal speed; The motion planning result is input into the pre-written path planning function, and the path position of the continuous specified path sampling interval and the motion planning list of the flight posture under the current path position are output as the final path.

3. The large-scale UAV swarm motion simulation method according to claim 2 is characterized in that: The path planning function is specifically: The path planning function uses the path planning module in the Matlab UAV toolbox to write a 3D-Dubins path planning function, and finally exports the 3D-Dubins path planning function as a C language dynamic library and integrates it into the Unreal Engine Mass framework; Among them, the 3D-Dubins path planning function combines basic motion models including straight segments, left turns, and right turns when performing path planning, and considers the minimum turning radius of the drone to ensure that the drone flies along the shortest path from the starting point to the end point, while satisfying the dynamics and controllability constraints of the drone to generate the final path.

4. The large-scale UAV swarm motion simulation method according to claim 3 is characterized in that: In step S2, based on the motion planning list, the speed matching problem is solved to obtain the motion data table indexed by time, specifically: Constructing three types of motion data tables including the motion data table TBMDT indexed by time, the motion data table DBMDT indexed by motion distance, and the motion data table TDBMDT indexed by distance when motion state is changed; The path generation processor written based on the Unreal Engine Mass framework performs the following operations: Inserting the motion data of the path points in the motion planning list into the motion data table DBMDT indexed by the motion distance, the initial data including the path position, the flight attitude and the distance; Call the motion data table calculation function, calculate the motion state transition points of the path segment based on the speed matching problem, generate the motion data table TDBMDT indexed by the distance at the motion state transition, and based on the motion data table DBMDT indexed by the motion distance and the motion data table TDBMDT indexed by the distance at the motion state transition, finally merge and interpolate to generate the motion data table TBMDT indexed by time.

5. The large-scale UAV swarm motion simulation method according to claim 4 is characterized in that: The motion data table calculation function is called, and the motion state transition point of the path segment is calculated based on the speed matching problem, and the motion data table TDBMDT indexed by the distance at the motion state transition is generated, and based on the motion data table DBMDT indexed by the motion distance and the motion data table TDBMDT indexed by the distance at the motion state transition, the motion data table TBMDT indexed by time is finally merged and interpolated, specifically: Solve the speed matching problem, calculate the motion state transition point of the path segment based on the current speed, acceleration, deceleration, expected speed of the path and the speed when reaching the end of the path, generate the motion data table TDBMDT indexed by the distance when the motion state transition is performed, at this time, the motion data includes the motion state, speed, time and distance, if the path is too short and cannot be adjusted to the speed when reaching the end of the path at the end of the path, then calculate the distance point after the drone continuously accelerates and decelerates after reaching the end of the path, and approaches the speed when reaching the end of the path at the end of the path, as the final motion state transition point in the motion data table TDBMDT indexed by the distance when the motion state transition is performed; Traversing the motion data table DBMDT indexed by motion distance, searching for path segments in the motion data table TDBMDT indexed by the distance at the time of motion state conversion according to the distance, calculating the motion state, time and speed missing in the motion data, and inserting them into the motion data table TBMDT indexed by time; Traversing the motion data table TDBMDT indexed by the distance at the time of motion state conversion, searching for path segments in the motion data table DBMDT indexed by the motion distance according to the distance, calculating the path position and the flight attitude missing in the motion data, and inserting them into the motion data table TBMDT indexed by time; Finally, the time-indexed motion data table TBMDT stores the motion data of all path segments and motion state transition points.

6. The large-scale UAV swarm motion simulation method according to claim 3 is characterized in that: In step S3, the motion processor written based on the Unreal Engine Mass framework starts motion simulation, and uses the accumulated motion time for each frame to find the corresponding path segment in the motion data table indexed by time, obtains the path position and the flight attitude of the current path segment, and sets the path position and the flight attitude to the drone, specifically: The motion processor written based on the Unreal Engine Mass framework performs the following operations: For each frame, the accumulated motion time is used to search for a corresponding time period in the motion data table TBMDT indexed by time; If the accumulated motion time is greater than the maximum time in the motion data table TBMDT indexed by time and no corresponding segment is found, the UAV moves at a uniform speed according to the current speed and the flight attitude; If the corresponding segment is found, the relative distance of the drone on the current segment is calculated according to the motion state of the current segment, and the interpolation factor is calculated according to the relative distance and the total distance of the segment; According to the interpolation factor, the interpolation motion position and the interpolation motion attitude on the path segment are interpolated, and finally the path position and the flight attitude of the UAV are set according to the interpolation result.

7. The large-scale UAV swarm motion simulation method according to claim 6 is characterized in that: Finally, the path position and the flight attitude of the drone are set according to the interpolation results, specifically: The path position of the UAV is set as the interpolated motion position; The attitude heading angle of the UAV is set to the heading angle in the interpolated motion attitude; The pitch angle of the drone's attitude takes the pitch angle in the interpolated motion attitude as the target value and is approximated by the pitch angle change rate set by the drone; The attitude roll angle of the drone does not use the calculation result of the interpolated motion attitude, but calculates the roll angle target value based on the heading angle change rate set by the drone, and approximates it through the roll angle change rate set by the drone.

8. A large-scale UAV swarm motion simulation system for executing the large-scale UAV swarm motion simulation method according to any one of claims 1 to 7, characterized in that: include: A motion path planning module, used to start motion planning, respond to motion planning results, input the motion planning results into a pre-written path planning function, and output a motion planning list of continuous path positions and flight postures at current path positions; A motion data table calculation module, used to solve the speed matching problem based on the motion planning list, and solve a motion data table indexed by time, wherein the motion data table indexed by time includes information including time and motion distance; The motion simulation module is started, which is used to start motion simulation based on the motion processor written in the Unreal Engine Mass framework. The accumulated motion time is used for each frame to find the corresponding path segment in the motion data table indexed by time, and the path position and the flight attitude of the current path segment are obtained, and the path position and the flight attitude are set on the drone.

9. A computer device comprising a memory and one or more processors, wherein the memory stores computer codes, and when the computer codes are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 7. 10 . A computer-readable storage medium storing a computer code. When the computer code is executed, the method according to claim 1 is executed.