A multi-unmanned aerial vehicle distributed PID formation control method, device and medium
Patent Information
- Application Number
- CN202510279445.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2026-09-18
AI Technical Summary
[0002]近年来,多旋翼无人机技术快速发展,其凭借体积小、机动性高等优势在军事、农业、巡检等方面得到广泛应用,但是单架无人机载荷有限,其所能完成的任务比较受限,随着人们的要求越来越高,单无人机越来越不能满足现有任务需求,因此,多无人机控制已经成为各行各业的重要话题
[0040]This application provides a multi-UAV distributed PID formation control method, device, and medium. The multi-UAV distributed PID formation control method is implemented through a multi-UAV formation system. The multi-UAV formation system includes a terminal ground station and multiple UAVs. Each UAV is equipped with an onboard computer, communication module, flight controller, positioning module, and power module. The multiple UAVs include one navigator and multiple follower UAVs. The method acquires the desired trajectory and formation information of the navigator; determines the desired trajectory of each follower UAV based on the navigator's desired trajectory and formation information; acquires the real-time attitude of each UAV; and determines the desired rotational speed of each UAV using a distributed PID control algorithm based on the desired trajectory and real-time attitude. The method then controls each UAV according to the desired rotational speed so that each UAV performs its flight mission along the desired trajectory. The distributed PID control algorithm includes a position controller and an attitude controller. This application utilizes components such as an onboard computer, communication module, multiple UAVs, and positioning module to achieve multi-UAV formation maintenance and formation change functions. The UAV's onboard computer is equipped with a distributed PID control algorithm. Based on the onboard computer and the Mavros function package, a connection is established between the navigator and follower aircraft, enabling inter-UAV communication and information sharing. The navigator will fly along the desired trajectory and at the desired speed, while the other follower aircraft will calculate their own desired trajectories based on the navigator's trajectory and the predetermined formation information. Ultimately, they will complete the formation maintenance and formation change tasks within a limited time. This application improves the real-time performance and robustness of UAV control.
Smart Images

