An unmanned aerial vehicle prediction control method for inland waterway inspection and related equipment
By establishing a non-affine dynamics model of the UAV and decoupling it into a rotational and translational mechanical subsystem, and using an extended high-gain observer for disturbance estimation and smoothing, the problems of control stability and trajectory tracking accuracy of the UAV under multi-source disturbances are solved, achieving higher control system stability and actuator safety.
Patent Information
- Application Number
- CN202610748974.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2046-05-28
AI Technical Summary
Existing UAV control technology struggles to achieve full-state control with six degrees of freedom when faced with multi-source, rapidly changing, and high-amplitude disturbances such as heavy fog, rainstorms, sudden changes in airflow under bridges and tunnels, and turbulence caused by ship traffic. Furthermore, it lacks a dynamic adjustment mechanism for state constraints, leading to a sharp drop in trajectory tracking accuracy, severe attitude jitter, and even system instability.
A non-affine dynamics model of the UAV is established and decoupled into a rotational dynamics subsystem and a translational motion subsystem. The state estimate and total disturbance estimate are solved recursively by extending a high-gain observer, and smoothing and constraint set adjustment are performed to construct a predictive time-domain cost function to obtain the optimal control quantity.
It improves the accuracy of disturbance estimation, ensures trajectory tracking precision, enhances the stability of the control system and the safety of the actuator, and avoids state limit exceedance and control saturation under strong disturbances.
Smart Images

