A method and device for controlling a UAV for multi-scene inspection and emergency management

CN122816237APending Publication Date: 2026-09-25LIAONING UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610992368.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0004]本发明解决的问题是如何提高无人机在复杂环境中的控制精度

Benefits of technology

[0017]第四方面,本发明提供了一种计算机可读存储介质,所述存储介质上存储有计算机程序,当所述计算机程序被处理器执行时,实现如第一方面所述的面向多场景巡检与应急管理的无人机控制方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122816237A_ABST
    Figure CN122816237A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of unmanned aerial vehicle, provide a kind of unmanned aerial vehicle control method and device for multi-scene inspection and emergency management.It is difficult for unmanned aerial vehicle attitude control precision and complex environment anti-interference ability in the pain point of conventional inspection and emergency disposal scene, the angle-angle velocity double-loop closed-loop control architecture is used in this method, first according to the difference between actual attitude angle and expected angle to obtain angle error and error rate, angle control parameters are adaptively set by fuzzy rule, and expected angular velocity is derived by combining angular velocity relationship and inner loop repetitive control mechanism;According to the difference between actual angular velocity and expected angular velocity, angular velocity error and error rate are obtained, angular velocity control parameters are set by fuzzy rule, and motor control signal is generated by combining control relationship and outer loop repetitive control mechanism.The present application effectively improves the attitude control precision and anti-interference performance of unmanned aerial vehicle, guarantees the flight stability and execution reliability of multi-scene inspection operation and emergency management task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) technology, and more specifically, to a UAV control method and device for multi-scenario inspection and emergency management. Background Technology

[0002] With the rapid development of technology, drones, with their advantages of high efficiency, flexibility, wide field of vision, and operational safety, have been widely used in fields such as power line inspection, oil and gas pipeline inspection, and bridge and tunnel inspection. In emergency management scenarios such as forest fire monitoring, earthquake rescue, and flood disaster investigation, drones can quickly reach dangerous areas and transmit on-site data in real time, significantly improving the efficiency of emergency response and the scientific nature of decision-making.

[0003] However, most existing UAV control methods use preset fixed parameters, which can only achieve stable control in specific environments. When faced with complex and ever-changing terrain, strong electromagnetic interference, and sudden changes in airflow and obstacles at emergency sites, traditional control methods are not adaptable enough and cannot guarantee control accuracy. Summary of the Invention

[0004] The problem addressed by this invention is how to improve the control accuracy of unmanned aerial vehicles (UAVs) in complex environments.

[0005] To address the aforementioned issues, this invention provides a drone control method and apparatus for multi-scenario inspection and emergency management.

[0006] In a first aspect, the present invention provides a drone control method for multi-scenario inspection and emergency management, comprising: The current attitude angle and the desired angle of the UAV are obtained, and the difference between the attitude angle and the desired angle is determined as the angle error. The derivative of the angle error is used to obtain the corresponding angle error change rate. Based on a preset angle fuzzy rule, angle control parameters are determined according to the angle error and the angle error change rate, wherein the angle control parameters include angle proportional parameters, angle integral parameters and angle differential parameters; Based on the angle error and the angle control parameters, an initial desired angular velocity is obtained through a preset angular velocity relationship, and the desired angular velocity is obtained through a preset inner loop repetitive control relationship based on the initial desired angular velocity. Based on the current angular velocity of the UAV and the desired angular velocity, the difference between the angular velocity and the desired angular velocity is determined as the angular velocity error, and the derivative of the angular velocity error is used to obtain the corresponding rate of change of the angular velocity error. Based on a preset angular velocity fuzzy rule, angular velocity control parameters are determined according to the angular velocity error and the rate of change of the angular velocity error. The angular velocity control parameters include angular velocity proportional parameters, angular velocity integral parameters, and angular velocity differential parameters. Based on the angular velocity error and the angular velocity control parameters, the initial control signal of the UAV's motor is obtained through a preset control relationship, and the control signal of the motor is obtained through a preset outer loop repetitive control relationship based on the initial control signal.

[0007] Optionally, the process of constructing the angle fuzziness rule includes: Obtain a preset initial angle fuzzy subset, wherein the initial angle fuzzy subset includes an initial angle proportional fuzzy subset, an initial angle integral fuzzy subset, and an initial angle differential fuzzy subset; Based on a preset angle input domain, the initial angle ratio fuzzy subset is optimized to obtain an angle ratio fuzzy subset, and angle ratio fuzzy rules are constructed based on the angle ratio fuzzy subset. Based on the angle input domain, the initial angle integral fuzzy subset is optimized to obtain an angle integral fuzzy subset, and angle integral fuzzy rules are constructed based on the angle integral fuzzy subset; Based on the angle input universe of discourse, the initial angle differential fuzzy subset is optimized to obtain an angle differential fuzzy subset. Angle differential fuzzy rules are constructed based on the angle differential fuzzy subset. The angle input universe of discourse includes the value ranges of the angle proportional fuzzy subset, the angle integral fuzzy subset, and the angle differential fuzzy subset. The angle fuzzy rules include the angle proportional fuzzy rule, the angle integral fuzzy rule, and the angle differential fuzzy rule.

[0008] Optionally, determining the angle control parameters based on the angle error and the rate of change of the angle error includes: Based on the angle error and the angle error change rate, the initial angle ratio parameter is determined by the angle ratio fuzzy rule, and the initial angle ratio parameter is optimized by the preset angle output domain to obtain the optimized initial angle ratio parameter. Based on the angle error and the rate of change of the angle error, the initial angle integration parameters are determined by the angle integration fuzzy rule, and the initial angle integration parameters are optimized by the angle output universe of discourse to obtain the optimized initial angle integration parameters. Based on the angle error and the angle error change rate, the initial angle differential parameters are determined by the angle differential fuzzy rule, and the initial angle differential parameters are optimized by the angle output universe of discourse to obtain optimized initial angle differential parameters. The angle output universe of discourse includes the optimized initial angle scaling parameter, the optimized initial angle integral parameter, and the value range of the optimized initial angle differential parameter. The optimized initial angle proportional parameter, the optimized initial angle integral parameter, and the optimized initial angle differential parameter are optimized using a preset outer ring particle swarm optimization algorithm to obtain the angle proportional parameter, the angle integral parameter, and the angle differential parameter.

[0009] Optionally, the angular velocity relationship satisfies: ; Where u1 is the initial desired angular velocity, e n e represents the current angle error of the UAV. n-1 The angle error of the UAV in the previous sampling period is T1, where T1 is the angle sampling period, n is the current angle sampling period, and e is the angle error in the previous sampling period. i For the i-th angle, the periodic angle error is used, K 1P K is the angle ratio parameter. 1I K is the angle integration parameter. 1D Let be the differential parameter of the angle.

[0010] Optionally, the inner loop repetitive control relationship satisfies: ; Wherein, U1 is the desired angular velocity, u1 is the initial desired angular velocity, A1 is the inner loop transfer function, W1 is the inner loop compensator, F1 is the inner loop feedback signal, and Q1 is the inner loop low-pass filter. For the inner loop delay link, N is the number of times the inner loop output signal is sampled.

[0011] Optionally, the process of constructing the angular velocity fuzzy rule includes: Obtain a preset initial angular velocity fuzzy subset, wherein the initial angular velocity fuzzy subset includes an initial angular velocity proportional fuzzy subset, an initial angular velocity integral fuzzy subset, and an initial angular velocity differential fuzzy subset; Based on the preset angular velocity input domain, the initial angular velocity ratio fuzzy subset is optimized to obtain an angular velocity ratio fuzzy subset, and angular velocity ratio fuzzy rules are constructed based on the angular velocity ratio fuzzy subset. Based on the angular velocity input domain, the initial angular velocity integral fuzzy subset is optimized to obtain an angular velocity integral fuzzy subset, and angular velocity integral fuzzy rules are constructed based on the angular velocity integral fuzzy subset; Based on the angular velocity input universe of discourse, the initial angular velocity differential fuzzy subset is optimized to obtain an angular velocity differential fuzzy subset. Angular velocity differential fuzzy rules are constructed based on the angular velocity differential fuzzy subset. The angular velocity input universe of discourse includes the value ranges of the angular velocity proportional fuzzy subset, the angular velocity integral fuzzy subset, and the angular velocity differential fuzzy subset. The angular velocity fuzzy rules include the angular velocity proportional fuzzy rule, the angular velocity integral fuzzy rule, and the angular velocity differential fuzzy rule.

[0012] Optionally, determining the angular velocity control parameters based on the angular velocity error and the rate of change of the angular velocity error includes: Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity ratio parameter is determined by the angular velocity ratio fuzzy rule, and the initial angular velocity ratio parameter is optimized by the preset angular velocity output domain to obtain the optimized initial angular velocity ratio parameter. Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity integral parameters are determined by the angular velocity integral fuzzy rule, and the optimized initial angular velocity integral parameters are obtained by optimizing the initial angular velocity integral parameters through the angular velocity output universe of discourse; Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity differential parameters are determined by the angular velocity differential fuzzy rule, and the initial angular velocity differential parameters are optimized by the angular velocity output universe of discourse to obtain optimized initial angular velocity differential parameters. The angular velocity output universe of discourse includes the optimized initial angular velocity proportional parameter, the optimized initial angular velocity integral, and the value range of the optimized initial angular velocity differential parameters. The optimized initial angular velocity proportional parameter, the optimized initial angular velocity integral parameter, and the optimized initial angular velocity differential parameter are optimized by a preset inner-loop particle swarm optimization algorithm to obtain the angular velocity proportional parameter, the angular velocity integral parameter, and the angular velocity differential parameter.

