A method, system, device and computer readable storage medium for controlling a UAV
Patent Information
- Application Number
- CN202611182138.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-23
AI Technical Summary
这种静态设定的方式难以适应复杂多变的动态环境以及任务需求的切换,导致控制性能下降,甚至出现系统失稳
[0016]本申请提供的一种无人机控制方法,获取无人机的实时状态数据、任务执行数据以及控制性能指标;基于实时状态数据、任务执行数据和控制性能指标,生成提示语序列;调用大语言模型对提示语序列进行处理,得到参数调整策略;按照参数调整策略,更新非线性模型预测控制控制器的代价函数参数,并生成新的控制指令;按照控制指令对无人机进行状态更新。本申请中,将无人机的实时状态数据、任务执行数据以及控制性能指标转换为提示语序列,调用大语言模型进行处理后生成参数调整策略,由于大语言模型的自然语言理解、逻辑推理与上下文学习能力强,所生成的参数调整策略的准确性高且与无人机当前任务相适配,这样对非线性模型预测控制控制器的代价函数参数进行更新,再对无人机进行更新的话,实现了根据无人机具体任务需求来对无人机状态进行准确更新,能够在线、自适应地响应无人机任务变化,达到对无人机进行自适应且准确控制的效果。本申请提供的一种无人机控制系统、电子设备及计算机可读存储介质也解决了相应技术问题。
Smart Images