Figure CN122260878B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unmanned aerial vehicle (UAV) control technology, and in particular to a predictive control method and related equipment for UAVs used in inland waterway inspection. Background Technology
[0002] In inland waterway operations such as bridge inspection and ship monitoring, unmanned helicopters often face strong aerodynamic interference from heavy fog and rainstorms, sudden changes in airflow in tunnels under bridges, and turbulence caused by ship traffic, among other multi-source, rapidly changing, and high-amplitude disturbances. As a typical underactuated, strongly coupled, and nonlinear dynamic system, the core challenge of unmanned helicopter flight control lies in achieving full-state control of 6 degrees of freedom with limited control inputs, while ensuring trajectory tracking accuracy and system stability under multiple constraints such as strong external disturbances, model uncertainties, and hardware physical constraints.
[0003] However, existing UAV control technologies typically employ control methods such as backstepping and sliding mode control, which can only handle slowly varying disturbances with bounded amplitudes. They also lack dynamic adjustment mechanisms for state constraints, making it impossible to accurately estimate and feedforward compensate for disturbances. This can easily lead to a sharp drop in trajectory tracking accuracy, severe attitude jitter, or even system instability. Summary of the Invention
[0004] The main objective of this application is to propose a predictive control method and related equipment for unmanned aerial vehicles (UAVs) used for inland waterway inspection, which improves the accuracy of disturbance estimation, ensures trajectory tracking accuracy, and enhances the stability of the control system and the safety of the actuators.
[0005] To achieve the above objectives, one aspect of this application proposes a predictive control method for unmanned aerial vehicles (UAVs) used for inland waterway inspection, comprising: A non-affine dynamics model of the UAV is established, and the non-affine dynamics model is decoupled into a rotational dynamics subsystem and a translational motion mechanical subsystem. Obtain the first state variable of the rotational dynamics subsystem and the second state variable of the translational dynamics subsystem, and construct an error dynamics model based on the first state variable and the second state variable; The flight status data of the UAV and the initial control input of the flight control actuator are obtained, wherein the flight status data includes position, attitude and velocity; Based on the flight state data, the initial control quantity, and the error dynamics model, the state estimate and total disturbance estimate of the UAV are obtained by recursively solving using an extended high-gain observer. The total disturbance estimate is smoothed to obtain a smoothed total disturbance estimate; Determine the first constraint set of the first state variable and the second state variable, and the second constraint set of the initial control quantity. Adjust the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set. Construct the cost function for prediction in the time domain; Based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set, the cost function in the prediction time domain is solved to obtain the optimal control quantity for controlling the UAV.
[0006] In some embodiments, the first state variable includes a first attitude angle and a first angular velocity, and the second state variable includes a first position and a first linear velocity; The step of constructing an error dynamics model based on the first state variable and the second state variable includes: Obtain preset desired trajectory data, wherein the desired trajectory data includes a second position, a second linear velocity, and a second attitude angle; Calculate the difference between the first attitude angle and the second attitude angle to obtain the attitude angle error; Multiply the first angular velocity by a preset rotation error coefficient to obtain the weighted angular velocity error; Based on the attitude angle error and the weighted angular velocity error, the rotational state error of the rotational dynamics subsystem is obtained; Calculate the difference between the first position and the second position to obtain the position error; The difference between the first linear velocity and the second linear velocity is multiplied by a preset translational error coefficient to obtain the weighted linear velocity error; Based on the position error and the weighted linear velocity error, the translational state error of the translational kinetic subsystem is obtained; The total disturbance of the UAV is taken as an extended state, and an error dynamics model is constructed based on the rotational state error, the translational state error, and the extended state.
[0007] In some embodiments, obtaining the state estimate and total disturbance estimate of the UAV by recursively solving using an extended high-gain observer based on the flight state data, the initial control quantity, and the error dynamics model includes: The error dynamics model is then converted into an error dynamics model for a singular perturbation structure. The extended high-gain observer uses the flight state data as feedback input and the initial control quantity as feedforward input to recursively solve the error dynamics model of the singular perturbation structure, thereby obtaining the state estimate and total disturbance estimate of the UAV.
[0008] In some embodiments, smoothing the total disturbance estimate to obtain a smoothed total disturbance estimate includes: Obtain a preset set of maximum disturbances, and limit the total disturbance estimate to the range of the set of maximum disturbances using a projection operator to obtain the projected disturbance estimate. The projected disturbance estimate is weighted and fused with the corresponding historical smoothed total disturbance estimate to obtain the smoothed total disturbance estimate at the current time.
[0009] In some embodiments, adjusting the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set includes: The state adjustment and control adjustment are determined based on the smoothed total disturbance estimate, wherein the state adjustment and control adjustment are positively correlated with the smoothed total disturbance estimate. The constraint interval of the first constraint set is adjusted according to the state adjustment amount to obtain the adjusted first constraint set; The constraint interval of the second constraint set is adjusted according to the control adjustment amount to obtain the adjusted second constraint set.
[0010] In some embodiments, solving the predicted time-domain cost function based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set to obtain the optimal control quantity for controlling the UAV includes: Determine the first-order optimality condition of the predicted time-domain cost function; Based on the first-order optimality condition, the optimization solution of the prediction time-domain cost function is transformed into a first-order gradient dynamic system. The estimated state value is used as the initial state variable of the first-order gradient dynamic system. The first-order gradient dynamic system is recursively solved using the adjusted first constraint set and the adjusted second constraint set as constraints to obtain the optimal control quantity of the UAV.
[0011] To achieve the above objectives, another aspect of this application proposes a predictive control device for unmanned aerial vehicles (UAVs) used for inland waterway inspection, the device comprising: The model decoupling module is used to establish a non-affine dynamics model of the UAV and decouple the non-affine dynamics model into a rotational dynamics subsystem and a translational motion subsystem. The error dynamics model construction module is used to obtain the first state variable of the rotational dynamics subsystem and the second state variable of the translational dynamics subsystem, and to construct an error dynamics model based on the first state variable and the second state variable. The data acquisition module is used to acquire the flight status data of the UAV and the initial control input of the flight control actuator, wherein the flight status data includes position, attitude, and velocity; The estimation module is used to obtain the state estimate and total disturbance estimate of the UAV by recursively solving the flight state data, the initial control quantity and the error dynamics model through an extended high-gain observer. A smoothing module is used to smooth the total disturbance estimate to obtain a smoothed total disturbance estimate. The constraint set adjustment module is used to determine the first constraint set of the first state variable and the second state variable and the second constraint set of the initial control quantity, and adjust the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set. The cost function building module is used to construct the cost function for the prediction time domain; The cost function solving module is used to solve the cost function in the prediction time domain based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set to obtain the optimal control quantity for controlling the UAV.
[0012] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0013] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.
[0014] This application also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0015] The embodiments of this application include at least the following beneficial effects: This application provides a predictive control method for unmanned aerial vehicles (UAVs) used for inland waterway inspection. This method first establishes a non-affine dynamics model of the UAV and decouples the non-affine dynamics model into a rotational dynamics subsystem and a translational motion subsystem; acquires the UAV's flight state data and the initial control input of the flight control actuator; acquires the first state variable of the rotational dynamics subsystem and the second state variable of the translational motion subsystem, and constructs an error dynamics model based on the first and second state variables; based on the flight state data, the initial control input, and the error dynamics model, through... The state estimate and total disturbance estimate of the UAV are obtained by recursively solving using an extended high-gain observer. The total disturbance estimate is smoothed to obtain a smoothed total disturbance estimate. The first constraint set for the first state variable and the second state variable, and the second constraint set for the initial control quantity are determined. The first and second constraint sets are adjusted according to the smoothed total disturbance estimate to obtain the adjusted first and second constraint sets. A cost function in the prediction time domain is constructed. Based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set, the cost function in the prediction time domain is solved to obtain the optimal control quantity for controlling the UAV. This application, based on flight state data, initial control variables, and error dynamics models, recursively solves for the state estimates and total disturbance estimates of the UAV by extending a high-gain observer. This achieves feedforward compensation for disturbances, improves the accuracy of disturbance estimation, and thus ensures trajectory tracking accuracy. In addition, smoothing the total disturbance estimate avoids severe oscillations in the constraint set caused by transient jumps in the disturbance estimate. Finally, the constraint set of state variables and control variables is adaptively adjusted based on the smoothed total disturbance estimate, and the optimal control variables are obtained by solving the cost function based on the adjusted constraint set. This provides sufficient safety margin for the actuator, avoids state limit exceedance and control saturation under strong disturbances, and improves the stability of the control system and the safety of the actuator. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application; Figure 2 This is a flowchart of a UAV predictive control method for inland waterway inspection provided in an embodiment of this application; Figure 3 This is a schematic diagram of the tracking trajectory and error provided in the embodiments of this application; Figure 4 This is a schematic diagram of the architecture for control based on the UAV predictive control method provided in this application embodiment; Figure 5 This is a schematic diagram of the structure of a UAV predictive control device for inland waterway inspection provided in an embodiment of this application; Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0018] It is understood that the terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0019] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0021] Existing UAV control technologies typically employ control methods such as backstepping and sliding mode control, which can only handle slowly varying disturbances with bounded amplitudes. They also lack dynamic adjustment mechanisms for state constraints, making it impossible to accurately estimate and feedforward compensate for disturbances. This can easily lead to a sharp drop in trajectory tracking accuracy, severe attitude jitter, and even system instability.
[0022] In view of this, this application provides a predictive control method and related equipment for unmanned aerial vehicles (UAVs) used for inland waterway inspection. The method first establishes a non-affine dynamics model of the UAV and decouples it into a rotational dynamics subsystem and a translational motion subsystem; it then acquires the UAV's flight state data and the initial control inputs of the flight control actuator; it acquires the first state variable of the rotational dynamics subsystem and the second state variable of the translational motion subsystem, and constructs an error dynamics model based on the first and second state variables; based on the flight state data, the initial control inputs, and the error dynamics model, it uses... The state estimate and total disturbance estimate of the UAV are obtained by recursively solving using an extended high-gain observer. The total disturbance estimate is smoothed to obtain a smoothed total disturbance estimate. The first constraint set for the first state variable and the second state variable, and the second constraint set for the initial control quantity are determined. The first and second constraint sets are adjusted according to the smoothed total disturbance estimate to obtain the adjusted first and second constraint sets. A cost function in the prediction time domain is constructed. Based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set, the cost function in the prediction time domain is solved to obtain the optimal control quantity for controlling the UAV. This application, based on flight state data, initial control variables, and error dynamics models, recursively solves for the state estimates and total disturbance estimates of the UAV by extending a high-gain observer. This achieves feedforward compensation for disturbances, improves the accuracy of disturbance estimation, and thus ensures trajectory tracking accuracy. In addition, smoothing the total disturbance estimate avoids severe oscillations in the constraint set caused by transient jumps in the disturbance estimate. Finally, the constraint set of state variables and control variables is adaptively adjusted based on the smoothed total disturbance estimate, and the optimal control variables are obtained by solving the cost function based on the adjusted constraint set. This provides sufficient safety margin for the actuator, avoids state limit exceedance and control saturation under strong disturbances, and improves the stability of the control system and the safety of the actuator.
[0023] The UAV predictive control method for inland waterway inspection provided in this application relates to the field of UAV control technology. This UAV predictive control method for inland waterway inspection can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle-mounted terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the UAV predictive control method for inland waterway inspection, but is not limited to the above forms.
[0024] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0025] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided in an embodiment of this application. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.
[0026] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0027] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.
[0028] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc. It can also be a vehicle-mounted terminal of the various device types described above, but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment does not impose any limitations.
[0029] For example, based on Figure 1 The implementation environment shown in this application embodiment provides a UAV predictive control method for inland waterway inspection. The following description uses the application of this UAV predictive control method for inland waterway inspection in server 101 as an example. It can be understood that this method can also be applied in terminal 102.
[0030] Reference Figure 2 , Figure 2 The flowchart illustrates a predictive control method for unmanned aerial vehicles (UAVs) used for inland waterway inspection, applied to a server, as provided in this application embodiment. The execution entity of this method can be any of the aforementioned computer devices (including servers or terminals). (Refer to...) Figure 2 The control method may include the following steps: S100. Establish a non-affine dynamics model of the UAV, and decouple the non-affine dynamics model into a rotational dynamics subsystem and a translational motion dynamics subsystem.
[0031] For example, this application embodiment establishes a non-affine rigid body dynamics model of the UAV based on the hardware acquisition capabilities of the APM2.8 flight controller. Specifically, the expression of the non-affine rigid body dynamics model in the UAV body coordinate system is as follows: ; in, For the quality matrix of drones, For drone quality; The inertia matrix, These are the moments of inertia along the X, Y, and Z axes, respectively. For the linear velocity of the fuselage, These are the linear velocities along the X, Y, and Z axes, respectively. For the fuselage angular velocity, These are the angular velocities along the X, Y, and Z axes, respectively. To combine external forces; For the resultant torque, Indicates the linear velocity of the drone fuselage The first derivative, i.e., the linear acceleration of the fuselage, Indicates the angular velocity of the drone fuselage The first derivative of is the angular acceleration of the fuselage.
[0032] In the dynamic model, all state variables directly correspond to real-time data collected by the built-in and external sensors of the APM2.8 flight controller, with no unmeasurable virtual states, ensuring the model's feasibility on embedded hardware. The three-axis velocities of the fuselage are obtained by differential calculations from the three-dimensional position data collected by the GPS / BeiDou dual-mode positioning module connected to the APM2.8 flight controller, while the three-axis rotational angular velocities of the fuselage are directly collected at high frequency by the MPU6000 six-axis gyroscope built into the flight controller. The net external force and net torque acting on the fuselage are obtained by solving the pre-calibrated actuator dynamic model through real-time control signals output by the flight controller to the ESC and servos.
[0033] Furthermore, based on a multi-timescale separation strategy using singular perturbations, the complete UAV dynamics model is decoupled into two major subsystems, corresponding to different motion characteristics and hardware response characteristics of the UAV. These two systems include a fast-response rotational dynamics subsystem and a slow-changing translational dynamics subsystem. The fast-response rotational dynamics subsystem corresponds to the UAV's attitude change process, matching the flight controller's high-frequency control characteristics of the servos; the slow-changing translational dynamics subsystem corresponds to the UAV's spatial position change process, matching the flight controller's low-frequency control characteristics of the main rotor ESC and motors, and adapting to the actuator response frequency of the APM2.8 flight controller. This approach simultaneously solves the core control challenges of insufficient input dimensions and multi-degree-of-freedom coupling interference in the UAV's underactuated system.
[0034] S200. Obtain the first state variable of the rotational dynamics subsystem and the second state variable of the translational dynamics subsystem, and construct an error dynamics model based on the first state variable and the second state variable.
[0035] For example, the first state variable is used to fully describe the real-time attitude motion of the UAV, including a first attitude angle and a first angular velocity, wherein the first attitude angle includes a roll angle. Pitch angle and yaw angle The first angular velocity includes the roll angular velocity. Pitch angular velocity and yaw rate First state variable The expression is: ; in, This is the roll angle. The roll rate is angular velocity. The pitch angle, The pitch angular velocity, Yaw angle Yaw angular velocity, Represents the set of real numbers with dimension 6.
[0036] Furthermore, the standardized state-space equations of the rotating dynamics subsystem It can be described as: ; in, Represents the rotational torque vector. These are the dynamic models for the roll, pitch, and yaw channels, respectively. Input for rotational state control , This is the input for translational control. These are the desired roll angle and pitch angle, respectively. , For compactness, For the tail rotor thrust of the drone, The thrust generated by the main rotor of the drone. , These refer to the periodic pitch changes of the UAV's main rotor in the longitudinal and lateral directions, respectively. For external disturbances or uncertainties, , , These are the coefficient matrices in the dynamics of the unmanned aerial vehicle (UAV).
[0037] Furthermore, , , The expression is: ; in, .
[0038] in, Indicates the diagonal division of the block. For the system matrix, For the input matrix, This is the output matrix.
[0039] To ensure flight safety, a set of constraints was also set for the first state variable in the rotational dynamics subsystem, including the constraint set for the roll angle. Defined as: ; in, and These are the upper and lower bound parameters for the roll angle, respectively.
[0040] Pitch angle constraint set Defined as: ; in, and These are the upper and lower bound parameters for the pitch angle, respectively.
[0041] constraint set of yaw angle channel Defined as: ; in, , These are the upper and lower bound parameters for the yaw angle channel, respectively.
[0042] in, , , Then the total set of state constraints for rotational dynamics for: ; The calibration of the constraint set boundary of the first state variable is based on the aerodynamic instability limit of the UAV, the maximum rotation range of the servo motor, and the attitude control range of the flight controller, to ensure that all attitude control actions are always performed within the physical safety range.
[0043] The second state variable describes the UAV's translational motion in three-dimensional space; the second state variable includes a first position and a first linear velocity, wherein the first position includes the position along the X, Y, and Z axes in the geodetic coordinate system, and the first linear velocity includes the linear velocity along the X, Y, and Z axes. The expression is: ; in, , , These represent the positions along the X-axis, Y-axis, and Z-axis, respectively. , , These represent the linear velocities along the X, Y, and Z axes, respectively. Indicates transpose. Standardized state-space equations of the translational kinetic subsystem. It can be described as: ; , ; in, This refers to external disturbances or model uncertainties in the translational mechanics subsystem. The translational dynamics models are shown for the X, Y, and Z axes, respectively. It is the translational dynamic vector. As the first state variable, Represents the set of real numbers with dimension 3.
[0044] For example, the steps of constructing an error dynamics model based on the first state variable and the second state variable include S210-S280: S210. Obtain preset desired trajectory data, wherein the desired trajectory data includes a second position, a second linear velocity, and a second attitude angle; The second position in the expected trajectory data includes the expected three-dimensional position in the X-axis, Y-axis, and Z-axis directions. The second linear velocity includes the desired linear velocity in the X, Y, and Z axis directions. The second attitude angle includes the desired roll attitude angle. Desired pitch angle and the desired yaw attitude angle .
[0045] S220. Calculate the difference between the first attitude angle and the second attitude angle to obtain the attitude angle error; For example, attitude angle error includes roll attitude angle error. Pitch attitude angle error and yaw attitude angle error Its expression is: ; S230. Multiply the first angular velocity by a preset rotational error coefficient to obtain the weighted angular velocity error; The weighted angular velocity error includes the roll angular velocity error. Pitch angular velocity error and yaw angle error Its expression is: ; in, This is the preset rotation error coefficient.
[0046] S240. Based on the attitude angle error and the weighted angular velocity error, the rotational state error of the rotational dynamics subsystem is obtained. The expression is: ; S250. Calculate the difference between the first position and the second position to obtain the position error; Calculate the first position ( ) and the second position ( The difference between the two values is used to obtain the expression for the position error: ; in, This refers to the X-axis position error. Y-axis error This represents the Z-axis error.
[0047] S260. Multiply the difference between the first linear velocity and the second linear velocity by a preset translational error coefficient to obtain the weighted linear velocity error. The weighted linear velocity error includes the X-axis weighted error. Y-axis weighted error Z-axis weighted error Its expression is: ; in, This is the preset translational error coefficient.
[0048] S270. Based on the position error and the weighted linear velocity error, the translational state error of the translational kinetic subsystem is obtained, and its expression is: ; S280. The total disturbance of the UAV is taken as an extended state, and an error dynamics model is constructed based on the rotational state error, the translational state error and the extended state.
[0049] S300: Acquire the flight status data of the UAV and the initial control input of the flight control actuator, wherein the flight status data includes position, attitude, and speed.
[0050] Flight status data refers to the full-state variables in the UAV dynamics model, including position, attitude, and velocity. This data is acquired in real-time by multiple source sensors built into and external to the APM2.8 flight controller. Specifically: Location data: Three-dimensional location data is collected by a GPS / BeiDou dual-mode positioning module connected to the flight controller. In open scenarios with normal GPS signal, satellite positioning is used as the reference. In GPS-denied scenarios such as under bridges and in tunnels, relative positioning is performed by integrating point cloud data from lidar to ensure the validity of location data in all scenarios.
[0051] Attitude data: The three-axis attitude angles (roll angle) are obtained by fusing the MPU6000 six-axis inertial measurement unit and the HMC5883L three-axis magnetometer built into the flight controller through a complementary filtering algorithm. Pitch angle Yaw angle The data update frequency can reach up to 1kHz.
[0052] Velocity data includes linear velocity and angular velocity. The three-axis velocity of the fuselage is obtained by differential calculation of the three-dimensional position data collected by the GPS / BeiDou positioning module and corrected by the measured data of the airspeed sensor. The three-axis rotational angular velocity of the fuselage is directly collected at high frequency by the MPU6000 six-axis gyroscope.
[0053] Initial control quantities refer to the real-time control signals output by the APM2.8 flight controller to each actuator within the current control cycle. These include translational control quantities from the translational dynamics subsystem and rotational control quantities from the rotational dynamics subsystem. The translational control quantities mainly include the output torque of the main ESC, the desired roll angle, and the desired pitch angle, directly controlled by the 1000-2000 RPM standard range PWM signal output by the flight controller to the main rotor ESC. The rotational control quantities mainly include the output torque of the tail ESC and the control quantities of the cyclic pitch servos, controlled by the PWM signals output by the flight controller to the tail rotor ESC and the pitch servos.
[0054] S400. Based on the flight state data, the initial control quantity, and the error dynamics model, the state estimate and total disturbance estimate of the UAV are obtained by recursively solving using an extended high-gain observer.
[0055] For example, the steps for obtaining the state estimate and total disturbance estimate of the UAV include S410-S420: S410. Convert the error dynamics model into an error dynamics model with a singular perturbation structure; Specifically, all uncertainties faced by UAVs in detection scenarios (including aerodynamic disturbances from heavy fog and rain in the translational direction, strong winds and crosswinds, sudden changes in airflow under bridges in the rotational direction, attitude disturbances caused by turbulence from ship traffic, and internal uncertainties such as sensor measurement noise, model parameter errors, and dead zones and saturation characteristics of actuators) are collectively categorized into a total disturbance. The total perturbation is then taken as an extended state of the system. Based on singular perturbation theory, the error dynamics model is transformed into a standard singular perturbation structure, resulting in the error dynamics model of the singular perturbation structure. Its expression is: ; in, For control input ( , ); For the total disturbance, This is a translational external disturbance. For external disturbances of rotation; The perturbation gain matrix is... To control the driving item, It is a nonlinear dynamic term of the UAV. Represents the total state variable, i.e. ,in, As the first state variable, This is the second state variable.
[0056] S420: The extended high-gain observer uses the flight state data as feedback input and the initial control quantity as feedforward input to recursively solve the error dynamics model of the singular perturbation structure, thereby obtaining the state estimate and total disturbance estimate of the UAV.
[0057] For example, the Extended High Gain Observer (EHGO) designed in this application uses the flight state data (position, attitude, and velocity data) of the UAV measured by the APM2.8 flight control sensor as the feedback input and the real-time control quantity output by the flight control (i.e., the initial control quantity obtained in step S300) as the feedforward input to perform real-time recursive calculation of the error dynamics model of the singular perturbation structure. Specifically, this application uses the pole placement method to design the gain matrix of the Extended High Gain Observer, which enables the closed-loop system matrix of the Extended High Gain Observer to be a Helvetics matrix, with all poles placed in the left half-plane of the complex plane, ensuring that the observation error converges exponentially to a bounded small neighborhood, and ensuring that the observation error can achieve exponential convergence. In each control cycle, the Extended High Gain Observer performs a one-step recursive calculation based on the error dynamics model of the above-mentioned singular perturbation structure. The calculation process only includes matrix addition and multiplication operations, and the single calculation time does not exceed 1 millisecond, which is suitable for the 1kHz control cycle of the APM2.8 flight control. By real-time recursion, the current state estimate of the UAV (including estimates of position, attitude, and velocity) and the real-time estimate of the total disturbance are obtained. This achieves a millisecond-level closed-loop response of disturbance occurrence, disturbance estimation, and control compensation, which can solve the lag problem of traditional anti-disturbance methods after the disturbance is corrected, and improve the anti-interference capability.
[0058] The extended high-gain observer in this embodiment overcomes the limitation of traditional observers that rely solely on IMU attitude data, achieving the fusion and utilization of APM2.8 flight control's full-dimensional perception data. This includes not only the attitude angular velocity from the flight control's built-in MPU6000, barometric altitude from MS5611, and heading angle from HMC5883L, but also external peripheral data such as global position from GPS / BeiDou, high-frequency airflow disturbances from millimeter-wave radar, relative positioning from lidar, and airflow velocity from airspeed sensors. For different operational scenarios and disturbance characteristics, the extended high-gain observer can automatically weight the data from different sensors. For example, in strong storms and heavy rain, it increases the weight of airspeed sensor and barometer data to improve aerodynamic disturbance estimation accuracy; in GPS-denied-space conditions under bridges, it increases the weight of lidar and millimeter-wave radar data to improve attitude change and positioning drift estimation accuracy; and in ship collision avoidance monitoring scenarios, it increases the weight of radar ship dynamic data to improve relative motion disturbance estimation accuracy.
[0059] This application embodiment uses an extended high-gain observer to centrally estimate and compensate for external aerodynamic disturbances, model uncertainties, sensor interference, and actuator deviations. The extended high-gain observer input covers sensor data from all dimensions of flight control. Through multi-source data fusion, the disturbance estimation accuracy is greatly improved. Accurate disturbance compensation can be achieved in various strong disturbance scenarios such as heavy fog and rainstorms, strong wind interference, sudden changes in airflow under bridges, and ship turbulence. The trajectory tracking accuracy is significantly improved, and the system robustness is significantly enhanced.
[0060] S500. The total disturbance estimate is smoothed to obtain a smoothed total disturbance estimate.
[0061] In order to eliminate high-frequency spike noise in the disturbance estimation signal, this embodiment of the application smooths the total disturbance estimation value to obtain a smoothed total disturbance estimation value. This avoids severe oscillations of the constraint set caused by transient jumps in the disturbance estimation value, thereby ensuring the stability of the control system and the safety of the actuator. Exemplarily, the step of smoothing the total disturbance estimation value to obtain a smoothed total disturbance estimation value includes S510-S520: S510. Obtain a preset maximum disturbance set, and limit the total disturbance estimate to the range of the maximum disturbance set using a projection operator to obtain the projected disturbance estimate. Among them, the set of maximum disturbances It is a bounded convex set pre-calibrated based on the physical limits of the drone, the hardware constraints of the actuators, and the safety requirements of the operational scenario. It defines the maximum possible amplitude range of the total disturbance. The boundary values of this maximum disturbance set... This represents the maximum allowable amplitude of the disturbance, which is determined by parameters such as the upper limit of sensor measurement noise and the extreme values of external environmental disturbances.
[0062] Then, through the projection operator The total perturbation estimate of the extended high-gain observer output will be used. Projected onto the set of maximum disturbances Within, thus obtaining the projected disturbance estimate. The mathematical expression for the projection operator is: ; ; in, The elements to be projected (i.e., the disturbance estimates) ), Denotes the Euclidean norm. for exist The projection point on the surface. The purpose of this projection operator is to constrain the perturbation estimate within the convex feasible region. Within this range, it can effectively limit the amplitude of abnormal spikes in disturbance estimation.
[0063] S520. The projected disturbance estimate is weighted and fused with the corresponding historical smooth total disturbance estimate to obtain the smooth total disturbance estimate at the current moment.
[0064] This application embodiment employs a first-order low-pass filtering technique to smooth the projected disturbance estimate. Specifically, based on the sampling time... (in For sampling sequence number, Taking the sampling period as an example, let the previous sampling time (i.e., the sampling period) be... The smoothed total disturbance estimate at time ( ) is Current sampling time (the first sampling time) The projected perturbation estimate obtained by extending the high-gain observer at time (time) is Then the estimated smooth total disturbance at the current moment The following first-order low-pass filter recursive formula is used for calculation: ; in, These are the perturbation filter coefficients, with a value range of [value range missing]. .
[0065] Furthermore, through the first-order low-pass filtering process described above, the change between the smoothed perturbation estimates at two adjacent sampling times is limited to the following range: .
[0066] S600. Determine the first constraint set of the first state variable and the second state variable, and the second constraint set of the initial control quantity. Adjust the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set.
[0067] This application embodiment dynamically adjusts the safety constraint range of the UAV state variables and the feasible output range of the control quantity of the flight control actuator based on the smoothed total disturbance estimate, thereby reserving sufficient safety margin for flight control under strong disturbance environment, and avoiding problems such as control saturation, state limit exceeding, and hardware overload from both hardware and algorithm levels.
[0068] For example, the step of adjusting the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set includes S610-S630: S610. Determine the state adjustment amount and the control adjustment amount based on the smoothed total disturbance estimate, wherein the state adjustment amount and the control adjustment amount are positively correlated with the smoothed total disturbance estimate. S620. Adjust the constraint interval of the first constraint set according to the state adjustment amount to obtain the adjusted first constraint set; The first constraint set is the nominal safety boundary set of the UAV's core operating states, covering the safety range of all core operating states such as UAV position, attitude, and velocity. Specifically, based on the nominal upper and lower safety boundaries of the UAV's core operating states, the feasible operating range of the system state is adaptively corrected according to the determined state adjustment amount, thus obtaining the adjusted first constraint set. When the smoothed total disturbance estimate increases, the state adjustment amount increases accordingly, and the constraint range of the first constraint set shrinks appropriately, reserving sufficient safety margin for state fluctuations caused by disturbances and avoiding the safety risk of state exceeding limits under strong disturbances.
[0069] S630. Adjust the constraint interval of the second constraint set according to the control adjustment amount to obtain the adjusted second constraint set.
[0070] The second constraint set is the nominal hardware safety boundary set of the control signals of the flight control actuators, covering the safety range of control signals for all core actuators such as the main rotor ESC, tail rotor ESC, and cyclic pitch servo. Based on the nominal hardware safety boundaries of the actuators, the feasible output range of the control quantity is adaptively corrected according to the determined control adjustment amount, thus obtaining the adjusted second constraint set. Specifically, when the estimated total disturbance increases, the control adjustment amount increases accordingly, and the constraint range of the second constraint set is appropriately shrunk to prevent the control signal output by the controller from exceeding the hardware limits of the actuators under strong disturbances, thereby preventing control saturation, hardware overload, servo overtravel, and other fault problems at the root.
[0071] The aforementioned nominal safety boundary is jointly determined by the aerodynamic instability limit of the UAV, the safety requirements of the operating scenario, the measurement range of the sensors, and the hardware physical characteristics of the actuators (rated operating range of the ESC, maximum rotation range of the servo motor, and power limit of the motor).
[0072] The embodiments of this application adaptively adjust the feasible domain of the state and control quantity according to the magnitude of the total disturbance estimate. The constraint adjustment result is directly mapped to the control signal limit of the flight controller on the actuator, ensuring that the physical constraints of the system can still be met under strong disturbances. This effectively avoids hardware failures such as control saturation, motor overcurrent, and servo overtravel, while ensuring the safe distance between the UAV and bridge structures and navigation vessels, thus avoiding collision risks from the root and significantly reducing the equipment failure rate.
[0073] S700, Construct the cost function for the prediction time domain.
[0074] This application's embodiments construct an optimization objective function (i.e., a cost function) within a finite time domain as an evaluation criterion for the nonlinear model predictive controller to solve for the optimal control sequence. The design of this cost function matches the control requirements of UAVs in bridge and ship inspection operations, while also adapting to the hardware control characteristics of the APM2.8 flight controller. Its optimization objective is to minimize both the UAV's trajectory tracking error and the variation amplitude of the control input within a set finite prediction time domain, ultimately achieving an optimal balance between trajectory tracking accuracy and control stability.
[0075] Specifically, the cost function in the prediction time domain The expression is: ; in, The time domain length for finite prediction (a positive integer greater than zero). For the first The trajectory tracking error vector of the step includes the position error, attitude error and velocity error during the flight of the UAV; For the first The virtual control vectors for each step include the three-axis translational forces and three-axis rotational torques of the UAV; , , These are the state error weight matrix, the control quantity weight matrix, and the terminal error weight matrix, respectively, and all are symmetric positive definite matrices. , , .
[0076] The aforementioned cost function in the prediction time domain includes a state error penalty term, a control variable penalty term, and a terminal error penalty term; the state error penalty term... Used to constrain the trajectory tracking error at each step in the prediction time domain, ensuring that the deviation between the actual flight state of the UAV and the reference trajectory is minimized, thus guaranteeing trajectory tracking accuracy. Control variable penalty term. Used to limit drastic changes in control quantities at each step within the prediction time domain, preventing frequent large-amplitude movements of the actuator, protecting hardware, and reducing energy consumption. Terminal error penalty term. This is used to ensure that the trajectory tracking error at the end of the prediction time domain can converge to a minimum value, avoid error divergence at the end of the prediction time domain, and ensure the stability of the entire prediction process.
[0077] Furthermore, considering the decoupling characteristics of fast and slow dynamics of UAVs, the cost function in the prediction time domain can adopt a differentiated dual prediction time domain architecture in practical applications. Specifically, for fast-response rotational dynamics, a short prediction time domain design is adopted to adapt to the detection characteristics of millimeter-wave radar for high-frequency airflow disturbances, enabling rapid identification and suppression of attitude disturbances. For slow-changing translational dynamics, a long prediction time domain design is adopted to adapt to the core requirement of high-definition cameras for flight stability in bridge inspection, pre-planning smooth flight paths to ensure the continuity and stability of path tracking.
[0078] S800. Based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set, the cost function in the prediction time domain is solved to obtain the optimal control quantity for controlling the UAV.
[0079] This application utilizes the Approximate Dynamic Inversion (ADI) technique to transform the non-convex optimization problem that traditional nonlinear model predictive control (NMPC) requires online iterative solution into a first-order gradient dynamic system that can be solved recursively in real time, thereby enabling rapid calculation of optimal control quantities on the low-computing-power embedded hardware of the APM2.8 flight controller.
[0080] For example, the step of solving the predicted time-domain cost function based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set to obtain the optimal control quantity for controlling the UAV includes S810-S830: S810. Determine the first-order optimality condition of the predicted time-domain cost function; Specifically, in a given finite prediction time domain Within, its control sequence is defined as By controlling the cost in the sequence Minimize to determine the first-order optimality condition, which satisfies the following constraints: ; ; in, For the first Step state error, for The state of the step, For the adjusted first constraint set, To control the quantity, This is the adjusted second set of constraints. This is a discrete-time nonlinear dynamic term.
[0081] S820. Based on the first-order optimality condition, the optimization solution of the predicted time-domain cost function is transformed into a first-order gradient dynamic system. Specifically, starting from the first-order optimality condition of the cost function in the finite prediction time domain, its optimization problem is transformed into a continuous-time first-order gradient system. The first-order optimality condition requires that the cost function be optimized for the control input. The gradient is zero, that is... Based on this, nonlinear model predictive control (NMPC) is approximated as a first-order gradient dynamic system to approximate the optimal control law: ; ; in, Indicates control quantity The first derivative, The first minimum positive time constant parameter ensures that the system can quickly converge to the minimum point of the cost function; These represent the expected forces in the three directions of translational dynamics: the X-axis, Y-axis, and Z-axis. These represent the desired torques in the three directions of rotational dynamics: the X-axis, Y-axis, and Z-axis.
[0082] Furthermore, the obtained smoothed total disturbance estimate As a feedforward compensation, a desired force / torque reference value is constructed. ,in, This represents the disturbance gain. A dynamic control law is constructed using ADI technology to control the actual force / torque, making the actual force / torque... Approaching this expected reference value, i.e. .
[0083] Therefore, for the input mapping function At the reference control value (nominal control value) The expression to be Taylorized at: ; in, It is a higher-order infinitesimal. For the input mapping function, It is the actual controlled quantity. Is the input mapping function in The Jacobian matrix at that location.
[0084] neglect The higher-order terms yield a linearized approximation: ; Furthermore, a new error dynamics equation is constructed using a gradient-based dynamic inversion law: ; in, This represents the second minimum positive time constant. To control the rate of change of a quantity with respect to time.
[0085] This dynamic inversion law makes the actual control quantity It can quickly track the desired control quantity and compensate for disturbances; Define the actual control error as ,in The desired signal is actually input into the drone, where, For the desired main propeller thrust, For the desired tail rotor thrust, For the desired longitudinal periodic pitch, Given the desired lateral periodic pitch, and considering the existence of ADI approximation error and observation error in reality, the final error dynamics equation of the system can be described as follows: ; in, The error vector field under ideal conditions ADI and EHGO. For the final state error The first derivative; These represent the higher-order small quantities caused by ADI approximation error and observation error, respectively. It is the third smallest positive time constant. It is the fourth smallest positive time constant.
[0086] S830. Using the state estimate as the initial state variable of the first-order gradient dynamic system, and using the adjusted first constraint set and the adjusted second constraint set as constraints, the first-order gradient dynamic system is recursively solved to obtain the optimal control quantity of the UAV.
[0087] Within each control cycle, the state estimate is used as the initial state of the first-order gradient dynamic system, and the adjusted first and second constraint sets are used as hard constraint boundaries for the state variables and virtual control quantities. A numerical integration method (such as the fourth-order Runge-Kutta method) is used to recursively solve the first-order gradient dynamic system in real time, converging to a steady-state solution within a very short time (no more than 2 milliseconds), thus obtaining the optimal control quantity for the current control cycle. Finally, the optimal control quantity is mapped to a standard-range PWM signal (1000-2000μs) of the APM2.8 flight controller and output to actuators such as the main rotor ESC, tail rotor ESC, and cyclic pitch servo, driving the UAV to achieve high-precision trajectory tracking and strong disturbance suppression.
[0088] This application embodiment utilizes ADI technology to transform the complex online optimization problem of NMPC into an analytical solution. The computational load is highly matched with the embedded computing capabilities of the ATmega2560 main processor of the APM2.8 flight controller, meeting the real-time control requirements of the UAV at high frequencies of 50-200Hz. At the same time, relying on the parallel acquisition capabilities of the flight controller's multiple interfaces, it realizes the synchronous acquisition and fusion of multi-sensor data, further improving the algorithm's solution efficiency.
[0089] Furthermore, this application also proves the convergence of the closed-loop system based on singular perturbation theory and Lyapunov method. Specifically, based on the multi-timescale characteristics of singular perturbation, the closed-loop control system is decomposed into three subsystems: the observer boundary layer system, the actuator fast dynamic system, and the trajectory tracking slow dynamic system. The stability of each subsystem is proved by Lyapunov stability theory, and finally the global asymptotic stability of the entire closed-loop system is derived, ensuring that the UAV will not experience instability in all engineering scenarios of inland waterway inspection in this application.
[0090] Specifically, a composite Lyapunov function is constructed as the core criterion for judging system stability, targeting all error dimensions of the closed-loop control system. This composite Lyapunov function consists of three independent sub-functions, comprehensively covering all error sources of the closed-loop system: the first part is the trajectory tracking error sub-function, used to characterize the deviation between the actual flight state of the UAV and the desired reference trajectory; the second part is the control input error sub-function, used to characterize the deviation between the actual control output of the actuator and the optimal control output solved by the controller; and the third part is the observer estimation error sub-function, used to characterize the deviation between the state and disturbance estimate output by the Extended High Gain Observer (EHGO), and the actual system state and real disturbance. Through this composite Lyapunov function, the cumulative error level of the entire closed-loop system can be fully quantified, providing a comprehensive quantitative basis for stability judgment. Therefore, based on this composite Lyapunov function, a stability criterion for the closed-loop system can be derived, which describes the quantitative relationship between the rate of change of the Lyapunov function and the overall system error. The rate of change of the composite Lyapunov function is determined by two parts: the first is a convergence term negatively correlated with the square of the system's overall error, and the second is a disturbance upper bound term positively correlated with the magnitude of the system's overall error. The core coefficient of the convergence term is the convergence rate of the closed-loop system. This coefficient is a positive constant representing the speed at which the system error converges. Its magnitude is determined by both the controller gain and the observer gain; the more reasonable the gain setting, the larger the convergence rate and the faster the system error converges. The core coefficient of the disturbance upper bound term is the upper bound of the system disturbance. This coefficient is also a positive constant, representing the maximum magnitude of all uncertainties faced by the system. Its magnitude is determined by both the sensor measurement noise and the maximum magnitude of external environmental disturbances.
[0091] From the stability criteria mentioned above, we can derive the stable convergence condition of the closed-loop system: when the total magnitude of the system's comprehensive error exceeds the ratio of the upper bound of the disturbance to the convergence rate, the rate of change of the Lyapunov function will always be negative. This means that after the magnitude of the system's comprehensive error exceeds this threshold, the composite Lyapunov function will continue to decrease over time, and all system errors will asymptotically converge toward zero. This ultimately proves that the closed-loop system is uniformly bounded and possesses global asymptotic stability.
[0092] The stability proof in this application fully considers the periodic characteristics of the APM2.8 flight control discrete control, sensor sampling delay, actuator response lag, and other hardware characteristics in actual engineering, ensuring the complete validity of the stability conclusion in practical engineering applications. Theoretically, it proves that this method can ensure that the UAV system will not experience instability in all operational scenarios, such as severe weather, GPS denied space, and ship collision avoidance monitoring, thus preventing safety accidents such as crashes and collisions.
[0093] Furthermore, based on the criteria for uniform stability and uniform boundedness in nonlinear system theory, it can be further proven that as time approaches infinity, all errors in the closed-loop system converge to a minimal neighborhood near the origin, the size of which is determined by the upper bound of the system disturbance. This means that the trajectory tracking accuracy of this method can be continuously improved through disturbance estimation and feedforward compensation. The more accurate the disturbance estimation and the smaller the neighborhood, the higher the trajectory tracking accuracy, which can meet the engineering requirements of millimeter-level accuracy for bridge defect inspection.
[0094] This application embodiment retains the non-affine structure of the system, enabling it to handle complex nonlinear systems that are difficult to adapt to using traditional affine control methods, thus significantly improving the universality and application value of the algorithm. In the controller design stage, by introducing a singular perturbation decomposition mechanism, the fast and slow dynamic characteristics of the system are effectively separated, significantly reducing the control design complexity in high-dynamic scenarios. At the same time, by combining non-affine model predictive control and dynamic inverse control techniques, the inherent complexity explosion problem of traditional backstepping methods is avoided, enabling the controller to have both excellent disturbance rejection and real-time performance, and to accurately respond to the control requirements of high-dynamic systems. In summary, the UAV predictive control method of this application has strong anti-disturbance capabilities in severe weather inspection and mapping scenarios, ensuring that the trajectory tracking error of the UAV is smaller in extreme weather such as heavy fog and rainstorms, meeting the high-precision requirements for bridge defect identification, and solving the problem of inspection data distortion caused by disturbances in traditional methods. In bridge collision avoidance detection scenarios, the dynamic constraint adjustment strategy can ensure that the UAV maintains a safer inspection distance from the bridge structure in response to ship navigation disturbances and strong wind interference, and the control response delay is reduced, meeting the coordination requirements of the collision avoidance warning system and avoiding the risk of warning failure caused by control lag. In complex space operation scenarios, even in GPS-denied environments such as under bridges and in tunnels, the autonomous obstacle avoidance accuracy of the UAV is still within the effective range through disturbance estimation and compensation technology, realizing full coverage inspection of the box girder interior and hidden parts of the cable tower, effectively solving the trajectory deviation and collision risks that are prone to occur under strong disturbances in traditional control methods.
[0095] To further verify the validity of this application, embodiments of this application address the tracking error in the altitude direction of unmanned aerial vehicles. The curves that change over time were simulated in experiments, such as... Figure 3 As shown, Figure 3 In the figure, Raw represents the original trajectory error curve of this application, and Smoothed represents the trajectory tracking error curve after smoothing. Figure 3 As can be seen, the maximum transient error amplitude of this application is significantly reduced, it can respond quickly after a disturbance occurs, the reaction time is shortened, its trajectory is smoother, and the tracking is more stable.
[0096] To explain in detail the principles of the technical solution of this application, the overall process of this application will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principles of this application and should not be regarded as a limitation of this application.
[0097] Figure 4 This is a schematic diagram of the architecture for control based on the predictive control method for unmanned aerial vehicles provided in the embodiments of this application, such as... Figure 4 As shown, this application first uses multiple sensors, including a BeiDou positioning module, gyroscope / accelerometer, and millimeter-wave radar, to collect real-time data on the UAV's position, velocity, attitude, angular velocity, and high-frequency airflow disturbances. The controller inputs these data to an Extended High-Gain Observer (EHGO) to estimate lumped disturbances such as strong winds, sudden airflow changes, and turbulence in real time. Subsequently, a Nonlinear Model Predictive Controller (NMPC) based on ADI technology feeds forward the disturbance estimates and quickly solves for the optimal control variables within dynamically adjusted attitude / position / actuator constraints. Based on the optimal control variables, smooth trajectory tracking (translational dynamics) is achieved by adjusting the main rotor lift and collective pitch via electronic speed controllers, and rotational dynamics control is achieved by controlling the control surfaces and attitude via servos. In a specific embodiment, the predictive control process of this application for UAVs used for inland waterway inspection includes the following steps: S1. Based on the hardware acquisition capabilities of the APM2.8 flight controller, a non-affine dynamics model of the UAV is established. The UAV dynamics are decomposed into a rotational dynamics system and a translational motion mechanical system. The state variables of the system are determined by the built-in / external sensors of the flight controller, and the actuator control signal output by the flight controller PWM is used as the control input. S2. Construct an error dynamics model of the singular perturbation structure, transform the system into a singular perturbation form, and use an extended high-gain observer to estimate the state and total disturbance based on data collected from flight control sensors in real time. S3. Smoothing the total disturbance estimate and dynamically adjusting the constraint set: The disturbance data estimated by EHGO is smoothed using a projection operator and a low-pass filter to remove sensor noise (such as high-frequency jitter of the MPU6000 and air pressure fluctuations of the MS5611). Furthermore, the set of state constraints (such as the angle range of the attitude angle) and the set of control constraints (such as the PWM signal range of the ESC and the angle limit of the servo motor) are dynamically reduced based on the disturbance amplitude to reserve a safety margin for the actuators and avoid control saturation or hardware overtravel. S4. Design a nonlinear model predictive controller based on ADI: Construct a finite prediction time-domain cost function, use ADI technology to directly solve the dynamic equation of the optimal control law, replace the traditional online iterative optimization solution, and generate the final control input to act on the UAV system; S5. Proof of system stability: Based on singular perturbation theory and Lyapunov method, prove the convergence of the closed-loop system.
[0098] In summary, this application provides a predictive control method and related equipment for unmanned aerial vehicles (UAVs) used for inland waterway inspection. The method first establishes a non-affine dynamics model of the UAV and decouples it into a rotational dynamics subsystem and a translational motion subsystem. It then acquires the UAV's flight state data and the initial control inputs of the flight control actuators. Next, it acquires the first state variable of the rotational dynamics subsystem and the second state variable of the translational motion subsystem, and constructs an error dynamics model based on these variables. Finally, based on the flight state data, the initial control inputs, and the error dynamics model, it expands... The high-gain observer is used to recursively solve for the state estimate and total disturbance estimate of the UAV. The total disturbance estimate is smoothed to obtain a smoothed total disturbance estimate. The first constraint set for the first state variable and the second state variable, and the second constraint set for the initial control quantity are determined. The first and second constraint sets are adjusted according to the smoothed total disturbance estimate to obtain the adjusted first and second constraint sets. A cost function in the prediction time domain is constructed. Based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set, the cost function in the prediction time domain is solved to obtain the optimal control quantity for controlling the UAV. This application, based on flight state data, initial control variables, and error dynamics models, recursively solves for the state estimates and total disturbance estimates of the UAV by extending a high-gain observer. This achieves feedforward compensation for disturbances, improves the accuracy of disturbance estimation, and thus ensures trajectory tracking accuracy. In addition, smoothing the total disturbance estimate avoids severe oscillations in the constraint set caused by transient jumps in the disturbance estimate. Finally, the constraint set of state variables and control variables is adaptively adjusted based on the smoothed total disturbance estimate, and the optimal control variables are obtained by solving the cost function based on the adjusted constraint set. This provides sufficient safety margin for the actuator, avoids state limit exceedance and control saturation under strong disturbances, and improves the stability of the control system and the safety of the actuator.
[0099] like Figure 5 As shown in the figure, this application embodiment also provides a structural schematic diagram of a UAV predictive control device for inland waterway inspection. This device can implement the above-mentioned method and may include: Model decoupling module 21 is used to establish a non-affine dynamics model of the UAV and decouple the non-affine dynamics model into a rotational dynamics subsystem and a translational motion subsystem. Error dynamics model construction module 23 is used to obtain the first state variable of the rotational dynamics subsystem and the second state variable of the translational dynamics subsystem, and to construct an error dynamics model based on the first state variable and the second state variable; The data acquisition module 23 is used to acquire the flight status data of the UAV and the initial control quantity of the flight control actuator, wherein the flight status data includes position, attitude and speed; The estimation module 24 is used to obtain the state estimate and total disturbance estimate of the UAV by recursively solving the flight state data, the initial control quantity and the error dynamics model through an extended high-gain observer. The smoothing module 25 is used to smooth the total disturbance estimate to obtain a smoothed total disturbance estimate. The constraint set adjustment module 26 is used to determine the first constraint set of the first state variable and the second state variable and the second constraint set of the initial control quantity, and adjust the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set. Cost function construction module 27 is used to construct the cost function for the prediction time domain; The cost function solving module 28 is used to solve the cost function in the prediction time domain based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set to obtain the optimal control quantity for controlling the UAV.
[0100] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0101] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned UAV predictive control method for inland waterway inspection. This electronic device can be any smart terminal, including tablet computers, vehicle-mounted computers, etc.
[0102] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0103] Please see Figure 6 , Figure 6 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 to execute the UAV predictive control method for inland waterway inspection according to the embodiments of this application. The 903 input / output interface is used to implement information input and output. The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0104] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described UAV predictive control method for inland waterway inspection.
[0105] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0106] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0107] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0108] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0109] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0110] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0112] The units described above 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 this embodiment according to actual needs.
[0113] Furthermore, the functional units in the various embodiments of this application 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 unit can be implemented in hardware or as a software functional unit.
[0114] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0115] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A predictive control method for unmanned aerial vehicles (UAVs) used for inland waterway inspection, characterized in that, include: A non-affine dynamics model of the UAV is established, and the non-affine dynamics model is decoupled into a rotational dynamics subsystem and a translational motion mechanical subsystem. Obtain the first state variable of the rotational dynamics subsystem and the second state variable of the translational dynamics subsystem, and construct an error dynamics model based on the first state variable and the second state variable; the first state variable includes a first attitude angle and a first angular velocity, and the second state variable includes a first position and a first linear velocity; The step of constructing an error dynamics model based on the first state variable and the second state variable includes: Obtain preset desired trajectory data, wherein the desired trajectory data includes a second position, a second linear velocity, and a second attitude angle; Calculate the difference between the first attitude angle and the second attitude angle to obtain the attitude angle error; Multiply the first angular velocity by a preset rotation error coefficient to obtain the weighted angular velocity error; Based on the attitude angle error and the weighted angular velocity error, the rotational state error of the rotational dynamics subsystem is obtained; Calculate the difference between the first position and the second position to obtain the position error; The difference between the first linear velocity and the second linear velocity is multiplied by a preset translational error coefficient to obtain the weighted linear velocity error; Based on the position error and the weighted linear velocity error, the translational state error of the translational kinetic subsystem is obtained; The total disturbance of the UAV is taken as an extended state, and an error dynamics model is constructed based on the rotational state error, the translational state error, and the extended state. The flight status data of the UAV and the initial control input of the flight control actuator are obtained, wherein the flight status data includes position, attitude and velocity; Based on the flight state data, the initial control quantity, and the error dynamics model, the state estimate and total disturbance estimate of the UAV are obtained by recursively solving using an extended high-gain observer. The total disturbance estimate is smoothed to obtain a smoothed total disturbance estimate; Determine the first constraint set of the first state variable and the second state variable, and the second constraint set of the initial control quantity. Adjust the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set. Construct the cost function for prediction in the time domain; Based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set, the cost function in the prediction time domain is solved to obtain the optimal control quantity for controlling the UAV.
2. The predictive control method for unmanned aerial vehicles (UAVs) used for inland waterway inspection according to claim 1, characterized in that, The process of obtaining the state estimate and total disturbance estimate of the UAV by recursively solving using an extended high-gain observer based on the flight state data, the initial control quantity, and the error dynamics model includes: The error dynamics model is then converted into an error dynamics model for a singular perturbation structure. The extended high-gain observer uses the flight state data as feedback input and the initial control quantity as feedforward input to recursively solve the error dynamics model of the singular perturbation structure, thereby obtaining the state estimate and total disturbance estimate of the UAV.
3. The predictive control method for unmanned aerial vehicles (UAVs) used for inland waterway inspection according to claim 1, characterized in that, The smoothing process for the total disturbance estimate to obtain a smoothed total disturbance estimate includes: Obtain a preset set of maximum disturbances, and limit the total disturbance estimate to the range of the set of maximum disturbances using a projection operator to obtain the projected disturbance estimate. The projected disturbance estimate is weighted and fused with the corresponding historical smoothed total disturbance estimate to obtain the smoothed total disturbance estimate at the current time.
4. The UAV predictive control method for inland waterway inspection according to claim 1, characterized in that, The step of adjusting the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set includes: The state adjustment and control adjustment are determined based on the smoothed total disturbance estimate, wherein the state adjustment and control adjustment are positively correlated with the smoothed total disturbance estimate. The constraint interval of the first constraint set is adjusted according to the state adjustment amount to obtain the adjusted first constraint set; The constraint interval of the second constraint set is adjusted according to the control adjustment amount to obtain the adjusted second constraint set.
5. The predictive control method for unmanned aerial vehicles (UAVs) used for inland waterway inspection according to claim 1, characterized in that, The step of solving the predicted time-domain cost function based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set to obtain the optimal control quantity for controlling the UAV includes: Determine the first-order optimality condition of the predicted time-domain cost function; Based on the first-order optimality condition, the optimization solution of the prediction time-domain cost function is transformed into a first-order gradient dynamic system. The estimated state value is used as the initial state variable of the first-order gradient dynamic system. The first-order gradient dynamic system is recursively solved using the adjusted first constraint set and the adjusted second constraint set as constraints to obtain the optimal control quantity of the UAV.
6. A predictive control device for unmanned aerial vehicles (UAVs) used for inland waterway inspection, characterized in that, The device includes: The model decoupling module is used to establish a non-affine dynamics model of the UAV and decouple the non-affine dynamics model into a rotational dynamics subsystem and a translational motion subsystem. An error dynamics model construction module is used to obtain the first state variables of the rotational dynamics subsystem and the second state variables of the translational dynamics subsystem, and to construct an error dynamics model based on the first and second state variables. The first state variables include a first attitude angle and a first angular velocity, and the second state variables include a first position and a first linear velocity. Constructing the error dynamics model based on the first and second state variables includes: obtaining preset desired trajectory data, wherein the desired trajectory data includes a second position, a second linear velocity, and a second attitude angle; calculating the difference between the first and second attitude angles to obtain the attitude angle error; and then... The first angular velocity is multiplied by a preset rotational error coefficient to obtain a weighted angular velocity error; based on the attitude angle error and the weighted angular velocity error, the rotational state error of the rotational dynamics subsystem is obtained; the difference between the first position and the second position is calculated to obtain the position error; the difference between the first linear velocity and the second linear velocity is multiplied by a preset translational error coefficient to obtain a weighted linear velocity error; based on the position error and the weighted linear velocity error, the translational state error of the translational dynamics subsystem is obtained; the total disturbance of the UAV is taken as an extended state, and an error dynamics model is constructed based on the rotational state error, the translational state error, and the extended state; The data acquisition module is used to acquire the flight status data of the UAV and the initial control input of the flight control actuator, wherein the flight status data includes position, attitude, and velocity; The estimation module is used to obtain the state estimate and total disturbance estimate of the UAV by recursively solving the flight state data, the initial control quantity and the error dynamics model through an extended high-gain observer. A smoothing module is used to smooth the total disturbance estimate to obtain a smoothed total disturbance estimate. The constraint set adjustment module is used to determine the first constraint set of the first state variable and the second state variable and the second constraint set of the initial control quantity, and adjust the first constraint set and the second constraint set according to the smoothed total disturbance estimate to obtain the adjusted first constraint set and the adjusted second constraint set. The cost function building module is used to construct the cost function for the prediction time domain; The cost function solving module is used to solve the cost function in the prediction time domain based on the state estimate, the adjusted first constraint set, and the adjusted second constraint set to obtain the optimal control quantity for controlling the UAV.
7. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the UAV predictive control method for inland waterway inspection as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the UAV predictive control method for inland waterway inspection as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the UAV predictive control method for inland waterway inspection as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Four-rotor unmanned aerial vehicle predetermined performance control method based on disturbance observer
CN116225043A
Input-limited and coupling-output-limited quadrotor unmanned aerial vehicle motion control method and system based on extended state observer
CN121501006A
Quadrotor unmanned aerial vehicle control method integrating terminal-constraint-free model predictive control and sliding mode control
CN121541680A