[0013] Optionally, the angular velocity relationship satisfies: ; Where u2 is the initial control signal, h m h represents the current angular velocity error of the UAV. m-1 The angular velocity error of the UAV in the previous sampling period is given by T2, where T2 is the angular velocity sampling period, m is the current angular velocity sampling period, and h is the angular velocity sampling period. f For the f-th angular velocity, the periodic angular velocity error, K 2P K is the proportional parameter of the angular velocity. 2I K is the integral parameter of the angular velocity. 2DLet be the differential parameter of the angular velocity.

[0014] Optionally, the repetition control relationship satisfies: ; Wherein, U2 is the control signal, u2 is the initial control signal, A2 is the outer loop transfer function, W2 is the outer loop compensator, F2 is the outer loop feedback signal, and Q2 is the outer loop low-pass filter. For the outer loop delay link, M is the number of times the outer loop output signal is sampled.

[0015] Secondly, the present invention provides a drone control device for multi-scenario inspection and emergency management, comprising: The outer loop comparison module is used to obtain the current attitude angle and the desired angle of the UAV, and to determine the difference between the attitude angle and the desired angle as the angle error. The derivative of the angle error is used to obtain the corresponding angle error change rate. The outer loop control module is used to determine angle control parameters based on the preset angle fuzzy rules, according to the angle error and the angle error change rate, wherein the angle control parameters include angle proportional parameters, angle integral parameters and angle differential parameters; The outer loop processing module is used to obtain an initial desired angular velocity based on the angle error and the angle control parameters through a preset angular velocity relationship; and to obtain the desired angular velocity based on the initial desired angular velocity through a preset inner loop repetition control relationship. The inner loop comparison module is used to determine the difference between the current angular velocity and the desired angular velocity of the UAV as the angular velocity error, and to obtain the corresponding rate of change of angular velocity error by differentiating the angular velocity error. The inner loop control module is used to determine angular velocity control parameters based on the preset angular velocity fuzzy rules, according to the angular velocity error and the rate of change of the angular velocity error, wherein the angular velocity control parameters include angular velocity proportional parameters, angular velocity integral parameters and angular velocity differential parameters; The inner loop processing module is used to obtain the initial control signal of the UAV's motor through a preset control relationship based on the angular velocity error and the angular velocity control parameters; and to obtain the control signal of the motor through a preset outer loop repeating control relationship based on the initial control signal.

[0016] Thirdly, the present invention provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor, when executing the computer program, implements the UAV control method for multi-scenario inspection and emergency management as described in the first aspect.

[0017] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the UAV control method for multi-scenario inspection and emergency management as described in the first aspect.

[0018] The beneficial effects of the UAV control method and device for multi-scenario inspection and emergency management of the present invention are as follows: By obtaining the difference between the attitude angle and the desired angle, an accurate angle error can be obtained. The derivative of this angle error is then used to obtain the corresponding angle error change rate. Based on the angle error and the angle error change rate, a pre-set angle fuzzy rule is used to match the corresponding angle control parameters. This allows the obtained angle control parameters to be adjusted according to the current angle error change rate, enabling them to adapt to the current angle changes of the UAV and ensuring the accuracy of the obtained angle control parameters. Based on these angle control parameters, an initial desired angular velocity is calculated through the angular velocity relationship. Furthermore, to improve the accuracy of the final desired angular velocity, the initial desired angular velocity is optimized through an inner-loop repetitive control relationship, resulting in an accurate desired angular velocity close to the current actual desired angular velocity. Based on this desired angular velocity, the accurate angular velocity adjustment target of the UAV can be determined. Further, based on the difference between the current angular velocity and the desired angular velocity, the current angular velocity error is obtained. This angular velocity error can be used to determine the deviation between the current angular velocity and the calculated desired angular velocity, i.e., the angular velocity error. Based on this angular velocity error, a corresponding control signal can be obtained. By differentiating the angular velocity error, the rate of change of the angular velocity error can be obtained. This rate of change can more accurately reflect the changes in angular velocity deviation. According to the pre-set angular velocity fuzzy rules, the angular velocity deviation and the rate of change of the angular velocity deviation are matched with the corresponding angular velocity control parameters. These angular velocity control parameters provide accurate control signals for the UAV. These control signals allow for more precise adjustment of the UAV's attitude to cope with complex flight environments or high-precision tasks, effectively reducing attitude deviations, ensuring the UAV remains stable on the predetermined trajectory and attitude, and improving control accuracy. Simultaneously, it enables the UAV to better cope with external interference, making timely adaptive adjustments based on deviations in attitude angle and angular velocity, reducing attitude angle and angular velocity fluctuations, further improving control accuracy in complex and changing environments, enhancing flight stability, and reducing the risk of loss of control. Furthermore, the outer ring calculates the corresponding expected angular velocity based on the angle deviation, and the angle can intuitively present the positional relationship of the UAV, providing macroscopic direction control for motor operation. The inner ring compares the expected angular velocity given by the outer ring with the actual angular velocity in real time, captures the deviation between the two, and generates a control signal. Since the angular velocity is related to the instantaneous dynamics of the UAV's rotation, the inner ring can keenly detect subtle changes in flight attitude and quickly fine-tune the motor speed, allowing the UAV to accurately return to the roll angle. This enables fine correction from macro to micro, from angle deviation to actual action, thereby allowing for dynamic and high-precision control of the UAV, improving flight dynamic performance and response speed. Attached Figure Description

[0019] Figure 1This is a flowchart illustrating a drone control method for multi-scenario inspection and emergency management according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the trajectory and position of the drone according to an embodiment of the present invention; Figure 3 This is a diagram of drone control signal curves for multi-scenario inspection and emergency management according to an embodiment of the present invention; Figure 4 This is a graph showing the position and velocity tracking effect of the UAV in the x-direction according to an embodiment of the present invention. Figure 5 This is a graph showing the position and velocity tracking effect of the UAV in the y-direction according to an embodiment of the present invention. Figure 6 This is a graph showing the position and velocity tracking effect of the UAV in the z-direction according to an embodiment of the present invention. Figure 7 This is a graph showing the tracking effect curves of the UAV roll angle, pitch angle, and yaw angle in an embodiment of the present invention; Figure 8 The graph shows the tracking performance curves of the UAV's roll rate (p), pitch rate (q), and yaw rate (r) in an embodiment of the present invention. Figure 9 This is a schematic diagram of the structure of a drone control device for multi-scenario inspection and emergency management according to an embodiment of the present invention; Figure 10 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0020] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0021] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0022] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0023] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0024] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0025] In related technologies, traditional UAV control methods rely on preset fixed parameters, which have revealed numerous problems in practical applications. For example, in complex weather conditions, changes in wind speed, temperature, and humidity can significantly impact UAV flight. If wind speed suddenly increases, the fixed control parameters prevent the UAV from adjusting its flight attitude and power output in time, potentially leading to severe deviations or even loss of control. In urban areas with numerous high-rise buildings, complex and changeable airflow makes fixed-parameter control unsuitable, increasing the risk of collisions. Furthermore, the limitations of fixed parameters become apparent when mission requirements change. For instance, when a UAV switches from simple aerial photography to high-precision mapping, fixed control parameters cannot meet the stringent positional accuracy requirements of mapping, resulting in significant errors in the mapping data. UAV control methods relying on preset fixed parameters cannot adapt to dynamic environmental changes and diverse mission requirements, severely impacting the control accuracy and application effectiveness of UAVs.

[0026] In related technologies, traditional UAV control methods mostly rely on preset fixed parameters, which expose significant limitations in complex operational scenarios such as inspection and emergency management. In tasks such as inspecting power transmission lines in mountainous areas and traversing oil and gas pipelines in canyons, sudden changes in airflow and strong electromagnetic interference caused by complex terrain can severely affect flight stability. Fixed parameters cannot adjust attitude and power output in real time, easily leading to UAV deviation, loss of control, or even collisions with towers and pipelines. In emergency situations such as earthquakes and floods, sudden storms, smoke and dust obstructions, and constantly changing debris can render traditional control methods ineffective, threatening UAV safety. Furthermore, when tasks shift from routine full-area inspection to precise equipment defect detection, or from large-scale disaster reconnaissance to precise location of trapped personnel, fixed control parameters cannot meet the differentiated requirements for flight accuracy and response speed for different tasks, directly affecting the defect identification rate and emergency rescue efficiency. To address the problems existing in the above-mentioned related technologies, this embodiment provides a UAV control method and device for multi-scenario inspection and emergency management.

[0027] like Figure 1 As shown in the figure, an embodiment of the present invention provides a drone control method for multi-scenario inspection and emergency management, comprising: S100: Obtain the current attitude angle and desired angle of the UAV, and determine the difference between the attitude angle and the desired angle as the angle error. Calculate the derivative of the angle error to obtain the corresponding angle error change rate.