Figure CN122776811A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of multi-UAV control, and in particular to a method, device and medium for distributed PID formation control of multi-UAVs. Background Technology
[0002] In recent years, multi-rotor drone technology has developed rapidly. With its advantages of small size and high maneuverability, it has been widely used in military, agriculture, inspection and other fields. However, the payload of a single drone is limited, and the tasks it can complete are relatively limited. As people's requirements are getting higher and higher, single drones are increasingly unable to meet the current mission requirements. Therefore, multi-drone control has become an important topic in various industries.
[0003] Existing multi-UAV control structures are mainly divided into centralized control, decentralized control, and distributed control. Centralized structures rely on a single navigator to handle planning, scheduling, and control of the multi-UAV system, placing a significant burden on the navigator. As the number of UAVs increases, real-time performance deteriorates. Furthermore, due to this high dependence on the navigator, a malfunction in the navigator affects the entire multi-UAV system. Decentralized structures require each UAV to have a high degree of autonomy, enabling them to complete tasks independently. However, UAVs cannot communicate with each other, only with pre-defined virtual UAVs. This structure offers greater fault tolerance but has poorer control performance. Distributed control structures require UAVs to communicate with adjacent subsystems regarding position and attitude information. They no longer require a navigator as a global coordinating center, nor do they require all UAVs to have autonomous decision-making capabilities.
[0004] Most current multi-UAV control structures adopt a centralized control structure to complete related tasks. This structure has only one planning center, which has disadvantages such as poor robustness and low real-time performance. Summary of the Invention
[0005] The purpose of this application is to provide a distributed PID formation control method, device and medium for multiple UAVs, which improves real-time performance and system robustness.
[0006] To achieve the above objectives, this application provides the following solution:
[0007] Firstly, this application provides a multi-UAV distributed PID formation control method, which is implemented through a multi-UAV formation system. The multi-UAV formation system includes a terminal ground station and multiple UAVs. Each UAV is equipped with an onboard computer, a communication module, a flight controller, a positioning module, and a power module. The multiple UAVs include one navigator and multiple follower UAVs. The multi-UAV distributed PID formation control method includes:
[0008] Obtain the navigator's desired trajectory and formation information;
[0009] Based on the navigator's expected trajectory and the formation information, determine the expected trajectories of each follower aircraft;
[0010] The real-time attitude of each UAV is acquired; the real-time attitude includes real-time position and real-time attitude angles; the attitude angles include pitch angle, roll angle and yaw angle.
[0011] Based on the desired trajectory and real-time attitude, a distributed PID control algorithm is used to determine the desired rotational speed of each UAV, and the UAV is controlled according to the desired rotational speed so that each UAV performs its flight mission along the desired trajectory; the distributed PID control algorithm includes a position controller and an attitude controller.
[0012] Optionally, the desired trajectory of each follower aircraft is determined based on the desired trajectory of the lead aircraft and the formation information, specifically including:
[0013] Based on the formation information, determine the relative distance between the lead aircraft and each follower aircraft;
[0014] The expected trajectories of each follower are determined based on the expected trajectory of the lead aircraft and the relative distances.
[0015] Optionally, the desired trajectory of the navigator is:
[0016]
[0017] Where (x, y, z) are the three-axis coordinates of the navigator's desired trajectory; t represents the flight time; t0 is the final flight time; and z0 is a constant.
[0018] Optionally, the desired trajectory of each follower aircraft is determined based on the desired trajectory of the lead aircraft and the relative distances, specifically including:
[0019] Using formula Determine the expected trajectory of each follower; where, (x i y i , z i Let be the three-axis coordinates of the desired trajectory of the i-th follower aircraft; (Δx) d Δy d Δz d ) represents the relative distance between the i-th follower aircraft and the navigator aircraft.
[0020] Optionally, based on each desired trajectory and each real-time attitude, a distributed PID control algorithm is used to determine the desired rotational speed of each UAV, specifically including:
[0021] Determine the position error of each desired trajectory and the corresponding real-time position of the UAV;
[0022] Based on the position error, the desired acceleration of the corresponding UAV is determined using the position controller;
[0023] Based on the desired acceleration, determine the desired attitude angle of the corresponding UAV;
[0024] The attitude angle error is determined based on the desired attitude angle and the corresponding real-time attitude angle of the UAV.
[0025] Based on the attitude angle error, the desired torque of the corresponding UAV is determined using the attitude controller;
[0026] Based on the desired acceleration, determine the desired lift of the corresponding UAV;
[0027] The desired rotational speed of the corresponding UAV is determined based on the desired torque and the desired lift.
[0028] Optionally, the desired attitude angle of the corresponding UAV is determined based on the desired acceleration, specifically including:
[0029] Using a rotation matrix, the desired acceleration is converted into the desired acceleration in the body axis system;
[0030] Based on the desired acceleration under the body axis, determine the desired pitch angle and desired roll angle of the corresponding UAV;
[0031] Based on the UAV's desired position and real-time position, determine the corresponding UAV's desired yaw angle.
[0032] Optionally, based on the position error, the desired acceleration of the corresponding UAV is determined using the position controller, specifically including:
[0033] Using position controller Determine the desired acceleration for the corresponding UAV; where a desired For the desired acceleration; K p K is the proportional gain of the position controller. d K is the differential gain of the position controller. i e is the integral gain of the position controller; p This refers to the positional error; The rate of change of position error; ∫e p dt is the integral of the position error.
[0034] Optionally, based on the attitude angle error, the desired torque of the corresponding UAV is determined using the attitude controller, specifically including:
[0035] Using attitude controller Determine the desired torque for the corresponding UAV; where M desired K represents the desired torque. pattK represents the proportional gain of the attitude controller. datt K represents the differential gain of the attitude controller. iatt e is the integral gain of the attitude controller; att This refers to the attitude angle error; The rate of change of attitude angle error; ∫e att dt is the integral of the attitude angle error.
[0036] In a second aspect, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the multi-UAV distributed PID formation control method described above.
[0037] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multi-UAV distributed PID formation control method described above.
[0038] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the multi-UAV distributed PID formation control method described above.
[0039] According to the specific embodiments provided in this application, this application has the following technical effects:
[0040] This application provides a multi-UAV distributed PID formation control method, device, and medium. The multi-UAV distributed PID formation control method is implemented through a multi-UAV formation system. The multi-UAV formation system includes a terminal ground station and multiple UAVs. Each UAV is equipped with an onboard computer, communication module, flight controller, positioning module, and power module. The multiple UAVs include one navigator and multiple follower UAVs. The method acquires the desired trajectory and formation information of the navigator; determines the desired trajectory of each follower UAV based on the navigator's desired trajectory and formation information; acquires the real-time attitude of each UAV; and determines the desired rotational speed of each UAV using a distributed PID control algorithm based on the desired trajectory and real-time attitude. The method then controls each UAV according to the desired rotational speed so that each UAV performs its flight mission along the desired trajectory. The distributed PID control algorithm includes a position controller and an attitude controller. This application utilizes components such as an onboard computer, communication module, multiple UAVs, and positioning module to achieve multi-UAV formation maintenance and formation change functions. The UAV's onboard computer is equipped with a distributed PID control algorithm. Based on the onboard computer and the Mavros function package, a connection is established between the navigator and follower aircraft, enabling inter-UAV communication and information sharing. The navigator will fly along the desired trajectory and at the desired speed, while the other follower aircraft will calculate their own desired trajectories based on the navigator's trajectory and the predetermined formation information. Ultimately, they will complete the formation maintenance and formation change tasks within a limited time. This application improves the real-time performance and robustness of UAV control. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 A flowchart illustrating a distributed PID formation control method for multiple unmanned aerial vehicles (UAVs) provided in an embodiment of this application;
[0043] Figure 2 This is a flowchart of a distributed PID formation control method;
[0044] Figure 3 This is a schematic diagram of the distributed PID formation control method.
[0045] Figure 4 This is a simulation diagram of three-aircraft formation transformation and formation maintenance;
[0046] Figure 5 It shows the preset trajectory of the navigator on the x-axis and the trajectory tracking effect.
[0047] Figure 6 It shows the preset trajectory of the navigator on the y-axis and the trajectory tracking effect.
[0048] Figure 7 This is a diagram showing the preset trajectory of the slave device on the x-axis and the trajectory tracking effect.
[0049] Figure 8 This is a diagram showing the preset trajectory of the slave device on the y-axis and the trajectory tracking effect.
[0050] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] In one exemplary embodiment, such as Figures 1-3 As shown, a distributed PID formation control method for multiple unmanned aerial vehicles (UAVs) is provided. This method is implemented through a multi-UAV formation system. The multi-UAV formation system includes a terminal ground station and multiple UAVs. Each UAV is equipped with an onboard computer, a communication module, a flight controller, a positioning module, and a power module. The multiple UAVs include one navigator and multiple follower UAVs. The distributed PID formation control method for multiple UAVs includes the following steps:
[0054] S1: Obtain the navigator's desired trajectory and formation information.
[0055] In practical applications, the onboard computer uses the ROS (Robot Operating System) system. First, communication between UAVs is established based on the ROS system, the Mavros function package (communication module), and VRPN (Virtual Reality Peripheral Network).
[0056] The Mavros feature pack is a bridge for connecting MAVLink protocol drones and ROS systems, providing functions such as drone control and status monitoring.
[0057] VRPN is an open-source, cross-platform software framework that allows different virtual reality (VR) devices and systems to communicate and interoperate. VRPN's primary goal is to provide a flexible and scalable architecture that enables various virtual reality peripherals (such as head trackers, data gloves, force feedback devices, etc.) to interact with a wide range of virtual reality applications and systems.
[0058] Before establishing communication between the drones, each drone needs to be powered on and initialized. Initialization mainly includes initializing the drone's positioning and communication modules. Drone positioning is handled by the Optitrack motion capture system, which obtains the drone's precise position and attitude information. It's important to note that this system requires the drone to carry reflective marker balls; at least three balls must be arranged asymmetrically. VRPN provides a series of functional interfaces. During initialization, running vrpn_server.exe tests VRPN to ensure that the drone's pose information can be accurately published to the appropriate topics, facilitating subsequent distributed drone control. The Mavros package primarily handles communication between the drone's onboard computer (ROS system) and the PX4, transmitting control signals.
[0059] S2: Determine the expected trajectory of each follower aircraft based on the expected trajectory of the lead aircraft and the formation information, specifically including:
[0060] S21: Determine the relative distance between the navigator and each follower aircraft based on the formation information.
[0061] S22: Determine the expected trajectory of each follower aircraft based on the expected trajectory of the navigator and the relative distances.
[0062] After establishing communication, the desired trajectory and formation information of the navigator are published.
[0063] After communication is established, the desired trajectory and formation information of the navigator are published to a relevant topic using the publish / subscribe mechanism of the ROS system. The topic name can be defined by the user. The desired trajectories of each follower are calculated based on the desired trajectory and formation information of the navigator. The specific calculation method for the desired trajectory of the follower is as follows: the relative distance between the navigator and the follower is obtained from the formation information, and then the desired trajectory information of the follower is obtained from the difference between the three axes (x, y, z axes) information of the navigator's trajectory and the relative distance.
[0064] Assume the desired trajectory information for the navigator is as follows:
[0065]
[0066] Where (x, y, z) are the three-axis coordinates of the navigator's desired trajectory; t represents the flight time in seconds; t0 is the final flight time, which can be customized; and z0 is a constant.
[0067] Based on the navigator's trajectory information described above, the expected trajectory information for the follower aircraft can be obtained as follows:
[0068]
[0069] Among them, (x i y i , z i Let be the three-axis coordinates of the desired trajectory of the i-th follower aircraft; (Δx) d Δy d Δz d ) represents the relative distance between the i-th follower aircraft and the navigator aircraft.
[0070] It should be noted that this is just one example, and specific trajectories can also be set according to task requirements.
[0071] S3: Obtain the real-time attitude of each UAV; the real-time attitude includes real-time position and real-time attitude angles; the attitude angles include pitch angle, roll angle and yaw angle.
[0072] S4: Based on each desired trajectory and each real-time attitude, the desired rotational speed of each UAV is determined using a distributed PID control algorithm. The UAV is then controlled according to the desired rotational speed so that each UAV performs its flight mission along the desired trajectory. The distributed PID control algorithm includes a position controller and an attitude controller.
[0073] As an optional implementation, based on each desired trajectory and each real-time attitude, a distributed PID control algorithm is used to determine the desired rotational speed of each UAV, specifically including:
[0074] S41: Determine the position error for each desired trajectory and the corresponding real-time position of the UAV.
[0075] In practical applications, using formula e p =P desired -P actual Determine the position error for each desired trajectory and the corresponding real-time position of the UAV.
[0076] Among them, e p For position error; P desired For the desired position, P desired =(x desired y desired , z desired ); P actual For real-time location, P actual =(x actualy actual , z actual ).
[0077] S42: Based on the position error, use the position controller to determine the desired acceleration of the corresponding UAV.
[0078] The position error is input to the PID control section of the position controller and used as the control error to calculate the desired acceleration.
[0079] Position controller is Among them, a desired For the desired acceleration, including a x a y a z The three elements represent the expected acceleration of the drone in the x, y, and z axes, respectively; K p K is the proportional gain of the position controller. d K is the differential gain of the position controller. i e is the integral gain of the position controller; p This refers to the positional error; The rate of change of position error; ∫e p dt is the integral of the position error.
[0080] As an optional implementation, S42 specifically includes:
[0081] Using position controller Determine the desired acceleration for the corresponding drone.
[0082] S43: Determine the desired attitude angle of the corresponding UAV based on the desired acceleration.
[0083] As an optional implementation, S43 specifically includes:
[0084] S431: Using a rotation matrix, the desired acceleration is converted into the desired acceleration in the body axis system.
[0085] S432: Determine the desired pitch angle and desired roll angle of the corresponding UAV based on the desired acceleration under the airframe axis.
[0086]
[0087] Where, θ desired φ is the desired pitch angle. desired The desired roll angle.
[0088] S433: Determine the expected yaw angle of the corresponding UAV based on the UAV's desired position and real-time position.
[0089] ψ desired =atan2(ydesired -y actual ,x desired -x actual ).
[0090] Where, ψ desired y is the desired yaw angle; desired Let y be the desired position of the drone on the y-axis; actual The drone's real-time position on the y-axis; x desired Let x be the desired position of the drone on the x-axis; actual The real-time position of the drone on the x-axis.
[0091] S44: Determine the attitude angle error based on the desired attitude angle and the corresponding real-time attitude angle of the UAV. Calculate the attitude angle error using the obtained desired attitude angle:
[0092] e att =δ desired -δ actual .
[0093] Among them, e att For attitude angle error; δ desired =(φ desired θ desired , ψ desired δ represents the desired attitude angle of the UAV. actual =(φ actual θ actual , ψ actual () indicates the real-time attitude angle of the drone.
[0094] S45: Based on the attitude angle error, use the attitude controller to determine the desired torque of the corresponding UAV.
[0095] The attitude controller calculates the desired torque based on the attitude angle error.
[0096] Attitude controller is Among them, M desired K represents the desired torque. patt K represents the proportional gain of the attitude controller. datt K represents the differential gain of the attitude controller. iatt e is the integral gain of the attitude controller; att This refers to the attitude angle error; The rate of change of attitude angle error; ∫e att dt is the integral of the attitude angle error.
[0097] As an optional implementation, S45 specifically includes:
[0098] Using attitude controller Determine the desired torque for the corresponding UAV;
[0099] S46: Determine the desired lift of the corresponding UAV based on the desired acceleration.
[0100] Using formula L desired =m·(g+a) z Determine the desired lift for the corresponding UAV; where L desired Let m be the expected lift of the drone; m be the mass of the drone; and g be the acceleration due to gravity.
[0101] S47: Determine the desired rotational speed of the corresponding UAV based on the desired torque and the desired lift.
[0102] In practical applications, the desired rotational speed of the motor in a drone is obtained using the following formula:
[0103] Expected lift:
[0104] L desired =T1+T2+T3+T4.
[0105] in: Where, k T It is the motor thrust constant, ω i It is the rotational speed of the i-th motor.
[0106] Desired torque:
[0107] M desired =M1+M2+M3+M4.
[0108] in, k M It is the motor torque constant, k T and k M It depends on the motor model; you can obtain it from the motor manufacturer or by conducting your own experiments.
[0109] In practical applications, the lead aircraft flies according to the desired trajectory, while the other follower aircraft fly according to the desired trajectory calculated autonomously based on the formation information. During the flight, a distributed PID control algorithm is used to control each UAV, and each UAV flies according to its own desired trajectory, ensuring that each UAV reaches the desired position within a limited time and completes the formation change and formation maintenance tasks.
[0110] After the navigator and all follower aircraft obtain the desired trajectory, they use the positioning system to obtain the actual position of the UAV. The error between the desired trajectory and the actual position of the UAV is used as input and fed into the distributed PID control algorithm. Finally, the control signal (desired rotational speed) is calculated to complete the UAV flight mission.
[0111] The control algorithm used is divided into outer loop and inner loop control. The outer loop is the position controller, and the inner loop is the attitude controller. First, the controller obtains the desired position in the inertial coordinate system based on the specific path or trajectory planning information. Then, the position controller calculates the desired acceleration in the inertial frame based on the desired position and the actual state (actual attitude angles (pitch, roll, yaw angles)), angular velocity (actual angular velocity), actual position (actual position of the UAV in space), and actual velocity (actual velocity of the UAV)). A rotation matrix is then used to convert the desired acceleration in the inertial frame to the body axis frame. Next, the desired acceleration in the body axis frame is converted into the desired pitch and roll angles by the inner loop command generation module. These are then added to the desired yaw angle calculated by the controller, along with the actual attitude angles and angular velocity, and the attitude controller calculates the desired torque. Finally, the desired torque, combined with the desired lift obtained by the inner loop command generation module, is output to the control distribution module to obtain the desired speeds of each motor, generating corresponding lift and torque, enabling the UAV to complete its specific mission.
[0112] Figure 4 This is a simulation diagram of a three-aircraft formation change and formation maintenance, consisting of one lead aircraft and two follower aircraft. Figure 4 As shown, the aircraft initially flies in an equilateral triangle formation and maintains the formation, then flies in an inverted triangle formation.
[0113] Figures 5-8 This is a diagram of a two-aircraft experiment; one navigator (master aircraft) and one slave aircraft. The experiment maintains the same altitude for both aircraft, so there is no diagram with the z-axis.
[0114] The navigator's preset trajectory on the x-axis and the trajectory tracking effect, such as... Figure 5 As shown. The preset trajectory of the navigator on the y-axis and the trajectory tracking effect are as follows. Figure 6 As shown. The preset trajectory of the slave device on the x-axis and the trajectory tracking effect are as follows. Figure 7 As shown. The preset trajectory of the slave device on the y-axis and the trajectory tracking effect are as follows. Figure 8 As shown.
[0115] The aforementioned multi-UAV formation system comprises a ground station and multiple UAVs. Each UAV consists of an onboard computer, a PIXHAWK4 flight controller, a data transmission module, a positioning module, and a power module. The ground station is a desktop or laptop computer with the appropriate environment installed. The onboard computer is a Jetson XavierNX suite, which is compact and highly efficient, fully capable of handling the computational tasks of distributed UAV formation. The flight controller uses an STM32F427 chip as the main controller, handling sensor data reading and writing, attitude calculation and control, and processing and controlling other information. The sensors mainly include accelerometers, magnetometers, and barometers. The controller primarily receives the UAVs' flight position, speed, and attitude information, as well as formation commands transmitted from the ground station. This information and these commands are calculated by the internal controller, which then outputs corresponding control commands, ultimately completing the low-level control. The data transmission module connects to the flight controller via a serial port and via Wi-Fi wireless signal. The system connects to a router, and computers with ground stations can connect via Ethernet cable or Wi-Fi to form a communication network for formation control. The positioning module consists of a T265 binocular camera, a D435i depth camera, and an Optitrack motion capture system. The power module comprises a propeller, battery, ESC, and motor. The propeller is a 1045 quadraught propeller, the battery is a 4s 4300mAh lithium battery, the ESC is a Cyclone 4-in-1 ESC, and the motor is a T-motor model. The power module is controlled by four PWM channels of the flight controller, and this power module combination can guarantee a flight time of at least 20 minutes per flight.
[0116] This application presents a multi-UAV distributed PID formation control method that utilizes components such as ROS, Mavros package, multiple UAVs, motion capture system, and VRPN to achieve multi-UAV formation maintenance and formation change functions. The method's implementation process is as follows: the UAV's onboard computer carries a distributed PID control algorithm, establishing a connection between the navigator and follower UAVs based on the ROS system and Mavros package, enabling inter-UAV communication and information sharing. The navigator flies along a desired trajectory and at a desired speed, while the other follower UAVs obtain predetermined formation information based on the navigator's trajectory, thereby calculating their own desired trajectories. Ultimately, the method completes the formation maintenance and formation change tasks within a limited time.
[0117] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described multi-UAV distributed PID formation control method.
[0118] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described distributed PID formation control method for multiple unmanned aerial vehicles.
[0119] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described multi-UAV distributed PID formation control method.
[0120] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 9 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a distributed PID formation control method for multiple unmanned aerial vehicles (UAVs).
[0121] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0124] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0125] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above 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.
[0126] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A distributed PID formation control method for multiple unmanned aerial vehicles (UAVs), characterized in that, The multi-UAV distributed PID formation control method is implemented through a multi-UAV formation system; the multi-UAV formation system includes a terminal ground station and multiple UAVs; each UAV is equipped with an onboard computer, communication module, flight controller, positioning module, and power module; the multiple UAVs include one navigator and multiple follower UAVs; the multi-UAV distributed PID formation control method includes: Obtain the navigator's desired trajectory and formation information; Based on the navigator's expected trajectory and the formation information, determine the expected trajectories of each follower aircraft; The real-time attitude of each UAV is acquired; the real-time attitude includes real-time position and real-time attitude angles; the attitude angles include pitch angle, roll angle and yaw angle. Based on the desired trajectory and real-time attitude, a distributed PID control algorithm is used to determine the desired rotational speed of each UAV, and the UAV is controlled according to the desired rotational speed so that each UAV performs its flight mission along the desired trajectory; the distributed PID control algorithm includes a position controller and an attitude controller.
2. The multi-UAV distributed PID formation control method according to claim 1, characterized in that, Based on the desired trajectory of the lead aircraft and the formation information, the desired trajectories of each follower aircraft are determined, specifically including: Based on the formation information, determine the relative distance between the lead aircraft and each follower aircraft; The expected trajectories of each follower are determined based on the expected trajectory of the navigator and the relative distances.
3. The multi-UAV distributed PID formation control method according to claim 2, characterized in that, The desired trajectory of the navigator is: Where (x, y, z) are the three-axis coordinates of the navigator's desired trajectory; t represents the flight time; t0 is the final flight time; and z0 is a constant.
4. The multi-UAV distributed PID formation control method according to claim 3, characterized in that, Based on the desired trajectory of the lead aircraft and the relative distances, the desired trajectory of each follower aircraft is determined, specifically including: Using formula Determine the desired trajectory for each follower; where, (x i y i , z i Let be the three-axis coordinates of the desired trajectory of the i-th follower aircraft; (Δx) d Δy d Δz d ) represents the relative distance between the i-th follower aircraft and the navigator aircraft.
5. The multi-UAV distributed PID formation control method according to claim 1, characterized in that, Based on the desired trajectories and real-time attitudes, a distributed PID control algorithm is used to determine the desired rotational speed of each UAV, specifically including: Determine the position error of each desired trajectory and the corresponding real-time position of the UAV; Based on the position error, the desired acceleration of the corresponding UAV is determined using the position controller; Based on the desired acceleration, determine the desired attitude angle of the corresponding UAV; The attitude angle error is determined based on the desired attitude angle and the corresponding real-time attitude angle of the UAV. Based on the attitude angle error, the desired torque of the corresponding UAV is determined using the attitude controller; Based on the desired acceleration, determine the desired lift of the corresponding UAV; The desired rotational speed of the corresponding UAV is determined based on the desired torque and the desired lift.
6. The multi-UAV distributed PID formation control method according to claim 5, characterized in that, Based on the desired acceleration, the desired attitude angle of the corresponding UAV is determined, specifically including: Using a rotation matrix, the desired acceleration is converted into the desired acceleration in the body axis system; Based on the desired acceleration under the body axis, determine the desired pitch angle and desired roll angle of the corresponding UAV; Based on the UAV's desired position and real-time position, determine the corresponding UAV's desired yaw angle.
7. The multi-UAV distributed PID formation control method according to claim 5, characterized in that, Based on the position error, the desired acceleration of the corresponding UAV is determined using the position controller, specifically including: Using position controller Determine the desired acceleration for the corresponding UAV; where a desired For the desired acceleration; K p K is the proportional gain of the position controller. d K is the differential gain of the position controller. i e is the integral gain of the position controller; p This refers to the positional error; The rate of change of position error; ∫e p dt is the integral of the position error.
8. The multi-UAV distributed PID formation control method according to claim 5, characterized in that, Based on the attitude angle error, the desired torque of the corresponding UAV is determined using the attitude controller, specifically including: Using attitude controller Determine the desired torque for the corresponding UAV; where M desired K represents the desired torque. patt K represents the proportional gain of the attitude controller. datt K represents the differential gain of the attitude controller. iatt e is the integral gain of the attitude controller; att This refers to the attitude angle error; The rate of change of attitude angle error; ∫e att dt is the integral of the attitude angle error.
9. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the multi-UAV distributed PID formation control method according to any one of claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multi-UAV distributed PID formation control method as described in any one of claims 1-8.