Method and device for controlling unmanned aerial vehicle and computer readable storage medium
Through the system utility calculation model, the flight trajectory and resource allocation of drones are optimized, and the problems of different tasks and delay tolerance in the drone system are solved, and more efficient task processing and system utility are achieved.
Patent Information
- Application Number
- CN202411604017.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2024-12-13
AI Technical Summary
Existing mobile edge computing systems supported by drones cannot fully meet the needs of diverse tasks, especially in the event of significant differences in task latency tolerance, which cannot effectively prioritize high-priority tasks while maintaining system efficiency.
Using the system utility computing model, by obtaining the flight trajectory, computing power, mission delay and user association constraints of the drone, the flight trajectory, mission offload ratio, computing power allocation and mobile user association of the drone are optimized to ensure maximum average System utility, thus obtaining the optimal drone control strategy.
It improves the average system effectiveness when unloading tasks by drones, can handle high-priority tasks more effectively, while maintaining system efficiency, significantly improving task completion rate and offload transmission rate.
Smart Images

Figure CN119126831A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle control, and in particular to a method, a device and a computer-readable storage medium for controlling an unmanned aerial vehicle. Background Art
[0002] In traditional edge computing networks, the fixed location and limited service coverage of edge servers restrict their ability to provide services to local users only. This limitation is particularly evident in critical scenarios such as emergency rescue and unmanned area monitoring, which require wider and more flexible service coverage. To address the above problems, drone-supported mobile edge computing systems have emerged. In drone-supported mobile edge computing systems, drones with servers can be quickly deployed to meet the resource needs of mobile users in areas where ground infrastructure is lacking or overloaded.
[0003] In existing drone-supported mobile edge computing systems, task offloading methods mainly focus on minimizing latency, saving energy, reducing system costs, and improving throughput. These methods are based on the principle of first-come, first-served, and cannot fully meet the diverse quality of service requirements in actual scenarios. This limitation is particularly prominent in user-centric drone communication systems, where the delay tolerance of tasks may vary significantly. For example, if high-priority tasks (such as navigation tasks) fail to meet the delay threshold, serious consequences may occur, while entertainment-related tasks have a greater tolerance. It can be seen that the control method of drones in drone-supported mobile edge computing systems cannot meet the diverse task requirements when offloading tasks on drones, nor can it prioritize tasks according to their urgency to ensure that high-priority tasks are processed in a timely manner while maintaining overall system efficiency. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device and computer-readable storage medium for controlling a drone, so as to solve the problem that when offloading tasks on the drone, the diversified task requirements cannot be met.
[0005] In order to achieve the above object, the technical solution specifically adopted by the present invention is as follows:
[0006] A method for controlling a drone comprises the following steps:
[0007] S1. Obtain the system utility calculation model of the UAV. The system utility calculation model is:
[0008] ; ;
[0009] The goal of the system utility calculation model is to maximize the average system utility of all mobile users in all time periods; where: N is the total number of time slots, and K represents the number of mobile users. represents the task utility of the kth user in the nth time period. Indicates high priority tasks, Represents a low priority task, represents the utility of high priority tasks, Indicates the utility of low priority tasks; Is an indicator function. When the task is a high priority task, =1, =0; when the task is a low priority task, =0, =1.
[0010] S2. According to the drone trajectory, computing power, and task delay, the first constraint, the second constraint, the third constraint, and the fourth constraint are obtained; wherein the first constraint is the constraint of the drone trajectory, including the horizontal angle, speed, and movement in space; the second constraint is the constraint of computing power; the third constraint is the constraint of the unloading ratio, which needs to be between 0 and 1; the fourth constraint is the user association constraint, and after completing the task, the drone needs to establish communication with the user and ensure the feasibility of the association state;
[0011] S3, according to the first constraint condition, the second constraint condition, the third constraint condition and the fourth constraint condition, with the goal of maximizing the output of the average system utility calculation model, respectively optimizing the flight trajectory, task offloading ratio, computing power allocation and mobile user association of the UAV to obtain an optimal UAV control strategy;
[0012] S4. Using the optimal UAV control strategy to control the UAV.
[0013] According to one embodiment of the present invention, the total time required to complete the task Compare with the maximum delay threshold to get the utility of high priority tasks , and the calculation formula used is:
[0014]
[0015] in, Indicates the maximum allowed delay threshold, The total time required to complete the task on the lth UAV, represents a negative constant, represents an indicator function, when x is true, , when x is false, .
[0016] According to another embodiment of the present invention, the total time required to complete the task The utility of the low priority task is obtained by comparing it with the maximum delay threshold, and the calculation formula used is:
[0017]
[0018] in, Indicates the maximum allowed delay threshold, The total time required to complete the task on the lth UAV, is an exponential decay function, is a positive constant representing the reward for completing the task within the maximum delay threshold. is an exponential decay factor.
[0019] According to one embodiment of the present invention, optimizing the flight trajectory of the UAV according to the first constraint condition includes:
[0020] Task offloading ratio, computing power allocation and mobile user association for fixed UAVs;
[0021] Under the first constraint condition, the flight trajectory of the UAV is adjusted to obtain the flight trajectory of the UAV when the output of the average system utility calculation model is maximized, and the flight trajectory is used as the optimal flight trajectory of the UAV.
[0022] According to another embodiment of the present invention, optimizing the task offloading ratio of the drone according to the second constraint condition includes:
[0023] Flight trajectories, computing power allocation and mobile user association of fixed drones;
[0024] Under the second constraint condition, the task offloading ratio of the UAV is adjusted to obtain the task offloading ratio of the UAV when the output of the average system utility calculation model is maximized, and the task offloading ratio is used as the optimal task offloading ratio of the UAV.
[0025] According to yet another embodiment of the present invention, optimizing the computing capacity allocation of the drone according to the third constraint condition includes:
[0026] Flight trajectories, task offloading ratios, and mobile user associations of fixed drones;
[0027] Under the third constraint condition, the computing power allocation ratio of the UAV is adjusted to obtain the computing power allocation of the UAV when the output of the average system utility calculation model is maximized, and the computing power allocation ratio is used as the optimal computing power allocation of the UAV.
[0028] According to another embodiment of the present invention, optimizing the mobile user association according to the fourth constraint condition includes:
[0029] Fixed UAV flight trajectories, computing power allocation, and computing power distribution;
[0030] Under the fourth constraint condition, the mobile user association is adjusted to obtain a mobile user association when the output of the average system utility calculation model is maximized, and the mobile user association is used as the optimal mobile user association.
[0031] In a second aspect, the present invention further provides a device for controlling a drone, comprising a memory and a processor, wherein the processor is used to execute a computer program stored in the memory to implement a method for controlling a drone as in any one of the above embodiments.
[0032] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the method for controlling a drone as in any one of the above embodiments is implemented.
[0033] The present invention has the following characteristics and beneficial effects:
[0034] The technical solution provided by the present invention, after obtaining the average system utility calculation model of the UAV, takes the maximum output of the average system utility calculation model as the goal, optimizes the flight trajectory, task offloading ratio, computing power allocation and mobile user association of the UAV, and obtains the optimal UAV control strategy. Since the technical solution of the present application is based on the optimization of the flight trajectory, task offloading ratio, computing power allocation and mobile user association of the UAV as constraints, the average system utility of the UAV is improved by jointly optimizing multiple coupling variables. Therefore, compared with the prior art, the average system utility of the UAV when unloading tasks can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0036] Figure 1 The present invention is a flowchart of a method for controlling a drone according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.
[0038] like Figure 1 As shown, a method for controlling a drone provided by an embodiment of the present invention includes steps S1 to S4, wherein:
[0039] In step S1, the average system utility calculation model of the drone is obtained. In this embodiment, the average system utility calculation model of the drone is:
[0040] ;
[0041] ;
[0042] Where N is the total number of time slots and K represents the number of mobile users. represents the task utility of the kth user in the nth time period. Indicates high priority tasks, Represents a low priority task, represents the utility of high priority tasks, Indicates the utility of low-priority tasks; Is an indicator function. When the task is a high priority task, =1, =0; when the task is a low priority task, =0, =1;
[0043] In step S2, the first constraint, the second constraint, the third constraint and the fourth constraint are obtained according to the drone trajectory, computing power and task delay. The first constraint, the second constraint, the third constraint and the fourth constraint obtained in step S2 are used as the constraints in the optimization process of the drone's flight trajectory, task offloading ratio, computing power allocation and mobile user association, respectively.
[0044] In step S3, according to the above-mentioned first constraint, second constraint, third constraint and fourth constraint, with the goal of maximizing the output of the average system utility calculation model of the drone, the flight trajectory, task offloading ratio, computing power allocation and mobile user association of the drone are optimized respectively to obtain the optimal drone control strategy. The optimal drone control strategy obtained in step S3 includes the optimal flight trajectory, optimal task offloading ratio, optimal computing power allocation and optimal mobile user association of the drone. The drone control strategy includes the optimal flight trajectory, optimal task offloading ratio, optimal computing power allocation and optimal mobile user association of the drone.
[0045] In step S4, the obtained optimal UAV control strategy is used to control the UAV so that the UAV moves according to the optimal flight trajectory. During the flight, the mobile user unloads the task volume corresponding to the optimal task offloading ratio to the optimal UAV in each time slot. The UAV is allocated to the mobile user for local computing according to the optimal computing power, thereby improving the average system utility of the UAV.
[0046] In summary, the technical solution provided by the present application, after obtaining the average system utility calculation model of the UAV, takes the maximum output of the average system utility calculation model as the goal, optimizes the flight trajectory, task offloading ratio, computing power allocation and optimal mobile user association of the UAV, and obtains the optimal UAV control strategy. Since the technical solution of the present application is based on the optimization of the flight trajectory, task offloading ratio, computing power allocation and optimal mobile user association of the UAV as constraints, the average system utility of the UAV is improved by jointly optimizing multiple coupling variables. Therefore, compared with the prior art, it can improve the average system utility of the UAV when unloading tasks.
[0047] The above is a detailed introduction to the method for controlling a drone in the present application. The following is a detailed introduction to the utility function of a low-priority task when the lth drone communicates with the kth mobile user in the nth time slot and the task is unloaded in combination with a specific application scenario. It is understood that the following description of the method is exemplary rather than restrictive. The description of the function is also applicable to the following description of Introduction.
[0048] In this embodiment, the total time required to complete the task Compare with the maximum delay threshold to get the utility of high priority tasks , and the calculation formula used is:
[0049]
[0050] In the formula, Indicates the maximum allowed delay threshold, The total time required to complete the task on the lth UAV, represents a negative constant, represents an indicator function, when x is true, , when x is false, .
[0051] The total time required to complete the task on the lth UAV The calculation formula is:
[0052] ;
[0053] in:
[0054] is the total time for the kth mobile user on the lth UAV to complete the unloading task, and its calculation formula is:
[0055] ;
[0056] In the formula, is the transmission time from the kth mobile user to the lth UAV to offload the task, and its calculation formula is:
[0057] ;
[0058] In the formula, is the proportion of tasks that the kth mobile user offloads to the UAV during the nth time slot, The amount of data transmitted for the nth task of the kth mobile user, is the data transmission rate between the kth mobile user and the lth UAV in the nth time slot, and its calculation formula is:
[0059] ;
[0060] Where B represents the wireless bandwidth allocated to the lth UAV, is the signal-to-noise ratio of the kth mobile user in the nth time slot, and its calculation formula is:
[0061] ;
[0062] ;
[0063] In the formula, The calculation formula for the lth UAV to perform the task of offloading the kth mobile user is:
[0064] ;
[0065] In the formula, The number of CPU cycles required to complete the calculation, represents the computing power allocated by the lth UAV to the kth mobile user in the nth time slot;
[0066] The delay is calculated locally for the user, and the calculation formula is:
[0067] ;
[0068] in, is the computing power of the kth mobile user.
[0069] The utility function of the high priority task of this application is as follows: The calculation method of is introduced in detail. The utility function of the low-priority task of this application is described in detail below in combination with specific application scenarios. It is understood that the following description of the method is exemplary rather than restrictive. The description of the function is also applicable to the following description of Introduction.
[0070] In this embodiment, the total time required to complete the task The utility of the low priority task is obtained by comparing it with the maximum delay threshold, and the calculation formula used is:
[0071]
[0072] in, is a positive constant representing the reward for completing the task within the maximum delay threshold. is an exponential decay factor.
[0073] The utility function for low-priority tasks above A detailed explanation is given below, which combines specific application scenarios to explain the optimization of flight trajectory, task offloading ratio, computing power allocation and mobile user association.
[0074] In one embodiment, when optimizing the flight trajectory of a drone, the task offloading ratio, computing power allocation, and mobile user association of the drone in each time slot are first set to fixed values, and then the positions of the drones in each time slot are adjusted respectively to obtain the positions of the drones in each time slot when the output of the average system utility calculation model of the drone is maximized under the first constraint condition. Finally, the flight trajectory of the drone is obtained according to the position of the drone in each time slot, and the flight trajectory is used as the optimal flight trajectory of the drone.
[0075] Constraints:
[0076] The flight altitude of a drone has minimum and maximum limits. ;
[0077] The horizontal flight distance of the drone has a maximum value ;
[0078] The vertical flight distance of the drone has a maximum value ;
[0079] Ensure the drone moves horizontally within its defined rectangular service area, .
[0080] In one embodiment, when optimizing the drone task offloading ratio, the drone flight trajectory, computing power allocation and mobile user association in each time slot are first set to fixed values, and then the task offloading ratio of the drone in each time slot is adjusted respectively to obtain the task offloading ratio of the drone in each time slot when the output of the average system utility calculation model of the drone is maximized under the second constraint condition, thereby obtaining the optimal task offloading ratio of the drone.
[0081] Constraints: The task offloading ratio of each mobile user in each time slot must be between 0 and 1, i.e.
[0082] In one embodiment, when optimizing the computing power allocation of the drone, the flight trajectory, task offloading ratio and mobile user association of each time slot of the drone are first set to fixed values, and then the computing power allocation of the drone in each time slot is adjusted respectively to obtain the computing power allocation of the drone in each time slot when the output of the average system utility calculation model of the drone is maximized under the third constraint condition, thereby obtaining the optimal computing power allocation of the drone.
[0083] Constraints: The computing power allocated to each drone for mobile users The sum cannot exceed the computing power of the drone ,Right now .
[0084] In one embodiment, when optimizing the mobile user association, the flight trajectory, task offloading ratio and computing power allocation of the drone in each time slot are first set to fixed values, and then the mobile user association of each time slot is adjusted respectively to obtain the mobile user association of the drone in each time slot when the output of the average system utility calculation model of the drone is maximized under the fourth constraint condition, thereby obtaining the optimal mobile user association.
[0085] Constraints: ;
[0086] ;
[0087] in, is a binary variable, indicating whether the kth user equipment establishes a connection with the lth UAV for task offloading in the nth time slot; It means that the communication distance has the maximum value when the kth user and the lth drone establish a connection; is the maximum horizontal coverage radius of the lth UAV in the nth time slot, and .
[0088] Performance test data:
[0089] Compared with several existing advanced algorithms (including PPO, SAC and DDPG), the ISAC algorithm of the present invention has significant improvements in average system utility, offload transmission rate, task completion rate, etc. Specifically:
[0090] (1) In the analysis of the algorithm convergence performance, by adjusting hyperparameters such as learning rate, discount factor, momentum and batch size, the ISAC algorithm shows good convergence performance. For example, when the learning rate is 0.001, the loss curve of the algorithm can converge quickly;
[0091] (2) Under different bandwidth conditions, the unloaded transmission rate and task completion rate of the ISAC algorithm are better than those of the PPO, SAC and DDPG algorithms. In particular, when the bandwidth is 50MHz, the unloaded transmission rate of the ISAC algorithm no longer increases, indicating that the system has achieved the optimal performance under this bandwidth. Under different task sizes, the ISAC algorithm also shows superior performance, and the task completion rate is also higher than that of the PPO, SAC and DDPG algorithms;
[0092] (3) The performance of the four algorithms in terms of reward performance was compared. The ISAC algorithm introduces perturbation values to increase the possibility of exploration during training, thereby avoiding falling into local minima in non-convex optimization problems and showing stronger model generalization ability than SAC, PPO and DDPG;
[0093] In summary, the ISAC algorithm of the present invention is effective in improving the average system utility when unloading tasks of UAVs.
[0094] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for controlling a drone, characterized in that: include: S1. Obtain the system utility calculation model of the UAV; S2. According to the drone trajectory, computing power, and task delay, the first constraint, the second constraint, the third constraint, and the fourth constraint are obtained; wherein the first constraint is the constraint of the drone trajectory, including the horizontal angle, speed, and movement in space; the second constraint is the constraint of computing power; the third constraint is the constraint of the unloading ratio, which needs to be between 0 and 1; the fourth constraint is the user association constraint, and after completing the task, the drone needs to establish communication with the user and ensure the feasibility of the association state; S3, according to the first constraint condition, the second constraint condition, the third constraint condition and the fourth constraint condition, with the goal of maximizing the average system utility, respectively optimizing the flight trajectory, task offloading ratio, computing power allocation and mobile user association of the UAV to obtain an optimal UAV control strategy; S4. Using the optimal UAV control strategy to control the UAV.
2. A method for controlling a drone as claimed in claim 1, characterized in that: The system utility calculation model of the UAV is: ; ; Where N is the total number of time slots, K represents the number of mobile users; represents the task utility of the kth user in the nth time period; Indicates high priority tasks, Represents a low priority task, represents the utility of high priority tasks, Indicates the utility of low-priority tasks; Is an indicator function. When the task is a high priority task, =1, =0; when the task is a low priority task, =0, =1.
3. A method for controlling a drone as claimed in claim 2, characterized in that: The utility of the high priority tasks The calculation formula is: ; in, Indicates the maximum allowed delay threshold, The total time required to complete the mission on UAV I, represents a negative constant, represents an indicator function, when x is true, , when x is false, .
4. A method for controlling a drone as claimed in claim 2, characterized in that: The utility of the low priority tasks The calculation formula is: ; in, Indicates the maximum allowed delay threshold, The total time required to complete the task on the lth UAV, is an exponential decay function, is a positive constant representing the reward for completing the task within the maximum delay threshold. is an exponential decay factor.
5. A method for controlling a drone as claimed in claim 1, characterized in that: In step S3, optimizing the flight trajectory of the UAV according to the first constraint condition includes: Fixing the task offloading ratio, computing power allocation and mobile user association of the drone; Under the first constraint condition, the flight trajectory of the UAV is adjusted to obtain the flight trajectory of the UAV when the output of the average system utility calculation model is maximized, and the flight trajectory is used as the optimal flight trajectory of the UAV.
6. A method for controlling a drone as claimed in claim 1, characterized in that: In step S3, optimizing the task offloading ratio of the UAV according to the second constraint condition includes: Fixing the flight trajectory of the drone, the allocation of computing power and the association of mobile users; Under the second constraint condition, the task offloading ratio of the UAV is adjusted to obtain the task offloading ratio of the UAV when the output of the average system utility calculation model is maximized, and the task offloading ratio is used as the optimal task offloading ratio of the UAV.
7. A method for controlling a drone as claimed in claim 1, characterized in that: In step S3, optimizing the computing capacity allocation of the drone according to the third constraint condition includes: Fixing the flight trajectory, task offloading ratio and mobile user association of the UAV; Under the third constraint, the flight trajectory of the UAV is adjusted to obtain the computing power allocation of the UAV when the output of the average system utility calculation model is maximized, and the computing power allocation is used as the optimal computing power allocation of the UAV.
8. A method for controlling a drone as claimed in claim 1, characterized in that: In the step S3, optimizing the mobile user association according to the fourth constraint condition includes: Fixing the flight trajectory, task offloading ratio and computing power allocation of the UAV; Under the fourth constraint, the mobile user association is adjusted to obtain a mobile user association when the output of the average system utility calculation model is maximized, and the mobile user association is used as the optimal mobile user association.
9. A device for controlling a drone, characterized in that: include Memory for storing computer programs; A processor, configured to execute the computer program to implement the method for controlling a drone as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for controlling a drone as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method and device for controlling unmanned aerial vehicle, and readable storage medium
CN115237154A
Excitation calculation, task allocation and unmanned aerial vehicle position joint optimization method and system
CN116233869A
Task unloading method and system based on intelligent reflector node selection
CN117221322A
Unmanned aerial vehicle track planning and resource allocation method for communication calculation assisted radar imaging
CN117938226A