[0028] Specifically, to acquire the current attitude angle, UAVs are typically equipped with a series of high-precision sensor components, such as an inertial measurement unit (IMU). The IMU integrates sensors like gyroscopes and angular velocity meters. The gyroscope can sensitively detect changes in the UAV's angular velocity along various axes. By calculating the angular velocity data, the UAV's attitude angle changes can be deduced. The angular velocity meter measures the UAV's angular velocity in space, further assisting in correcting the attitude angle calculation results, thereby accurately obtaining the UAV's real-time roll angle, pitch angle, and yaw angle. For example, during UAV flight, if the gyroscope detects a change in the UAV's angular velocity around the X-axis, after integration processing and calibration with the angular velocity meter data, the current roll angle value can be accurately determined. The setting of the desired angle depends on the UAV's flight mission and flight phase. In autonomous cruise missions, the desired angle can be calculated based on a preset flight path and target point position to ensure the UAV can fly smoothly along the predetermined route. When performing target tracking missions, the desired angle may be dynamically adjusted based on the target object's position and motion state, ensuring the UAV maintains target lock at all times. For example, when a drone is tracking a moving vehicle, the desired angle will be constantly updated to ensure that the drone's camera is always pointed at the vehicle.

[0029] Furthermore, the difference between the acquired current attitude angle and the desired angle is calculated to obtain the angle error. For example, if the desired pitch angle is 0°, but the actual measured pitch angle is 3°, then the angle error is 3°. This indicates that the UAV's attitude has deviated from the expected horizontal state and needs correction. The derivative of the angle error is obtained as the rate of change of the angle error. Through this derivative calculation, the trend of the angle error over time can be clearly understood. If the angle error gradually increases over a certain period, then the rate of change of the angle error is positive; conversely, if the angle error decreases, then the rate of change of the angle error is negative. For example, when the UAV is subjected to external interference, its attitude begins to gradually deviate from the desired angle. In the initial stage, the rate of change of the angle error may be small, but as the interference continues, the rate of change of the angle error will gradually increase. Based on this trend, the control system can predict the instability trend of the UAV's attitude in advance and adjust the control parameters in a timely manner. This allows for more efficient correction of the UAV's attitude, enabling it to quickly return to the desired angle, ensuring flight stability and accuracy, and ensuring that the UAV can successfully complete various complex flight missions.

[0030] S200, based on a preset angle fuzzy rule, determine angle control parameters according to the angle error and the angle error change rate, wherein the angle control parameters include angle proportional parameters, angle integral parameters and angle differential parameters.

[0031] Specifically, fuzzy rules are built upon fuzzy logic. They do not rely on precise numerical limits but instead use linguistic variables to describe the system state. For angle error and its rate of change, fuzzy subsets such as "positive large," "positive medium," "zero," "negative medium," and "negative large" can be defined. For example, if the rate of change of angle error increases rapidly in a short period, it is classified as "positive large"; if it remains relatively constant, it is classified as "zero." Angle fuzzy rules can be expressed as follows: if the angle error is "positive medium" and the rate of change of angle error is "positive large," then the corresponding angle proportional parameter, angle integral parameter, and angle differential parameter are matched. This is achieved by matching the corresponding angle proportional parameter, angle integral parameter, and angle differential parameter based on the angle error and its rate of change. The angle proportional parameter is primarily adjusted based on the current angle error. When the angle error is large, a larger value will cause the control system to generate a larger control output to quickly correct the drone's attitude. For example, when the drone experiences a large yaw angle error, a higher value will cause the motor to generate a larger torque, allowing the drone to quickly turn in the desired direction. The angle integral parameter focuses on eliminating long-term steady-state errors. If a small angle deviation exists during the drone's flight, it will gradually accumulate over time through integration, causing the control system to generate a continuous corrective force that eventually eliminates the steady-state error. For example, when a drone is hovering, a small external disturbance may cause a continuous pitch angle deviation. The control signal will be continuously adjusted over time until the deviation approaches zero. The angle derivative parameter works based on the rate of change of the angle error. When the rate of change of the angle error is large, it indicates that the drone's attitude is changing rapidly. A large control input will be generated to suppress this rapid change, preventing the drone from making excessive attitude adjustments that could lead to instability. For example, if the drone is suddenly affected by a strong wind and its attitude changes rapidly, the control system will quickly intervene, adjusting the motor speed and torque to make the drone's attitude change smoother and avoid new problems caused by overcorrection.

[0032] S300, based on the angle error and the angle control parameters, an initial desired angular velocity is obtained through a preset angular velocity relationship, and the desired angular velocity is obtained through a preset inner loop repetitive control relationship based on the initial desired angular velocity.

[0033] Specifically, based on the angle error and the corresponding angle proportional parameters, angle integral parameters, and angle differential parameters, the initial desired angular velocity is calculated through a preset angular velocity relationship. Subsequently, the initial desired angular velocity is optimized through a preset inner loop repetitive control relationship to obtain the desired angular velocity. The desired angular velocity provides an adjustment target for the angular velocity of the UAV control, so the current angular velocity of the UAV can be adjusted according to the desired angular velocity, thereby achieving precise control of the UAV and enabling the UAV to quickly reach the desired flight attitude.

[0034] S400: Based on the current angular velocity of the UAV and the desired angular velocity, the difference between the angular velocity and the desired angular velocity is determined as the angular velocity error, and the derivative of the angular velocity error is used to obtain the corresponding rate of change of the angular velocity error.

[0035] Specifically, the current angular velocity of the drone is obtained, and the difference between the current angular velocity and the desired angular velocity is determined as the angular velocity error. The derivative of the angular velocity error is then used to obtain the rate of change of the angular velocity error over time. A positive rate of change means that the angular velocity error is continuously increasing over time, and the drone's flight attitude is deviating further from the ideal state. A negative rate of change indicates that the drone is autonomously correcting its attitude, and the error is gradually decreasing. A value of zero indicates that although there is an angular velocity deviation, the degree of deviation is temporarily stable, neither increasing nor decreasing. For example, within a 3-second timeframe, the angular velocity error is 3° / s in the first second, 4° / s in the second second, and reaches 5° / s in the third second. The rate of change of the angular velocity error is calculated to be 1° / s², clearly showing that the drone's attitude deviation is becoming increasingly serious and urgently requires adjustment. When the rate of change of angular velocity error is positive and the value is large, it means that the drone is rapidly deviating from the preset speed; when the rate of change of angular velocity error is negative, it indicates that the drone is approaching the desired speed. Even if there is still some error at present, the rate of change of angular velocity error can be used to more intelligently and agilely predict the subsequent flight attitude and make more precise adjustments in advance, making the drone's flight state more stable and accurate.

[0036] S500, based on a preset angular velocity fuzzy rule, determines angular velocity control parameters according to the angular velocity error and the rate of change of the angular velocity error, wherein the angular velocity control parameters include angular velocity proportional parameters, angular velocity integral parameters and angular velocity differential parameters.

[0037] Specifically, for angular velocity error and its rate of change, fuzzy subsets such as "positive large," "positive medium," "zero," "negative medium," and "negative large" can be defined. For example, if the rate of change of angular velocity error increases rapidly in a short period of time, it is classified as "positive large"; if it remains basically unchanged, it is "zero." The fuzzy rule for angular velocity can be expressed as follows: if the angular velocity error is "positive medium" and the rate of change of angular velocity error is "positive large," then the corresponding angular velocity proportional parameter, angular velocity integral parameter, and angular velocity differential parameter are matched. Thus, through the corresponding fuzzy rule for angular velocity, the corresponding angular velocity proportional parameter, angular velocity integral parameter, and angular velocity differential parameter are matched according to the angular velocity error and its rate of change. Among them, the angular velocity proportional parameter is mainly used to react quickly to the current angular velocity error. According to the fuzzy rule, when a large angular velocity error is detected, and the rate of change of the error is also large, the fuzzy rule will output a large proportional parameter value, prompting the actuator (such as the drone motor) to twist forcefully and quickly reduce the current deviation; conversely, if the error and the rate of change are both small, the proportional parameter is set very low to avoid overcorrection. The angular velocity integral parameter focuses on accumulated, long-term angular velocity errors. Even if the current angular velocity error is small, previously accumulated errors may not have been eliminated. The fuzzy rule adjusts the integral parameter at appropriate times based on error history. For example, after a series of small deviations accumulate, the integral parameter is increased in a timely manner, driving the motor to gradually eliminate past deviations and ensuring that the UAV's attitude does not gradually drift during long-term flight. The angular velocity derivative parameter depends on the rate of change of angular velocity error. When the rate of change of error increases sharply, it means that the attitude deviation is likely to worsen. The fuzzy rule provides a larger derivative parameter to predict and suppress this worsening trend in advance, adding a damping effect to the system and making flight attitude adjustments smoother and more stable, much like equipping a high-speed car with a sensitive anti-lock braking system to prevent loss of control. By dynamically adjusting the control parameters according to the angular velocity fuzzy rule, the UAV can continuously and accurately maintain the desired flight attitude in complex and ever-changing flight environments, ensuring flight safety and mission accuracy.

[0038] S600: Based on the angular velocity error and the angular velocity control parameters, the initial control signal of the UAV motor is obtained through a preset control relationship, and the control signal of the motor is obtained through a preset outer loop repetitive control relationship based on the initial control signal.