Figure CN122963190A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of unmanned aerial vehicle (UAV) control and artificial intelligence technology, and more specifically, to a UAV control method, system, device, and computer-readable storage medium. Background Technology
[0002] With the development of UAV technology, multi-UAV systems are increasingly widely used in target tracking, environmental monitoring, and cooperative search. Nonlinear Model Prediction Control (NMPC) has become the mainstream method for high-performance UAV control because it can explicitly handle nonlinear dynamic constraints and multi-objective optimization problems. NMPC generates an optimal control sequence by solving a finite-time optimal control problem in each control cycle, and applies the first control variable in the sequence to the system.
[0003] However, existing NMPC control methods face difficulties in parameter tuning in practical applications. First, the control performance of NMPC is highly dependent on the settings of the state weight matrix Q, control weight matrix R, and prediction step size N in the cost function. These parameters typically rely on engineers' prior experience or are iteratively adjusted through offline simulations. This static setting approach struggles to adapt to complex and ever-changing dynamic environments and shifting task requirements, leading to decreased control performance and even system instability. Second, existing parameter optimization methods often employ mathematical optimization techniques such as exhaustive search, genetic algorithms, or grid search. These methods have high computational complexity and can usually only be performed offline, failing to meet the demands of online real-time control.
[0004] In conclusion, how to adaptively and accurately control drones is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a drone control method that can, to some extent, solve the technical problem of how to adaptively and stably control a drone. This application also provides a drone control system, electronic equipment, and a computer-readable storage medium.
[0006] To achieve the above objectives, this application provides the following technical solution: A method for controlling an unmanned aerial vehicle (UAV), comprising: Acquire real-time status data, mission execution data, and control performance indicators of the drone; Based on the real-time status data, the task execution data, and the control performance indicators, a sequence of prompts is generated. The prompt sequence is processed by a large language model to obtain a parameter adjustment strategy; According to the parameter adjustment strategy, update the cost function parameters of the nonlinear model predictive control controller and generate new control commands; Update the status of the UAV according to the control commands.
[0007] Preferably, the real-time status data, mission execution data, and control performance indicators of the UAV are acquired, including: Acquire real-time status data and mission execution data of the drone; Based on the real-time status data and the task execution data, the control performance indicators of the UAV are generated; The control performance indicators include trajectory tracking error, control jitter amplitude, convergence time, and target coverage completion.
[0008] Preferably, before generating the prompt sequence based on the real-time status data, the task execution data, and the control performance indicators, the method further includes: The control performance indicators are compared with preset thresholds; In response to the trajectory tracking error exceeding a preset first threshold, or the control jitter amplitude exceeding a preset second threshold, or the convergence time exceeding a preset third threshold, or the target coverage completion rate being lower than a preset fourth threshold, the step of generating a prompt sequence based on the real-time status data, the task execution data, and the control performance indicators is executed.
[0009] Preferably, according to the parameter adjustment strategy, the cost function parameters of the nonlinear model predictive control controller are updated, and new control commands are generated, including: According to the parameter adjustment strategy, update the cost function parameters of the nonlinear model predictive control controller; Construct a target cost function for a nonlinear model predictive control controller, the cost function including a task soft constraint cost term, which is used to penalize the spatial deviation between the UAV and the target area; Based on the updated cost function parameters, the target cost function is solved in reverse to generate new control commands.
[0010] Preferably, the prompt sequence is processed by a large language model to obtain a parameter adjustment strategy, including: Input the sequence of prompts into the large language model; The system receives the parameter adjustment results output by the large language model, which include the parameter adjustment strategy and the reasons for the adjustment.
[0011] Preferably, after updating the state of the UAV according to the control command, the method further includes: Generate parameter variation curves for the drone; Record the prompt sequence, the parameter adjustment results, the control performance indicators, and the parameter change curves.
[0012] Preferably, before invoking the large language model to process the prompt sequence, the method further includes: Generate a dynamic model of the drone; Optimization strategies for generating drones; Based on the dynamics model and the tuning strategy, the system context of the large language model is generated; Input the system context into the large language model; The optimization strategy includes: if the tracking error is large, increasing the position weight in the state weight matrix; if the control jitter is large, increasing the weight of the control weight matrix or decreasing the position weight; if the convergence is slow, increasing the prediction step size; if the overshoot is severe, decreasing the position weight and increasing the velocity weight in the control weight matrix.
[0013] A drone control system includes: The data acquisition module is used to acquire real-time status data, mission execution data, and control performance indicators of the UAV. The prompt generation module is used to generate a sequence of prompts based on the real-time status data, the task execution data, and the control performance indicators; The prompt processing module is used to call the large language model to process the prompt sequence and obtain the parameter adjustment strategy; The control command update module is used to adjust the strategy according to the parameters, update the cost function parameters of the nonlinear model predictive controller, and generate new control commands. The status update module is used to update the status of the UAV according to the control commands.
[0014] An electronic device, comprising: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of any of the above-described drone control methods.
[0015] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described unmanned aerial vehicle (UAV) control methods.
[0016] This application provides a UAV control method that acquires real-time UAV status data, task execution data, and control performance indicators; generates a prompt sequence based on the real-time status data, task execution data, and control performance indicators; processes the prompt sequence using a large language model to obtain a parameter adjustment strategy; updates the cost function parameters of the nonlinear model predictive controller according to the parameter adjustment strategy and generates new control commands; and updates the UAV's status according to the control commands. In this application, the real-time status data, task execution data, and control performance indicators of the UAV are converted into a prompt sequence, processed by a large language model to generate a parameter adjustment strategy. Because the large language model has strong natural language understanding, logical reasoning, and context learning capabilities, the generated parameter adjustment strategy is highly accurate and adapted to the UAV's current task. By updating the cost function parameters of the nonlinear model predictive controller and then updating the UAV, the method achieves accurate UAV status updates based on specific task requirements, enabling online and adaptive responses to changes in the UAV's task, achieving adaptive and accurate control of the UAV. This application also provides a UAV control system, electronic device, and computer-readable storage medium that solves the corresponding technical problems. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 A flowchart of a drone control method provided in this application embodiment; Figure 2 This is the parameter tuning evolution diagram of the parameter matrices Q, R, and N under the first case with LLM parameter tuning; Figure 3 This is a comparison curve of the convergence of the average orbital error between the two cases with and without LLM parameter tuning in the first case. Figure 4 This is the trajectory diagram under the first case with fixed parameters; Figure 5 The trajectory diagram is shown for the first case of LLM adaptive parameter tuning. Figure 6 This is the parameter tuning evolution diagram of the parameter matrices Q, R, and N under the second case with LLM parameter tuning; Figure 7 This is a comparison curve of the convergence of the average orbital error between the two cases with and without LLM parameter tuning in the second case. Figure 8 This is the trajectory diagram under the fixed parameters in the second case; Figure 9 This is the trajectory diagram for the second case of LLM adaptive parameter tuning; Figure 10 This is the parameter tuning evolution diagram of the parameter matrices Q, R, and N under the third case with LLM parameter tuning; Figure 11 This is a comparison curve of the convergence of the average orbital error between the two cases with and without LLM parameter tuning in the third case. Figure 12 This is the trajectory diagram under the fixed parameters in the third case; Figure 13 This is the trajectory diagram for the third case of LLM adaptive parameter tuning; Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 15 This is another structural schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] 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.
[0020] Please see Figure 1 , Figure 1 A flowchart of a drone control method provided in an embodiment of this application.
[0021] This application provides a drone control method that may include the following steps: Step S101: Obtain real-time status data, mission execution data, and control performance indicators of the UAV.
[0022] In practical applications, when controlling drones, it is often necessary to control the drone to perform specific tasks, such as controlling the drone to perform specific tasks like circling around a point. When the drone fails to perform the task, it is necessary to adjust the drone. Therefore, it is necessary to first obtain the drone's real-time status data, task execution data, and control performance indicators to provide a data foundation for subsequent drone control.
[0023] It should be noted that the drone's status data can be... , Indicates the location of the drone. Indicates the heading angle of the drone. Indicates the speed of the drone. Indicates the angular velocity of the drone, superscript This indicates transposition. Task execution data may include the reference trajectory points that the UAV should currently track, the target area location, etc. Control performance indicators are used to characterize the current control effect of the UAV, and their types can be flexibly determined according to the application scenario.
[0024] In an exemplary embodiment, the control performance indicators can be flexibly set according to the control requirements of the UAV, and can be generated based on real-time status data and task execution data. For example, in the process of acquiring the UAV's real-time status data, task execution data, and control performance indicators, the UAV's real-time status data and task execution data can be acquired; based on the real-time status data and task execution data, the UAV's control performance indicators are generated; wherein, the control performance indicators include trajectory tracking error, control jitter amplitude, convergence time, and target coverage completion.
[0025] Understandably, there are times when drone control is unnecessary, and in such cases, control can be skipped. To address this need and reduce drone control overhead, before generating a prompt sequence based on real-time status data, task execution data, and control performance indicators, a comparison can be made between the control performance indicators and preset thresholds. These preset thresholds can be flexibly set. In response to situations where the trajectory tracking error exceeds a preset first threshold, the control jitter amplitude exceeds a preset second threshold, the convergence time exceeds a preset third threshold, or the target coverage completion is lower than a preset fourth threshold, the step of generating a prompt sequence based on real-time status data, task execution data, and control performance indicators is executed. Otherwise, the drone can be controlled again according to this scheme after a period of time. Furthermore, the comparison of control performance indicators and preset thresholds can be performed at fixed time intervals. This ensures that the drone can only be controlled at specific times and when the comparison results are met, further reducing control overhead.
[0026] Step S102: Generate a sequence of prompts based on real-time status data, task execution data, and control performance indicators.
[0027] Step S103: Call the large language model to process the prompt sequence and obtain the parameter adjustment strategy.
[0028] In practical applications, real-time status data and task execution data reflect the deviation of the UAV in performing its tasks, while control performance indicators reflect the current control effect of the UAV. These parameters can all help adjust the UAV. Based on this, a prompt sequence that can be processed by a Large Language Model (LLM) can be generated based on real-time status data, task execution data, and control performance indicators. The type of LLM can be flexibly set. Then, the LLM is called to process the prompt sequence to utilize its natural language understanding and reasoning capabilities to output parameter adjustment strategies. During this process, considering the control requirements of the UAV, the LLM can be set to generate corresponding parameter adjustment strategies based on the balance between tracking accuracy, control smoothness, and convergence speed.
[0029] It should be noted that in the process of controlling the UAV through nonlinear model predictive control, the nonlinear model predictive control relies on the state weight matrix Q, the control weight matrix R, and the prediction step size N. The state weight matrix Q can include... x Weight, y Weights, heading angle weights, velocity weights, and angular velocity weights, ( x , y Position weights affect trajectory tracking accuracy; larger values result in more accurate tracking but may lead to overshoot. Heading angle weights affect directional control response speed, while velocity and angular velocity weights affect dynamic response smoothness. The control weight matrix R can include linear velocity control weights and angular velocity control weights; smaller values result in more aggressive control, while larger values result in smoother control. The prediction step size N balances computational complexity and predictive capability, and its value can be constrained, for example, between 5 and 15. Based on this, the parameter adjustment strategy generated by the large language model can include the state weight matrix Q, the control weight matrix R, and the adjusted prediction step size N. Furthermore, during multiple adjustments using the large language model, the parameter adjustment strategy can be generated by integrating the large language model's prompt sequence, historical state information, and error feedback.
[0030] In an exemplary embodiment, to make the parameter adjustment strategy output by the large language model convincing, the large language model can be required to output corresponding adjustment reasons. That is, during the process of calling the large language model to process the prompt sequence and obtain the parameter adjustment strategy, the prompt sequence can be input into the large language model; the parameter adjustment result output by the large language model can be received. The parameter adjustment result includes the parameter adjustment strategy and the adjustment reason, and the format of the parameter adjustment result can be JSON format, etc., to facilitate subsequent applications. For example, the parameter adjustment result is {{"Q":[5 positive numbers],"R":[2 positive numbers],"N":integer,"reasoning":"parameter adjustment reason and analysis","adjustment":"specific adjustment strategy"}}.
[0031] In an exemplary embodiment, if knowledge is instilled into the large language model, the reasoning accuracy and efficiency of the large language model can be improved to a certain extent. Based on this, before calling the large language model to process the prompt sequence, a dynamic model of the UAV can also be generated. The dynamic model of the UAV includes state variables, control inputs, constraints, control objectives, etc., and the state variables can be... The control input can be either velocity control or angular velocity control, and the constraints can be... v ∈[0, 3]m / s and ω ∈[-1, 1] rad / s, the control target can be a circular motion reference trajectory with a tracking radius of 2.5m, etc.; generate the UAV tuning strategy, which includes: if the tracking error is large, increase the position weight in the state weight matrix; if the control jitter is large, increase the weight of the control weight matrix or decrease the position weight; if the convergence is slow, increase the prediction step size; if the overshoot is serious, decrease the position weight and increase the velocity weight in the control weight matrix, etc.; generate the system context of the large language model based on the dynamic model and the tuning strategy; input the system context into the large language model. Of course, role prompts can also be added to the system context, such as the role prompt "You are a nonlinear model predictive control (NMPC) expert, specializing in online parameter tuning for UAV systems", to further instill the domain expert's knowledge into the large language model, so that the large language model reasoning has correct prior guidance.
[0032] Step S104: According to the parameter adjustment strategy, update the cost function parameters of the nonlinear model predictive control controller and generate new control commands.
[0033] Step S105: Update the status of the UAV according to the control instructions.
[0034] In practical applications, after obtaining the parameter adjustment strategy, the cost function parameters of the nonlinear model predictive controller can be updated according to the parameter adjustment strategy, and new control commands can be generated. In this way, the state of the UAV can be updated according to the control commands, and adaptive control of the UAV can be achieved.
[0035] To facilitate understanding of the Nonlinear Model Predictive Control (NMPC) controller, we will first describe its design. The state-space model of the NMPC controller can be considered as the control law design on a two-dimensional horizontal plane, with the corresponding m UAV kinematic models as follows: ; Here, represents the updated status of the drone; , where is the control input for speed and yaw rate, and based on the UAV kinematic model, the following speed control and yaw rate control constraints exist: , , The nominal speed of the drone, as well as These represent the maximum range of variation for speed and yaw rate, respectively.
[0036] In the design of the target cost function of the NMPC controller, a task soft constraint cost term can be constructed based on the spatial deviation between the UAV and the target area. This term penalizes the spatial deviation to guide the UAV to maintain continuous coverage of the target area while completing target trajectory tracking, thus achieving multi-target fusion of trajectory control and area coverage control. Assuming the current task of multiple UAVs is circling around a point, the task soft constraint cost term... It can be represented as , Indicates the number of drones, Indicates the first k The location of the drone. Indicates the position of the center of the circle. This indicates the coverage area. Based on this, a second cost function can be constructed according to the nonlinear UAV model's tracking of the reference point's trajectory and the minimization of control energy. , , This indicates the actual trajectory of the drone; This indicates the target trajectory that the drone needs to achieve, in order to r Taking the uniform circular motion trajectory around the radius as an example It can be represented as , , t Indicates time, Represents the coordinates of the center of the circle. This represents the angular velocity about the center of the circle. express middle t The position at that moment; Represents the k-th drone Furthermore, the constraints of the UAV dynamics model and input limitations can be used as penalty terms to construct the third part of the cost function. , , Indicates the first k A drone , Indicates the first k+ 1 drone , Indicates the first k A drone , Indicates the first k A drone , Indicates the first k A drone The final objective cost function of the NMPC controller is then... It can be represented as .
[0037] Therefore, in the process of updating the cost function parameters of the nonlinear model predictive control controller according to the parameter adjustment strategy and generating new control commands, the cost function parameters of the nonlinear model predictive control controller can be updated according to the parameter adjustment strategy; the target cost function of the nonlinear model predictive control controller can be constructed, and the cost function includes a task soft constraint cost term, which is used to penalize the spatial deviation between the UAV and the target area; based on the updated cost function parameters, the target cost function is solved in reverse to generate new control commands. , Subsequently, by inputting the control commands into the dynamic model of the aforementioned NMPC controller, the state variables of the multiple UAVs can be obtained.
[0038] In an exemplary embodiment, after updating the drone's status according to control commands, parameter change curves of the drone can also be generated; the prompt sequence, parameter adjustment results, control performance indicators, and parameter change curves can be recorded. This allows for visualization and traceability of the recorded prompt sequence, parameter adjustment results, control performance indicators, and parameter change curves as needed, improving the transparency and interpretability of drone control and facilitating operation, maintenance, and optimization.
[0039] This application provides a method for controlling a drone, which involves acquiring real-time status data, task execution data, and control performance indicators of the drone; generating a sequence of prompts based on the real-time status data, task execution data, and control performance indicators; processing the prompt sequence using a large language model to obtain a parameter adjustment strategy; updating the cost function parameters of the nonlinear model predictive controller according to the parameter adjustment strategy and generating new control commands; and updating the drone's state according to the control commands. In this application, the real-time status data, task execution data, and control performance indicators of the drone are converted into a sequence of prompts, which are then processed by a large language model to generate a parameter adjustment strategy. Because the large language model has strong natural language understanding, logical reasoning, and context learning capabilities, the generated parameter adjustment strategy is highly accurate and adapted to the drone's current task. By updating the cost function parameters of the nonlinear model predictive controller and then updating the drone, the method achieves accurate updates to the drone's state based on the specific task requirements, enabling online and adaptive responses to changes in the drone's task, and achieving adaptive and accurate control of the drone.
[0040] To facilitate understanding of the effectiveness of the UAV control scheme provided in this application, let's assume three UAVs are performing a task of moving in uniform circular motion around a target. According to the scheme, in each control cycle, each UAV first acquires its current position and the corresponding target position. Then, it calls the NMPC controller to generate an optimal control input sequence based on the current position, target position, and system constraints. The control command for the current moment is extracted from this optimal control input sequence, and the UAV's state variables are updated to achieve trajectory evolution. Finally, when the UAV successfully reaches the task coverage area, it automatically switches to uniform circular motion around the target to maintain continuous coverage and tracking of the target area. This process is illustrated using matplotlib, and the results are as follows.
[0041] In the first case, with the default parameter matrix Q being [10, 100, 0.1, 10, 8], R being [5, 0.1], and N being 5, the parameter matrix evolution of Q, R, and N under LLM tuning is as follows: Figure 2 As shown, the convergence curves of the average orbital error with and without LLM parameter tuning are as follows: Figure 3 As shown, the trajectory under fixed parameters is as follows: Figure 4 As shown, the trajectory under LLM adaptive parameter tuning is as follows: Figure 5 As shown.
[0042] In the second case, with the default parameter matrix Q being [10, 100, 0.1, 10, 8], R being [50, 0.1], and N being 5, the parameter matrix evolution of Q, R, and N under LLM tuning is as follows: Figure 6 As shown, the convergence curves of the average orbital error with and without LLM parameter tuning are as follows: Figure 7 As shown, the trajectory under fixed parameters is as follows: Figure 8 As shown, the trajectory under LLM adaptive parameter tuning is as follows: Figure 9 As shown.
[0043] In the third case, with the default parameter matrix Q being [5, 5, 0.1, 0.1, 0.2], R being [5, 0.1], and N being 10, the parameter matrix evolution of Q, R, and N under LLM tuning is as follows: Figure 10 As shown, the convergence curves of the average orbital error with and without LLM parameter tuning are as follows: Figure 11 As shown, the trajectory under fixed parameters is as follows: Figure 12 As shown, the trajectory under LLM adaptive parameter tuning is as follows: Figure 13 As shown.
[0044] After analyzing the above three situations, it can be seen that the NMPC controller based on LLM adaptive parameter adjustment in this application exhibits relatively stable control performance in the target trajectory tracking task. In contrast, the tracking strategy designed solely based on human experience may result in the three UAVs failing to track the target trajectory due to the specified parameters, and its stability is difficult to guarantee.
[0045] Based on the above embodiments, this application provides a drone control system, which may include: The data acquisition module 101 is used to acquire real-time status data, mission execution data, and control performance indicators of the UAV. The prompt generation module 102 is used to generate a sequence of prompts based on real-time status data, task execution data, and control performance indicators. The prompt processing module 103 is used to call the large language model to process the prompt sequence and obtain the parameter adjustment strategy; The control command update module 104 is used to update the cost function parameters of the nonlinear model predictive controller according to the parameter adjustment strategy and generate new control commands. The status update module 105 is used to update the status of the UAV according to the control commands.
[0046] This application provides an embodiment of a drone control system, in which the data acquisition module may include: The UAV data acquisition unit is used to acquire real-time status data and mission execution data of the UAV. The performance index generation unit is used to generate control performance indexes for the UAV based on real-time status data and task execution data. The control performance indicators include trajectory tracking error, control jitter amplitude, convergence time, and target coverage completion.
[0047] The unmanned aerial vehicle (UAV) control system provided in this application embodiment may further include: The detection module is used to compare the control performance indicators with preset thresholds before the prompt generation module generates the prompt sequence based on real-time status data, task execution data, and control performance indicators. In response to the trajectory tracking error exceeding the preset first threshold, or the control jitter amplitude exceeding the preset second threshold, or the convergence time exceeding the preset third threshold, or the target coverage completion rate being lower than the preset fourth threshold, the step of generating the prompt sequence based on real-time status data, task execution data, and control performance indicators is executed.
[0048] This application provides an embodiment of a drone control system, wherein the control command update module may include: The parameter update unit is used to update the cost function parameters of the nonlinear model predictive control controller according to the parameter adjustment strategy. The function building unit is used to construct the target cost function of the nonlinear model predictive control controller. The cost function includes a task soft constraint cost term, which is used to penalize the spatial deviation between the UAV and the target area. The instruction generation unit is used to solve the target cost function in reverse based on the updated cost function parameters and generate new control instructions.
[0049] This application provides an embodiment of a drone control system, wherein the prompt processing module may include: The prompt processing unit is used to input the prompt sequence into the large language model; and to receive the parameter adjustment results output by the large language model, which include the parameter adjustment strategy and the reason for the adjustment.
[0050] The unmanned aerial vehicle (UAV) control system provided in this application embodiment may further include: The curve generation unit is used to generate parameter change curves of the UAV after the state update module updates the state of the UAV according to the control commands. The recording unit is used to record the prompt sequence, parameter adjustment results, control performance indicators, and parameter change curves.
[0051] The unmanned aerial vehicle (UAV) control system provided in this application embodiment may further include: The dynamic model generation module is used to generate a dynamic model of the UAV before the prompt processing module calls the large language model to process the prompt sequence; The optimization strategy generation module is used to generate optimization strategies for UAVs. The context update module is used to generate the system context of the large language model based on the dynamics model and tuning strategy; and input the system context into the large language model. The optimization strategies include: if the tracking error is large, increase the position weight in the state weight matrix; if the control jitter is large, increase the weight of the control weight matrix or decrease the position weight; if the convergence is slow, increase the prediction step size; if the overshoot is severe, decrease the position weight and increase the velocity weight in the control weight matrix.
[0052] This application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the drone control method provided in the embodiments of this application. Please refer to... Figure 14 , Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0053] An electronic device provided in this application includes a memory 201 and a processor 202. The memory 201 stores a computer program, and the processor 202 executes the computer program to implement the steps of the unmanned aerial vehicle control method described in any of the above embodiments.
[0054] Please see Figure 15 Another electronic device provided in this application embodiment may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the electronic device and the outside. The display unit 204 may be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes, but is not limited to, Mobile High-Definition Link (MHL), Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), wireless connection: Wireless Fidelity (WiFi), Bluetooth communication technology, Bluetooth Low Energy communication technology, and communication technology based on IEEE 802.11s.
[0055] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the unmanned aerial vehicle control method described in any of the above embodiments.
[0056] The computer-readable storage media involved in this application include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (compact disc read-only memory), or any other form of storage media known in the art.
[0057] This application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the unmanned aerial vehicle control method described in any of the above embodiments.
[0058] For descriptions of relevant parts of the UAV control system, electronic device, and computer-readable storage medium provided in this application's embodiments, please refer to the detailed descriptions of the corresponding parts in the UAV control method provided in this application's embodiments; they will not be repeated here. Furthermore, parts of the technical solutions provided in this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0059] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0060] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for controlling an unmanned aerial vehicle (UAV), characterized in that, include: Acquire real-time status data, mission execution data, and control performance indicators of the drone; Based on the real-time status data, the task execution data, and the control performance indicators, a sequence of prompts is generated. The prompt sequence is processed by a large language model to obtain a parameter adjustment strategy; According to the parameter adjustment strategy, update the cost function parameters of the nonlinear model predictive control controller and generate new control commands; Update the status of the UAV according to the control commands.
2. The method according to claim 1, characterized in that, Acquire real-time status data, mission execution data, and control performance metrics of the drone, including: Acquire real-time status data and mission execution data of the drone; Based on the real-time status data and the task execution data, the control performance indicators of the UAV are generated; The control performance indicators include trajectory tracking error, control jitter amplitude, convergence time, and target coverage completion.
3. The method according to claim 2, characterized in that, Before generating the prompt sequence based on the real-time status data, the task execution data, and the control performance indicators, the process further includes: The control performance indicators are compared with preset thresholds; In response to the trajectory tracking error exceeding a preset first threshold, or the control jitter amplitude exceeding a preset second threshold, or the convergence time exceeding a preset third threshold, or the target coverage completion rate being lower than a preset fourth threshold, the step of generating a prompt sequence based on the real-time status data, the task execution data, and the control performance indicators is executed.
4. The method according to claim 1, characterized in that, According to the parameter adjustment strategy, the cost function parameters of the nonlinear model predictive control controller are updated, and new control commands are generated, including: According to the parameter adjustment strategy, update the cost function parameters of the nonlinear model predictive control controller; Construct a target cost function for a nonlinear model predictive control controller, the cost function including a task soft constraint cost term, which is used to penalize the spatial deviation between the UAV and the target area; Based on the updated cost function parameters, the target cost function is solved in reverse to generate new control commands.
5. The method according to claim 1, characterized in that, The prompt sequence is processed by a large language model to obtain a parameter adjustment strategy, including: Input the sequence of prompts into the large language model; The system receives the parameter adjustment results output by the large language model, which include the parameter adjustment strategy and the reasons for the adjustment.
6. The method according to claim 5, characterized in that, After updating the drone's status according to the control commands, the process also includes: Generate parameter variation curves for the drone; Record the prompt sequence, the parameter adjustment results, the control performance indicators, and the parameter change curves.
7. The method according to claim 1, characterized in that, Before invoking the large language model to process the prompt sequence, the process also includes: Generate a dynamic model of the drone; Optimization strategies for generating drones; Based on the dynamics model and the tuning strategy, the system context of the large language model is generated; Input the system context into the large language model; The optimization strategy includes: if the tracking error is large, increasing the position weight in the state weight matrix; if the control jitter is large, increasing the weight of the control weight matrix or decreasing the position weight; if the convergence is slow, increasing the prediction step size; if the overshoot is severe, decreasing the position weight and increasing the velocity weight in the control weight matrix.
8. A drone control system, characterized in that, include: The data acquisition module is used to acquire real-time status data, mission execution data, and control performance indicators of the UAV. The prompt generation module is used to generate a sequence of prompts based on the real-time status data, the task execution data, and the control performance indicators; The prompt processing module is used to call the large language model to process the prompt sequence and obtain the parameter adjustment strategy; The control command update module is used to adjust the strategy according to the parameters, update the cost function parameters of the nonlinear model predictive controller, and generate new control commands. The status update module is used to update the status of the UAV according to the control commands.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the unmanned aerial vehicle control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the unmanned aerial vehicle control method as described in any one of claims 1 to 7.