[0039] Specifically, based on the angular velocity error and the corresponding angular velocity proportional parameters, angular velocity integral parameters, and angular velocity differential parameters, the initial control signal is calculated through a pre-set angular velocity relationship. Subsequently, the initial control signal is optimized through a preset outer loop repetitive control relationship to calculate the control signal for the UAV motor.

[0040] It's important to note that control signals don't have fixed physical units; they are abstract numerical values ​​whose magnitude is closely related to the system's current deviation state, accumulated deviation, and deviation trend. The control signal is converted into a PWM duty cycle, which is used to regulate the drone's motors. A higher duty cycle results in longer motor operation and faster speed; a lower duty cycle results in shorter motor operation and slower speed, thus achieving precise drone control. When performing duty cycle conversion, the control signal's value range can be determined first, assuming its output range is from -100 to +100, while the PWM duty cycle range is set to 0% to 100%. When the control signal is -100, it means the motor should rotate in reverse at full power, corresponding to a 0% duty cycle; when the control signal is +100, it means the motor should rotate forward at full power, with a 100% duty cycle. A simple linear proportional relationship is used to convert between the control signal and the duty cycle. For example, if the control signal value is 0, theoretically the motor neither accelerates nor decelerates, corresponding to a 50% duty cycle. The calculation formula is usually: Duty cycle = (control signal + 100) / 2.

[0041] In this embodiment, by obtaining the difference between the attitude angle and the desired angle, an accurate angle error can be obtained. The derivative of this angle error is then used to obtain the corresponding angle error change rate. Based on the angle error and the angle error change rate, a pre-set angle fuzzy rule is used to match the corresponding angle control parameters. This allows the obtained angle control parameters to be adjusted according to the current angle error change rate, enabling them to adapt to the current angle changes of the UAV and ensuring their accuracy. Based on these angle control parameters, an initial desired angular velocity is calculated using the angular velocity relationship. Furthermore, to improve the accuracy of the final desired angular velocity, the initial desired angular velocity is optimized using an inner-loop repetitive control relationship, resulting in an accurate desired angular velocity close to the current actual desired angular velocity. Based on this desired angular velocity, the accurate angular velocity adjustment target for the UAV can be determined. Further, based on the difference between the current angular velocity and the desired angular velocity, the current angular velocity error is obtained. This angular velocity error can be used to determine the deviation between the current angular velocity and the calculated desired angular velocity, i.e., the angular velocity error. Therefore, a corresponding control signal can be obtained based on this angular velocity error. By differentiating the angular velocity error, the rate of change of the angular velocity error can be obtained. This rate of change can more accurately reflect the changes in angular velocity deviation. According to the pre-set angular velocity fuzzy rules, the angular velocity deviation and the rate of change of the angular velocity deviation are matched with the corresponding angular velocity control parameters. These angular velocity control parameters provide accurate control signals for the UAV. These control signals allow for more precise adjustment of the UAV's attitude to cope with complex flight environments or high-precision tasks, effectively reducing attitude deviations, ensuring the UAV remains stable on the predetermined trajectory and attitude, and improving control accuracy. Simultaneously, it enables the UAV to better cope with external interference, making timely adaptive adjustments based on deviations in attitude angle and angular velocity, reducing attitude angle and angular velocity fluctuations, further improving control accuracy in complex and changing environments, enhancing flight stability, and reducing the risk of loss of control. Furthermore, the outer ring calculates the corresponding expected angular velocity based on the angle deviation, and the angle can intuitively present the positional relationship of the UAV, providing macroscopic direction control for motor operation. The inner ring compares the expected angular velocity given by the outer ring with the actual angular velocity in real time, captures the deviation between the two, and generates a control signal. Since the angular velocity is related to the instantaneous dynamics of the UAV's rotation, the inner ring can keenly detect subtle changes in flight attitude and quickly fine-tune the motor speed, allowing the UAV to accurately return to the roll angle. This enables fine correction from macro to micro, from angle deviation to actual action, thereby allowing for dynamic and high-precision control of the UAV, improving flight dynamic performance and response speed.

[0042] Optionally, the process of constructing the angle fuzziness rule includes: Obtain a preset initial angle fuzzy subset, wherein the initial angle fuzzy subset includes an initial angle proportional fuzzy subset, an initial angle integral fuzzy subset, and an initial angle differential fuzzy subset; Based on a preset angle input domain, the initial angle ratio fuzzy subset is optimized to obtain an angle ratio fuzzy subset, and angle ratio fuzzy rules are constructed based on the angle ratio fuzzy subset. Based on the angle input domain, the initial angle integral fuzzy subset is optimized to obtain an angle integral fuzzy subset, and angle integral fuzzy rules are constructed based on the angle integral fuzzy subset; Based on the angle input universe of discourse, the initial angle differential fuzzy subset is optimized to obtain an angle differential fuzzy subset. Angle differential fuzzy rules are constructed based on the angle differential fuzzy subset. The angle input universe of discourse includes the value ranges of the angle proportional fuzzy subset, the angle integral fuzzy subset, and the angle differential fuzzy subset. The angle fuzzy rules include the angle proportional fuzzy rule, the angle integral fuzzy rule, and the angle differential fuzzy rule.

[0043] Specifically, firstly, a preset initial angle fuzzy subset is obtained. This subset can be set based on prior knowledge and experience of UAV control for multi-scenario inspection and emergency management. The initial angle fuzzy subset includes an initial angle proportional fuzzy subset, an initial angle integral fuzzy subset, and an initial angle differential fuzzy subset. For example, in the initial setting of the UAV flight scenario, the initial angle proportional fuzzy subset can be roughly divided into several broad categories such as "small," "medium," and "large" to initially define the range of different proportional control strengths. Next, optimization is performed based on a preset angle input domain. The angle input domain covers the range of angle deviations and their rates of change that may occur during actual UAV flight, providing boundaries and reference standards for the optimization of the fuzzy subset. For the initial angle proportional fuzzy subset, under the constraints of the angle input domain, its range is further subdivided and refined through extensive experimental data and simulation analysis to obtain a more targeted angle proportional fuzzy subset. For example, if it is found that the angle deviation and the rate of change of angle deviation are small in certain specific flight missions of UAVs, and the precision requirement of proportional control is extremely high when adjusting small angle deviations, the angle proportional fuzzy subset will be further refined into more detailed categories such as "extremely small" and "smaller" within the corresponding small deviation region of the angle input domain. Then, based on the actual angle deviation and the rate of change of angle deviation, a suitable input domain is determined, and angle proportional fuzzy rules that better fit the actual flight requirements are constructed by optimizing the angle proportional fuzzy subset.

[0044] Similarly, the initial angle integral fuzzy subset and the initial angle differential fuzzy subset are also optimized based on the angle input universe of discourse, yielding corresponding angle integral fuzzy subsets and angle differential fuzzy subsets, respectively. Angle integral fuzzy rules are then constructed using the angle integral fuzzy subset, and angle differential fuzzy rules are constructed using the angle differential fuzzy subset. During the optimization of the angle integral fuzzy subset, considering the steady-state error that may accumulate during long-term flight or in complex environments, the range and intensity of the integral control within the angle input universe of discourse are meticulously defined. For example, based on flight test data of the UAV under different wind speeds, it is determined how the integral fuzzy subset should be adjusted to effectively eliminate steady-state error within the duration and magnitude range of angle error, thereby constructing accurate angle integral fuzzy rules. For the angle differential fuzzy subset, optimization is performed based on the angle change rate in the angle input universe of discourse. When the UAV encounters sudden interference causing rapid angle changes, the specific form of the angle differential fuzzy subset is determined by analyzing the high change rate region in the angle input universe of discourse, constructing angle differential fuzzy rules. This enables differential control to effectively suppress excessive angle changes in a timely manner, improving the stability and control accuracy of the UAV flight.

[0045] An example is set up with fuzzy linguistic variables and their quantization values: Negative Big (NB) is -3, Negative Medium (NM) is -2, Negative Small (NS) is -1, Zero (Z) is 0, Positive Small (PS) is 1, Positive Medium (PM) is 2, and Positive Big (PB) is 3. That is, the fuzzy linguistic variable set {NB, NM, NS, Z, PS, PM, PB} corresponds to the quantization value set {-3, -2, -1, 0, 1, 2, 3}. Based on the initial universe of discourse optimization, an angle-proportional fuzzy subset and the corresponding angle-proportional fuzzy rules are constructed.

[0046] In this optional embodiment, through the above optimization of each fuzzy subset and the construction process of angle fuzzy rules, the fuzzy control strategy of the UAV can adapt to complex and ever-changing flight environments and mission requirements, improve control accuracy and stability, give full play to the advantages of fuzzy control in UAV control, and work in conjunction with other control strategies to achieve efficient and reliable flight control.

[0047] Optionally, determining the angle control parameters based on the angle error and the rate of change of the angle error includes: Based on the angle error and the angle error change rate, the initial angle ratio parameter is determined by the angle ratio fuzzy rule, and the initial angle ratio parameter is optimized by the preset angle output domain to obtain the optimized initial angle ratio parameter. Based on the angle error and the rate of change of the angle error, the initial angle integration parameters are determined by the angle integration fuzzy rule, and the initial angle integration parameters are optimized by the angle output universe of discourse to obtain the optimized initial angle integration parameters. Based on the angle error and the angle error change rate, the initial angle differential parameters are determined by the angle differential fuzzy rule, and the initial angle differential parameters are optimized by the angle output universe of discourse to obtain optimized initial angle differential parameters. The angle output universe of discourse includes the optimized initial angle scaling parameter, the optimized initial angle integral parameter, and the value range of the optimized initial angle differential parameter. The optimized initial angle proportional parameter, the optimized initial angle integral parameter, and the optimized initial angle differential parameter are optimized using a preset outer ring particle swarm optimization algorithm to obtain the angle proportional parameter, the angle integral parameter, and the angle differential parameter.

[0048] Specifically, based on the angle error and its rate of change, a corresponding initial angle ratio parameter is matched using fuzzy angle ratio rules. For example, if both the angle error and its rate of change are large, the fuzzy angle ratio control rules may match a larger initial angle ratio parameter. This allows the system to respond more quickly to larger deviations. Furthermore, a preset angle output domain defines the range of values ​​for the initial angle ratio parameter, which can be determined by the angle error and its rate of change. Once the initial angle ratio parameter is obtained, it is compared and adjusted with the angle output domain. If the initial angle ratio parameter exceeds the range of the angle output domain, it needs to be restricted or corrected to fall within a reasonable range, resulting in an optimized initial angle ratio parameter.

[0049] Similarly, based on the angle error and its rate of change, the corresponding initial angle integral parameters are matched using fuzzy angle integral rules. These parameters are primarily used to eliminate the system's steady-state error. When a persistent angle error exists, the fuzzy angle integral rules determine an initial angle integral parameter based on the error and its rate of change. For example, if the angle error is small but persistent, the fuzzy angle integral rules might provide a suitable initial angle integral parameter to gradually eliminate the steady-state error. Furthermore, the initial angle integral parameters are optimized using the angle output universe of discourse. The angle output universe of discourse defines a reasonable range of values ​​for the angle integral parameters. If the initial angle integral parameters are outside the range defined by the angle output universe of discourse, they are adjusted to ensure that the optimized initial angle integral parameters work effectively in the system, avoiding both excessively strong integration leading to system instability and insufficient integration to eliminate the steady-state error.

[0050] Simultaneously, the initial angle differential parameters are determined based on the angle error and its rate of change, combined with the angle differential fuzzy rule. The angle differential parameters are primarily used to suppress system overshoot. When the angle error rate of change is large, the angle differential fuzzy rule will provide a larger initial angle differential parameter to prevent the system from overshooting due to rapidly changing errors. For example, when the system experiences a sudden disturbance causing a rapid change in angle, a larger angle differential parameter can help the system recover to the desired state more smoothly. Furthermore, the initial angle differential parameters are optimized using the angle output universe of discourse. The angle output universe of discourse considers the system's tolerance and requirements for differential actions. If the initial angle differential parameters exceed the range of the angle output universe of discourse, they are adjusted to obtain optimized initial angle differential parameters, ensuring that the differential action plays an appropriate role in the system, effectively suppressing overshoot without having an excessively negative impact on the system's normal response.

[0051] Furthermore, the outer-loop particle swarm optimization algorithm is an optimization algorithm used to further optimize the initial angle proportional parameters, initial angle integral parameters, and initial angle differential parameters obtained above. These parameters are considered as the positions of particles in the search space; each particle has a velocity and a position. The optimal solution is found by iteratively updating the particle's velocity and position. Particles in the swarm adjust their velocity and position based on their own optimal position and the swarm's optimal position. In each iteration, the objective function value corresponding to each particle is calculated, and the individual optimal and swarm optimal are updated. After multiple iterations, the particle swarm eventually converges to the optimal solution, yielding the final angle proportional parameters, angle integral parameters, and angle differential parameters. These parameters enable the system to achieve good performance in angle control, such as fast response, small steady-state error, and small overshoot.

[0052] In this optional embodiment, the matched initial angle scaling parameters, initial angle integral parameters, and initial angle differential parameters are optimized through the angle output universe of discourse to obtain accurate optimized initial angle scaling parameters, optimized initial angle integral parameters, and optimized initial angle differential parameters. Furthermore, a particle swarm optimization algorithm is used to further optimize these parameters, obtaining the angle scaling parameters, angle integral parameters, and angle differential parameters. The outer-loop particle swarm optimization algorithm can optimize control parameters according to different flight conditions and environmental changes. During flight, the UAV encounters various disturbances, such as airflow changes and electromagnetic interference. Through this optimization algorithm, the UAV can dynamically adjust its control parameters to adapt to these disturbances, maintain a stable flight state, and thus improve the control accuracy of the UAV.

[0053] Optionally, the angular velocity relationship satisfies: ; Where u1 is the initial desired angular velocity, e ne represents the current angle error of the UAV. n-1 The angle error of the UAV in the previous sampling period is T1, where T1 is the angle sampling period, n is the current angle sampling period, and e is the angle error in the previous sampling period. i For the i-th angle, the periodic angle error is used, K 1P K is the angle ratio parameter. 1I K is the angle integration parameter. 1D Let be the differential parameter of the angle.

[0054] Optionally, the inner loop repetitive control relationship satisfies: ; Wherein, U1 is the desired angular velocity, u1 is the initial desired angular velocity, A1 is the inner loop transfer function, W1 is the inner loop compensator, F1 is the inner loop feedback signal, and Q1 is the inner loop low-pass filter. For the inner loop delay link, N is the number of times the inner loop output signal is sampled.

[0055] It should be noted that the inner loop transfer function is determined by the UAV's structure, motors, and other characteristics, reflecting the dynamic transformation relationship from the initial desired angular velocity to the output desired angular velocity; the inner loop compensator is used to compensate for the defects of the inner loop control system, dynamically optimizing the initial desired angular velocity based on the error, and enhancing the inner loop's anti-interference capability and stability; the inner loop feedback signal generally comes from the sensor's angular velocity measurement value, which generates an error when compared with the initial desired angular velocity, prompting the inner loop control system to adjust and ensure flight attitude; the inner loop low-pass filter can remove high-frequency interference, enabling the inner loop control system to receive a stable signal, improving control accuracy, and avoiding noise interference; the inner loop delay link originates from the time consumption of each link in the inner loop control system, which will affect the control effect, and its negative impact should be reduced during the design; the number of samplings of the inner loop output signal determines the acquisition frequency of the output signal, affecting control accuracy and the computational burden of the inner loop system.

[0056] Optionally, the process of constructing the angular velocity fuzzy rule includes: Obtain a preset initial angular velocity fuzzy subset, wherein the initial angular velocity fuzzy subset includes an initial angular velocity proportional fuzzy subset, an initial angular velocity integral fuzzy subset, and an initial angular velocity differential fuzzy subset; Based on the preset angular velocity input domain, the initial angular velocity ratio fuzzy subset is optimized to obtain an angular velocity ratio fuzzy subset, and angular velocity ratio fuzzy rules are constructed based on the angular velocity ratio fuzzy subset. Based on the angular velocity input domain, the initial angular velocity integral fuzzy subset is optimized to obtain an angular velocity integral fuzzy subset, and angular velocity integral fuzzy rules are constructed based on the angular velocity integral fuzzy subset; Based on the angular velocity input universe of discourse, the initial angular velocity differential fuzzy subset is optimized to obtain an angular velocity differential fuzzy subset. Angular velocity differential fuzzy rules are constructed based on the angular velocity differential fuzzy subset. The angular velocity input universe of discourse includes the value ranges of the angular velocity proportional fuzzy subset, the angular velocity integral fuzzy subset, and the angular velocity differential fuzzy subset. The angular velocity fuzzy rules include the angular velocity proportional fuzzy rule, the angular velocity integral fuzzy rule, and the angular velocity differential fuzzy rule.

[0057] Specifically, a preset initial angular velocity fuzzy subset is obtained. This initial subset can be set based on a preliminary understanding and experience of the UAV's angular velocity control characteristics. For example, the initial proportional angular velocity fuzzy subset might be simply divided into broad categories such as "low proportion," "medium proportion," and "high proportion." The initial integral and differential angular velocity fuzzy subsets also have similar broad divisions, providing a basic framework for subsequent precise adjustments. Next, optimization is performed based on a preset angular velocity input domain. The angular velocity input domain covers the angular velocity deviations and variation ranges that may occur during actual UAV flight. It is used to optimize the fuzzy subset. For the initial proportional angular velocity fuzzy subset, under the constraints of the angular velocity input domain, it is refined through a large amount of flight data and simulation analysis. For example, if it is found that the UAV requires extremely high precision in proportional control when adjusting small angular velocity deviations under certain specific flight conditions, the initial "low proportion" will be further subdivided into "extremely low proportion," "relatively low proportion," etc., within the corresponding small deviation region of the angular velocity input domain, thereby constructing a more realistic angular velocity proportional fuzzy rule. These rules specify in detail how the angular velocity proportional parameter should be adjusted under different angular velocity errors and rates of change of angular velocity errors to achieve more precise angular velocity control. Similarly, the initial integral fuzzy subset and the initial differential fuzzy subset of angular velocity are also optimized based on the angular velocity input universe of discourse, resulting in corresponding integral and differential fuzzy subsets of angular velocity, respectively. Corresponding integral fuzzy rules are then constructed based on the integral fuzzy subset, and corresponding differential fuzzy rules are constructed based on the differential fuzzy subset. During the optimization of the integral fuzzy subset, considering the potential accumulation of steady-state angular velocity errors during long-term flight or in complex environments, the range and intensity of integral control can be finely defined within the angular velocity input universe of discourse. For example, based on test data from the UAV under different loads and flight attitudes, it can be determined how the integral fuzzy subset should be adjusted to effectively eliminate steady-state errors within the range of angular velocity error duration and magnitude, thereby constructing accurate integral fuzzy rules of angular velocity. For the angular velocity differential fuzzy subset, optimization is performed based on the rate of change of angular velocity in the angular velocity input domain. When the UAV encounters sudden interference that causes rapid changes in angular velocity, the specific form of the angular velocity differential fuzzy subset is determined by analyzing the high rate of change region in the angular velocity input domain, and angular velocity differential fuzzy rules are constructed. This enables differential control to suppress excessive changes in angular velocity in a timely and effective manner, thereby enhancing the stability and dynamic performance of the UAV flight.

[0058] In this optional embodiment, the fuzzy subset is optimized by inputting the angular velocity into the universe of discourse, thereby enabling more precise adjustment of control parameters based on the angular velocity error and the rate of change of the angular velocity error during actual flight. This allows the UAV to control its angular velocity more accurately, making flight attitude adjustments more precise. Consequently, it can better cope with complex and ever-changing flight environments, quickly adapt to environmental changes, maintain stable flight, reduce the impact of external interference on angular velocity control, and improve the control accuracy of the UAV.

[0059] Optionally, determining the angular velocity control parameters based on the angular velocity error and the rate of change of the angular velocity error includes: Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity ratio parameter is determined by the angular velocity ratio fuzzy rule, and the initial angular velocity ratio parameter is optimized by the preset angular velocity output domain to obtain the optimized initial angular velocity ratio parameter. Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity integral parameters are determined by the angular velocity integral fuzzy rule, and the optimized initial angular velocity integral parameters are obtained by optimizing the initial angular velocity integral parameters through the angular velocity output universe of discourse; Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity differential parameters are determined by the angular velocity differential fuzzy rule, and the initial angular velocity differential parameters are optimized by the angular velocity output universe of discourse to obtain optimized initial angular velocity differential parameters. The angular velocity output universe of discourse includes the optimized initial angular velocity proportional parameter, the optimized initial angular velocity integral, and the value range of the optimized initial angular velocity differential parameters. The optimized initial angular velocity proportional parameter, the optimized initial angular velocity integral parameter, and the optimized initial angular velocity differential parameter are optimized by a preset inner-loop particle swarm optimization algorithm to obtain the angular velocity proportional parameter, the angular velocity integral parameter, and the angular velocity differential parameter.

[0060] Specifically, firstly, based on the angular velocity error and its rate of change, a relatively large initial angular velocity proportional parameter is matched using fuzzy rules. A larger proportional parameter enables the system to quickly generate strong control when facing large angular velocity deviations, prompting the UAV's angular velocity to rapidly approach the desired value. Next, the initial angular velocity proportional parameter is optimized using a preset angular velocity output universe of discourse, which can be obtained from the angular velocity error and its rate of change. If the initial angular velocity proportional parameter exceeds this range, it may lead to system instability or poor control performance. For example, an excessively large initial angular velocity proportional parameter may cause over-adjustment of the UAV's angular velocity, resulting in oscillations; if it is too small, it may fail to effectively correct angular velocity deviations. By comparing and adjusting the initial parameter with the output universe of discourse, an optimized initial angular velocity proportional parameter is obtained, ensuring it is within a suitable value range, guaranteeing both control effectiveness and system stability.

[0061] Similarly, based on the angular velocity error and its rate of change, the corresponding initial angular velocity integral parameters are matched using the fuzzy rule for angular velocity integration. These initial angular velocity integral parameters are then optimized using the output angular velocity universe of discourse to obtain optimized initial angular velocity integral parameters. The angular velocity integral parameters are primarily used to eliminate the system's steady-state error. When the UAV experiences a continuous angular velocity deviation during flight, the integral action becomes particularly important. For example, if the angular velocity error is small but persists for a period of time, the fuzzy rule for angular velocity integration will provide an appropriate initial angular velocity integral parameter. Over time, this parameter can gradually eliminate the steady-state error, stabilizing the UAV's angular velocity. Then, it is optimized using the angular velocity output universe of discourse to ensure that the parameter functions within a reasonable range, avoiding any impact on system performance due to excessively strong or weak integral action.

[0062] Based on the angular velocity error and its rate of change, the corresponding initial angular velocity differential parameters are matched using angular velocity differential fuzzy rules. These initial angular velocity differential parameters are then optimized using the output angular velocity universe of discourse to obtain optimized angular velocity differential parameters. These angular velocity differential parameters are primarily used to suppress system overshoot. When the UAV's angular velocity rate of change is large, such as during sudden external interference or rapid maneuvers, the differential fuzzy rules will provide a larger initial angular velocity differential parameter. This parameter can be adjusted in advance according to the trend of angular velocity change, effectively suppressing excessive angular velocity changes and preventing overshoot. Similarly, the angular velocity output universe of discourse is used to optimize these parameters to meet the actual needs and performance requirements of the system.

[0063] Finally, the pre-defined inner-loop particle swarm optimization algorithm is used to further optimize the initial proportional angular velocity parameter, the initial integral angular velocity parameter, and the initial differential angular velocity parameter. In this process, these parameters are regarded as the positions of particles in the search space. Each particle has its own velocity and position, and they move and update continuously in the search space. By iteratively calculating the objective function value corresponding to each particle, and adjusting the velocity and position according to its own optimal position and the optimal position of the swarm, after multiple iterations, the particle swarm gradually converges to the optimal solution, thus obtaining the final proportional angular velocity parameter, integral angular velocity parameter, and differential angular velocity parameter.

[0064] In this optional embodiment, determining and optimizing control parameters based on angular velocity error and rate of change enables more precise angular velocity control of the UAV, effectively reducing attitude deviations caused by angular velocity fluctuations and improving the control accuracy of the UAV. Furthermore, through the inner-loop particle swarm optimization algorithm and parameter determination and optimization based on fuzzy rules, the system can automatically adapt to different flight conditions, ensuring that the UAV maintains good angular velocity control performance under various operating conditions, thus broadening the application range of the UAV.

[0065] Optionally, the angular velocity relationship satisfies: ; Where u2 is the initial control signal, h m h represents the current angular velocity error of the UAV. m-1 The angular velocity error of the UAV in the previous sampling period is given by T2, where T2 is the angular velocity sampling period, m is the current angular velocity sampling period, and h is the angular velocity sampling period. f For the f-th angular velocity, the periodic angular velocity error, K 2P K is the proportional parameter of the angular velocity. 2I K is the integral parameter of the angular velocity. 2D Let be the differential parameter of the angular velocity.

[0066] Optionally, the repetition control relationship satisfies: ; Wherein, U2 is the control signal, u2 is the initial control signal, A2 is the outer loop transfer function, W2 is the outer loop compensator, F2 is the outer loop feedback signal, and Q2 is the outer loop low-pass filter. For the outer loop delay link, M is the number of times the outer loop output signal is sampled.

[0067] It should be noted that the outer-loop transfer function describes the mathematical relationship from the outer-loop input (such as the desired flight attitude angle) to the outer-loop output. It comprehensively considers factors such as the UAV's mechanical structure and aerodynamic characteristics, and is a core component of the outer-loop control system. It determines how the initial input control signal is converted into the corresponding output control signal to achieve attitude control of the UAV. The outer-loop compensator is mainly used to compensate for potential performance defects or interference in the outer-loop control system. Based on the system's operating state and error information, it dynamically adjusts and compensates the outer-loop control signal to improve the system's stability, accuracy, and anti-interference capability, ensuring that the UAV can stably maintain the desired flight attitude. The outer-loop feedback signal typically consists of the actual flight attitude information of the UAV acquired by sensors. This information is fed back to the outer-loop control system, interacting with the expected flight attitude. The system compares the attitude information of the drone with that of other drones to generate an error signal, enabling the system to adjust and correct based on the error, thus achieving closed-loop control and ensuring that the drone's flight attitude always approaches the desired state. The outer-loop low-pass filter filters out high-frequency noise and interference components from the outer-loop feedback signal or other input signals. In the drone's flight environment, there are various electromagnetic interferences and mechanical vibrations, which may cause high-frequency noise to be mixed into the feedback signal. The outer-loop low-pass filter allows low-frequency signals to pass through while blocking high-frequency signals, enabling the control system to make decisions and control based on more accurate and stable signals, thereby improving the system's reliability and control accuracy. The outer-loop delay link reflects the impact of these delays on the control system because there is a certain time delay in the signal during sensor acquisition, transmission lines, and controller processing. When designing and analyzing control systems, the existence of delay links must be fully considered, as excessive delays may lead to system instability or degraded control performance. Appropriate measures (such as predictive control and compensation algorithms) are needed to reduce the impact of delays on the system. In digital control systems, the number of outer-loop output signal samples determines the frequency at which the outer-loop output signal is sampled per unit time. A higher sampling rate can more accurately capture the dynamic changes of the system, but it increases computational load and system complexity. A lower sampling rate may lose some important information and affect control accuracy. Therefore, the sampling rate needs to be rationally selected based on specific requirements and hardware resources to balance control accuracy and system performance.

[0068] Figure 2 This diagram illustrates the trajectory and position of the drone, providing a direct comparison between its reference and actual positions. The reference trajectory is a horizontal ellipse at a height of z≈3.5 meters. The actual position initially deviates vertically during the initial phase, but quickly converges to the trajectory of the reference ellipse and steadily follows the reference path, with only minor deviations at the trajectory junctions. Overall, this verifies the effectiveness of the drone's 3D position tracking.

[0069] Figure 3 The control signal graphs for the UAV show the total lift and torque control signals of the three channels. The total lift undergoes a rapid adjustment in the initial stage, then stabilizes at approximately 7N to maintain altitude; the roll and pitch torques only have brief, pulse-like adjustments at the beginning of startup, then quickly return to zero and remain stable; the yaw torque exhibits a sinusoidal fluctuation consistent with the yaw angular velocity reference, used to track yaw motion. The overall control signal is smooth and without continuous oscillations, indicating that the controller output is stable and efficient.

[0070] Figure 4 The results demonstrate the position and velocity tracking performance of the UAV in the x-direction. In position tracking, the actual value closely follows the sinusoidal reference trajectory, and the initial deviation disappears within a short time. Velocity tracking also performs excellently, with the waveforms of the actual velocity and the reference velocity closely matching. Only a brief peak overshoot occurs at the initial stage of startup, indicating that the motion control in the x-direction has good dynamic tracking and stability.

[0071] Figure 5 The results demonstrate the position and velocity tracking performance of the UAV in the y-direction. In position tracking, the actual value accurately tracks the sinusoidal reference signal, and the small deviations in the initial stage converge quickly. The velocity tracking curve also maintains a high degree of consistency with the reference velocity, and the instantaneous fluctuations at startup are quickly suppressed, indicating that the motion control in the y-direction has excellent dynamic response and steady-state accuracy.

[0072] Figure 6 The results demonstrate the drone's position and velocity tracking performance in the z-direction. In position tracking, the actual value rapidly rises from 0 to a reference altitude of approximately 3.5 meters, then remains stable without significant fluctuations. In velocity tracking, there is a large peak in the initial stage, which then rapidly decays to 0 and remains near the reference velocity, indicating that the altitude control in the z-direction has a rapid response and good steady-state maintenance capability.

[0073] Figure 7 The tracking performance of the UAV's roll, pitch, and yaw angles was demonstrated. The reference values ​​for roll and pitch angles were both 0, and the actual angles quickly converged to the reference values ​​after the initial oscillations and remained stable. The yaw angle tracked a reference signal that increased linearly with time, and the actual angle almost completely coincided with the reference signal, with only a small steady-state error. This indicates that the UAV's attitude control has good dynamic response and tracking accuracy.

[0074] Figure 8The tracking performance of the UAV's roll angular velocity (p), pitch angular velocity (q), and yaw angular velocity (r) was demonstrated. The reference values ​​for the roll and pitch channels were both 0. After a brief oscillation in the initial stage, the actual angular velocities quickly converged to the reference values ​​and remained stable. The yaw channel tracked a sinusoidal reference signal, and the actual angular velocity almost perfectly matched the reference signal, with only a slight overshoot in the initial stage. Overall, it demonstrated good dynamic response and steady-state tracking capabilities.

[0075] like Figure 9 As shown in the figure, an embodiment of the present invention provides a drone control device 900 for multi-scenario inspection and emergency management, comprising: The outer loop comparison module 910 is used to obtain the current attitude angle and the desired angle of the UAV, and to determine the difference between the attitude angle and the desired angle as the angle error, and to obtain the corresponding angle error change rate by taking the derivative of the angle error; The outer loop control module 920 is used to determine angle control parameters based on the preset angle fuzzy rules, according to the angle error and the angle error change rate, wherein the angle control parameters include angle proportional parameters, angle integral parameters and angle differential parameters; The outer loop processing module 930 is used to obtain an initial desired angular velocity based on the angle error and the angle control parameters through a preset angular velocity relationship; and to obtain a desired angular velocity based on the initial desired angular velocity through a preset inner loop repetition control relationship. The inner loop comparison module 940 is used to determine the difference between the current angular velocity and the desired angular velocity of the UAV as the angular velocity error, and to obtain the corresponding angular velocity error change rate by differentiating the angular velocity error. The inner loop control module 950 is used to determine angular velocity control parameters based on the preset angular velocity fuzzy rules, according to the angular velocity error and the rate of change of the angular velocity error, wherein the angular velocity control parameters include angular velocity proportional parameters, angular velocity integral parameters and angular velocity differential parameters; The inner loop processing module 960 is used to obtain the initial control signal of the motor of the UAV through a preset control relationship based on the angular velocity error and the angular velocity control parameters; and to obtain the control signal of the motor through a preset outer loop repeating control relationship based on the initial control signal.

[0076] The UAV control device for multi-scenario inspection and emergency management in this embodiment is used to implement the UAV control method for multi-scenario inspection and emergency management as described above. Its advantages over the prior art are the same as the advantages of the UAV control method for multi-scenario inspection and emergency management over the prior art, and will not be repeated here.

[0077] like Figure 10As shown in the figure, an electronic device provided by an embodiment of the present invention includes a memory and a processor; the memory is used to store a computer program; the processor is used to implement the above-described UAV control method for multi-scenario inspection and emergency management when executing the computer program.

[0078] Alternatively, an electronic device includes a memory and a processor coupled to the memory; the memory is configured to store a computer program; the processor is configured to perform the following operations when the computer program is executed: The current attitude angle and the desired angle of the UAV are obtained, and the difference between the attitude angle and the desired angle is determined as the angle error. The derivative of the angle error is used to obtain the corresponding angle error change rate. Based on a preset angle fuzzy rule, angle control parameters are determined according to the angle error and the angle error change rate, wherein the angle control parameters include angle proportional parameters, angle integral parameters and angle differential parameters; Based on the angle error and the angle control parameters, an initial desired angular velocity is obtained through a preset angular velocity relationship, and the desired angular velocity is obtained through a preset inner loop repetitive control relationship based on the initial desired angular velocity. Based on the current angular velocity of the UAV and the desired angular velocity, the difference between the angular velocity and the desired angular velocity is determined as the angular velocity error, and the derivative of the angular velocity error is used to obtain the corresponding rate of change of the angular velocity error. Based on a preset angular velocity fuzzy rule, angular velocity control parameters are determined according to the angular velocity error and the rate of change of the angular velocity error. The angular velocity control parameters include angular velocity proportional parameters, angular velocity integral parameters, and angular velocity differential parameters. Based on the angular velocity error and the angular velocity control parameters, the initial control signal of the UAV's motor is obtained through a preset control relationship, and the control signal of the motor is obtained through a preset outer loop repetitive control relationship based on the initial control signal.

[0079] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method for drone control for multi-scenario inspection and emergency management.

[0080] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations: The current attitude angle and the desired angle of the UAV are obtained, and the difference between the attitude angle and the desired angle is determined as the angle error. The derivative of the angle error is used to obtain the corresponding angle error change rate. Based on a preset angle fuzzy rule, angle control parameters are determined according to the angle error and the angle error change rate, wherein the angle control parameters include angle proportional parameters, angle integral parameters and angle differential parameters; Based on the angle error and the angle control parameters, an initial desired angular velocity is obtained through a preset angular velocity relationship, and the desired angular velocity is obtained through a preset inner loop repetitive control relationship based on the initial desired angular velocity. Based on the current angular velocity of the UAV and the desired angular velocity, the difference between the angular velocity and the desired angular velocity is determined as the angular velocity error, and the derivative of the angular velocity error is used to obtain the corresponding rate of change of the angular velocity error. Based on a preset angular velocity fuzzy rule, angular velocity control parameters are determined according to the angular velocity error and the rate of change of the angular velocity error. The angular velocity control parameters include angular velocity proportional parameters, angular velocity integral parameters, and angular velocity differential parameters. Based on the angular velocity error and the angular velocity control parameters, the initial control signal of the UAV's motor is obtained through a preset control relationship, and the control signal of the motor is obtained through a preset outer loop repetitive control relationship based on the initial control signal.

[0081] The present invention will now describe electronic devices that can serve as servers or clients of the present invention, which are examples of hardware devices that can be applied to various aspects of the present invention. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0082] Electronic devices include a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM can also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0083] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.

[0084] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.

Claims

1. A drone control method for multi-scenario inspection and emergency management, characterized in that, include: The current attitude angle and the desired angle of the UAV are obtained, and the difference between the attitude angle and the desired angle is determined as the angle error. The derivative of the angle error is used to obtain the corresponding angle error change rate. Based on a preset angle fuzzy rule, angle control parameters are determined according to the angle error and the angle error change rate, wherein the angle control parameters include angle proportional parameters, angle integral parameters and angle differential parameters; Based on the angle error and the angle control parameters, an initial desired angular velocity is obtained through a preset angular velocity relationship, and the desired angular velocity is obtained through a preset inner loop repetitive control relationship based on the initial desired angular velocity. Based on the current angular velocity of the UAV and the desired angular velocity, the difference between the angular velocity and the desired angular velocity is determined as the angular velocity error, and the derivative of the angular velocity error is used to obtain the corresponding rate of change of the angular velocity error. Based on a preset angular velocity fuzzy rule, angular velocity control parameters are determined according to the angular velocity error and the rate of change of the angular velocity error. The angular velocity control parameters include angular velocity proportional parameters, angular velocity integral parameters, and angular velocity differential parameters. Based on the angular velocity error and the angular velocity control parameters, the initial control signal of the UAV's motor is obtained through a preset control relationship, and the control signal of the motor is obtained through a preset outer loop repetitive control relationship based on the initial control signal.

2. The UAV control method for multi-scenario inspection and emergency management according to claim 1, characterized in that, The process of constructing the angle fuzziness rule includes: Obtain a preset initial angle fuzzy subset, wherein the initial angle fuzzy subset includes an initial angle proportional fuzzy subset, an initial angle integral fuzzy subset, and an initial angle differential fuzzy subset; Based on a preset angle input domain, the initial angle ratio fuzzy subset is optimized to obtain an angle ratio fuzzy subset, and angle ratio fuzzy rules are constructed based on the angle ratio fuzzy subset. Based on the angle input domain, the initial angle integral fuzzy subset is optimized to obtain an angle integral fuzzy subset, and angle integral fuzzy rules are constructed based on the angle integral fuzzy subset; Based on the angle input universe of discourse, the initial angle differential fuzzy subset is optimized to obtain an angle differential fuzzy subset. Angle differential fuzzy rules are constructed based on the angle differential fuzzy subset. The angle input universe of discourse includes the value ranges of the angle proportional fuzzy subset, the angle integral fuzzy subset, and the angle differential fuzzy subset. The angle fuzzy rules include the angle proportional fuzzy rule, the angle integral fuzzy rule, and the angle differential fuzzy rule.

3. The UAV control method for multi-scenario inspection and emergency management according to claim 2, characterized in that, The step of determining the angle control parameters based on the angle error and the rate of change of the angle error includes: Based on the angle error and the angle error change rate, the initial angle ratio parameter is determined by the angle ratio fuzzy rule, and the initial angle ratio parameter is optimized by the preset angle output domain to obtain the optimized initial angle ratio parameter. Based on the angle error and the rate of change of the angle error, the initial angle integration parameters are determined by the angle integration fuzzy rule, and the initial angle integration parameters are optimized by the angle output universe of discourse to obtain the optimized initial angle integration parameters. Based on the angle error and the angle error change rate, the initial angle differential parameters are determined by the angle differential fuzzy rule, and the initial angle differential parameters are optimized by the angle output universe of discourse to obtain optimized initial angle differential parameters. The angle output universe of discourse includes the optimized initial angle scaling parameter, the optimized initial angle integral parameter, and the value range of the optimized initial angle differential parameter. The optimized initial angle proportional parameter, the optimized initial angle integral parameter, and the optimized initial angle differential parameter are optimized using a preset outer ring particle swarm optimization algorithm to obtain the angle proportional parameter, the angle integral parameter, and the angle differential parameter.

4. The UAV control method for multi-scenario inspection and emergency management according to claim 1, characterized in that, The angular velocity relationship satisfies: ; Where u1 is the initial desired angular velocity, e n e represents the current angle error of the UAV. n-1 The angle error of the UAV in the previous sampling period is T1, where T1 is the angle sampling period, n is the current angle sampling period, and e is the angle error in the previous sampling period. i For the i-th angle, the periodic angle error is used, K 1P K is the angle ratio parameter. 1I K is the angle integration parameter. 1D Let be the differential parameter of the angle.

5. The UAV control method for multi-scenario inspection and emergency management according to claim 1, characterized in that, The inner loop repetitive control relationship satisfies: ; Wherein, U1 is the desired angular velocity, u1 is the initial desired angular velocity, A1 is the inner loop transfer function, W1 is the inner loop compensator, F1 is the inner loop feedback signal, and Q1 is the inner loop low-pass filter. For the inner loop delay link, N is the number of times the inner loop output signal is sampled.

6. The UAV control method for multi-scenario inspection and emergency management according to claim 1, characterized in that, The process of constructing the angular velocity fuzzy rule includes: Obtain a preset initial angular velocity fuzzy subset, wherein the initial angular velocity fuzzy subset includes an initial angular velocity proportional fuzzy subset, an initial angular velocity integral fuzzy subset, and an initial angular velocity differential fuzzy subset; Based on the preset angular velocity input domain, the initial angular velocity ratio fuzzy subset is optimized to obtain an angular velocity ratio fuzzy subset, and angular velocity ratio fuzzy rules are constructed based on the angular velocity ratio fuzzy subset. Based on the angular velocity input domain, the initial angular velocity integral fuzzy subset is optimized to obtain an angular velocity integral fuzzy subset, and angular velocity integral fuzzy rules are constructed based on the angular velocity integral fuzzy subset; Based on the angular velocity input universe of discourse, the initial angular velocity differential fuzzy subset is optimized to obtain an angular velocity differential fuzzy subset. Angular velocity differential fuzzy rules are constructed based on the angular velocity differential fuzzy subset. The angular velocity input universe of discourse includes the value ranges of the angular velocity proportional fuzzy subset, the angular velocity integral fuzzy subset, and the angular velocity differential fuzzy subset. The angular velocity fuzzy rules include the angular velocity proportional fuzzy rule, the angular velocity integral fuzzy rule, and the angular velocity differential fuzzy rule.

7. The UAV control method for multi-scenario inspection and emergency management according to claim 6, characterized in that, The step of determining the angular velocity control parameters based on the angular velocity error and the rate of change of the angular velocity error includes: Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity ratio parameter is determined by the angular velocity ratio fuzzy rule, and the initial angular velocity ratio parameter is optimized by the preset angular velocity output domain to obtain the optimized initial angular velocity ratio parameter. Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity integral parameters are determined by the angular velocity integral fuzzy rule, and the optimized initial angular velocity integral parameters are obtained by optimizing the initial angular velocity integral parameters through the angular velocity output universe of discourse; Based on the angular velocity error and the rate of change of the angular velocity error, the initial angular velocity differential parameters are determined by the angular velocity differential fuzzy rule, and the initial angular velocity differential parameters are optimized by the angular velocity output universe of discourse to obtain optimized initial angular velocity differential parameters. The angular velocity output universe of discourse includes the optimized initial angular velocity proportional parameter, the optimized initial angular velocity integral, and the value range of the optimized initial angular velocity differential parameters. The optimized initial angular velocity proportional parameter, the optimized initial angular velocity integral parameter, and the optimized initial angular velocity differential parameter are optimized by a preset inner-loop particle swarm optimization algorithm to obtain the angular velocity proportional parameter, the angular velocity integral parameter, and the angular velocity differential parameter.

8. The UAV control method for multi-scenario inspection and emergency management according to claim 1, characterized in that, The angular velocity relationship satisfies: ; Where u2 is the initial control signal, h m h represents the current angular velocity error of the UAV. m-1 The angular velocity error of the UAV in the previous sampling period is given by T2, where T2 is the angular velocity sampling period, m is the current angular velocity sampling period, and h is the angular velocity sampling period. f For the f-th angular velocity, the periodic angular velocity error, K 2P K is the proportional parameter of the angular velocity. 2I K is the integral parameter of the angular velocity. 2D Let be the differential parameter of the angular velocity.

9. The UAV control method for multi-scenario inspection and emergency management according to claim 1, characterized in that, The outer loop repetitive control relationship satisfies: ; Wherein, U2 is the control signal, u2 is the initial control signal, A2 is the outer loop transfer function, W2 is the outer loop compensator, F2 is the outer loop feedback signal, and Q2 is the outer loop low-pass filter. For the outer loop delay link, M is the number of times the outer loop output signal is sampled.

10. A drone control device for multi-scenario inspection and emergency management, characterized in that, include: The outer loop comparison module is used to obtain the current attitude angle and the desired angle of the UAV, and to determine the difference between the attitude angle and the desired angle as the angle error. The derivative of the angle error is used to obtain the corresponding angle error change rate. The outer loop control module is used to determine angle control parameters based on the preset angle fuzzy rules, according to the angle error and the angle error change rate, wherein the angle control parameters include angle proportional parameters, angle integral parameters and angle differential parameters; The outer loop processing module is used to obtain an initial desired angular velocity based on the angle error and the angle control parameters through a preset angular velocity relationship; and to obtain the desired angular velocity based on the initial desired angular velocity through a preset inner loop repetition control relationship. The inner loop comparison module is used to determine the difference between the current angular velocity and the desired angular velocity of the UAV as the angular velocity error, and to obtain the corresponding rate of change of angular velocity error by differentiating the angular velocity error. The inner loop control module is used to determine angular velocity control parameters based on the preset angular velocity fuzzy rules, according to the angular velocity error and the rate of change of the angular velocity error, wherein the angular velocity control parameters include angular velocity proportional parameters, angular velocity integral parameters and angular velocity differential parameters; The inner loop processing module is used to obtain the initial control signal of the UAV's motor through a preset control relationship based on the angular velocity error and the angular velocity control parameters; and to obtain the control signal of the motor through a preset outer loop repeating control relationship based on the initial control signal.