Railway unmanned aerial vehicle adaptive ground effect flight control method and system fusing multi-source terrain data
Patent Information
- Application Number
- CN202610771600.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2046-06-01
AI Technical Summary
[0007]现有技术中,铁路无人机巡检面临地形感知受限、动力学模型失配及复杂环境适应性差等问题
[0027] Compared with existing technologies, this invention has the following significant advantages: By introducing track path centerline constraints and a Bayesian fusion framework, interference from irrelevant ground features along the railway is effectively eliminated, and the generated reference height surface better conforms to the geometric characteristics of the railway corridor. Online estimation of rotational inertia changes using EKF, combined with Gaussian processes for data-driven compensation of unmodeled dynamics, solves the model mismatch problem caused by load changes and aerodynamic parameter perturbations. The innovative GP-L1-NMPC architecture retains the NMPC's ability to handle multi-constraint optimization while incorporating the L1 adaptive control's ability to quickly compensate for uncertainties, significantly improving flight safety and trajectory tracking accuracy in complex environments.
Smart Images

Figure CN122284626B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the cross-technical field of unmanned aerial vehicle (UAV) control technology and intelligent railway inspection, specifically to an adaptive terrain-following flight control method and system for railway UAVs that integrates multi-source terrain data. Background Technology
[0002] With the continuous expansion of high-speed railway networks, automated inspection of railway lines using drones has become an important means of ensuring operational safety. Traditional drone inspections mostly employ a fixed-altitude flight mode, which is difficult to adapt to the complex terrain along railway lines (such as mountains, bridges, and tunnel entrances), easily leading to image distortion or collisions with obstacles. Although terrain-matching-based ground-following flight technology has emerged, it still has significant shortcomings in specific railway scenarios:
[0003] First, terrain perception suffers from blind spots and noise. Existing technologies mostly rely on a single sensor (such as lidar or millimeter-wave radar), making it difficult to accurately identify the elevation of existing railway lines, overhead contact line supports, and slope vegetation within railway corridors. Especially in narrow railway corridors, interference from irrelevant features (such as surrounding trees and buildings) can distort the generated reference height surface, and there is a lack of effective filtering mechanisms for railway track geometric constraints.
[0004] Secondly, the dynamic model has poor adaptability. When the UAV carries different inspection payloads (such as high-definition gimbals and infrared cameras), its moment of inertia and center of mass position will change significantly. Existing control methods mostly use dynamic models with fixed parameters, which cannot estimate the changes in inertia online, resulting in decreased control accuracy under load disturbances, or even instability.
[0005] Secondly, the robustness and predictive ability of the control algorithm are insufficient. Traditional nonlinear model predictive control (NMPC) relies on accurate mathematical models and is extremely sensitive to unmodeled dynamics (such as sudden wind disturbances and aerodynamic parameter perturbations); while simple L1 adaptive control often struggles to balance real-time performance and global optimization capabilities when dealing with complex terrain constraints and high-dimensional state spaces resulting from multi-source data fusion.
[0006] Therefore, there is an urgent need for an adaptive terrain-following flight control scheme that can integrate multi-source terrain data, has online parameter identification capabilities, and can cope with model uncertainties, in order to solve the problem of UAV safety inspection in complex railway environments. Summary of the Invention
[0007] In existing technologies, railway drone inspection faces challenges such as limited terrain perception, mismatched dynamic models, and poor adaptability to complex environments. Specifically, a single sensor struggles to accurately remove interfering features within narrow railway corridors; rotational inertia perturbations caused by drone load variations lead to decreased control accuracy; and traditional predictive control algorithms struggle to simultaneously address real-time compensation for unmodeled dynamics (such as sudden gusts and aerodynamic parameter changes) and trajectory optimization under nonlinear constraints. This invention aims to provide a robust, terrain-following flight control scheme capable of online model correction, fusion of multi-source constrained terrain data, and strong performance.
[0008] In a first aspect, embodiments of this application provide an adaptive terrain-following flight control method for railway unmanned aerial vehicles (UAVs) that integrates multi-source terrain data, the method comprising:
[0009] A preset initial dynamic model of the UAV is established, and the change in rotational inertia is estimated online using an extended Kalman filter. The initial dynamic model is then dynamically corrected to obtain a dynamic baseline model.
[0010] Simultaneously acquire airborne lidar point cloud, airborne binocular vision depth map and railway line database elevation data, perform registration and cropping with the centerline of the track path as constraint, and generate a ground-following flight reference altitude surface that takes into account the geometric constraints of the railway track.
[0011] Based on the curvature of the surface, a vertical terrain following trajectory and a horizontal obstacle avoidance buffer trajectory are planned, and the expected value of the dynamic yaw angle is calculated based on the tangent direction of the track path.
[0012] Based on the aforementioned dynamic baseline model, Gaussian process regression is used to learn aerodynamic parameter perturbations and unmodeled dynamics and embed them into the prediction equation of the nonlinear model predictive controller to form a Gaussian process enhanced prediction model. At the same time, an L1 adaptive law is introduced into the objective function to compensate for the remaining uncertainty online. The controller adopts an inner and outer loop cascade architecture.
[0013] The outer loop position controller solves the optimal control sequence based on the Gaussian process enhanced prediction model, outputs the total lift and virtual level control quantities, and combines the dynamic yaw angle expectation value to solve for the desired roll angle and pitch angle; the inner loop attitude controller tracks the desired attitude angle based on the same model and L1 adaptive law and outputs the three-axis torque control quantities.
[0014] The total lift and three-axis torque control quantities are mapped into rotor speed commands through a pseudo-inverse distribution matrix, driving the UAV to perform low-altitude autonomous terrain-following flight along the curved surface, and the distance between the UAV and railway facilities is monitored in real time. When the distance is lower than a preset safety threshold, the trajectory replanning in step three is triggered to maintain a safe distance.
[0015] Secondly, embodiments of this application provide an adaptive terrain-following flight control system for railway unmanned aerial vehicles (UAVs) that integrates multi-source terrain data, applied to the adaptive terrain-following flight control method for railway UAVs that integrates multi-source terrain data as described in the first aspect. The system includes:
[0016] The model correction module is used to establish a preset initial dynamic model of the UAV, use an extended Kalman filter to estimate the change in moment of inertia online, and dynamically correct the initial dynamic model to obtain a dynamic baseline model.
[0017] The terrain fusion module is used to simultaneously acquire airborne lidar point clouds, airborne binocular vision depth maps, and railway line database elevation data. It performs registration and cropping with the centerline of the track path as a constraint to generate a terrain-following flight reference altitude surface that takes into account the geometric constraints of the railway track.
[0018] The trajectory planning module is used to plan the vertical terrain following trajectory and the horizontal obstacle avoidance buffer trajectory based on the curvature of the surface, and to calculate the expected value of the dynamic yaw angle based on the tangent direction of the trajectory path.
[0019] The controller module is used to learn and embed aerodynamic parameter perturbations and unmodeled dynamics into the prediction equation of the nonlinear model predictive controller based on the dynamic baseline model using Gaussian process regression, forming a Gaussian process enhanced prediction model. At the same time, an L1 adaptive law is introduced into the objective function to compensate for the remaining uncertainty online. The controller adopts an inner and outer loop cascade architecture.
[0020] The inner and outer loop coordinated control module is used to enable the outer loop position controller to solve the optimal control sequence based on the Gaussian process enhanced prediction model, output the total lift and virtual level control quantity, and combine the dynamic yaw angle expectation value to solve the expected roll angle and pitch angle; and enable the inner loop attitude controller to track the expected attitude angle based on the same model and L1 adaptive law and output the three-axis torque control quantity.
[0021] The execution and safety module is used to map the total lift and three-axis torque control quantities into rotor speed commands through a pseudo-inverse distribution matrix, drive the UAV to perform low-altitude autonomous terrain-following flight along the curved surface, and monitor the distance between the UAV and railway facilities in real time. When the distance is lower than a preset safety threshold, the trajectory planning module is triggered to perform trajectory replanning to maintain a safe distance.
[0022] Thirdly, embodiments of this application provide an electronic device, including:
[0023] processor;
[0024] Memory used to store processor-executable instructions;
[0025] The processor is configured to implement the adaptive terrain-following flight control method for railway unmanned aerial vehicles that integrates multi-source terrain data as described in the first aspect when executing the instructions.
[0026] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program that instructs a device to execute the adaptive terrain-following flight control method for railway unmanned aerial vehicles that integrates multi-source terrain data as described in the first aspect.
[0027] Compared with existing technologies, this invention has the following significant advantages: By introducing track path centerline constraints and a Bayesian fusion framework, interference from irrelevant ground features along the railway is effectively eliminated, and the generated reference height surface better conforms to the geometric characteristics of the railway corridor. Online estimation of rotational inertia changes using EKF, combined with Gaussian processes for data-driven compensation of unmodeled dynamics, solves the model mismatch problem caused by load changes and aerodynamic parameter perturbations. The innovative GP-L1-NMPC architecture retains the NMPC's ability to handle multi-constraint optimization while incorporating the L1 adaptive control's ability to quickly compensate for uncertainties, significantly improving flight safety and trajectory tracking accuracy in complex environments. Attached Figure Description
[0028] Figure 1 This is a schematic flowchart of an adaptive terrain-following flight control method for railway unmanned aerial vehicles that integrates multi-source terrain data, provided as an embodiment of this application.
[0029] Figure 2 This is a diagram illustrating the architecture of an adaptive terrain-following flight control system for a railway unmanned aerial vehicle (UAV) that integrates multi-source terrain data, provided in one embodiment of this application.
[0030] Figure 3 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0032] It should be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. 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 in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0033] Based on the embodiments described in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] Example 1
[0035] Figure 1 This is a schematic flowchart illustrating an adaptive terrain-following flight control method for railway unmanned aerial vehicles (UAVs) that integrates multi-source terrain data, as provided in an embodiment of this application. Figure 1 As shown, an adaptive terrain-following flight control method for railway unmanned aerial vehicles (UAVs) that integrates multi-source terrain data includes:
[0036] S1. Establish a preset initial dynamic model for the UAV, and use an extended Kalman filter to estimate the change in rotational inertia online and dynamically correct the initial dynamic model to obtain a dynamic baseline model. This step mainly addresses the control inaccuracy problem caused by changes in the center of gravity and weight distribution after the UAV has its battery replaced or different inspection equipment (such as zoom cameras or LiDAR) mounted. By introducing an extended Kalman filter, the system no longer relies on factory-preset fixed parameters, but instead senses and calculates the current change in inertia in real time, ensuring that subsequent flight control is based on an accurate physical model.
[0037] Specifically, in this embodiment, the step of using an extended Kalman filter to estimate the change in moment of inertia online and dynamically correct the initial dynamic model includes:
[0038] S1.1 Incorporating the moment of inertia parameter as an augmented state variable into the UAV's state-space equations to construct an augmented system that meets the estimation requirements in terms of observability. In this embodiment, to address the issue of changes in the center of gravity and inertia caused by the UAV carrying different inspection equipment (such as infrared cameras or lidar), the system no longer uses fixed physical parameters. We expanded the original state-space equations describing the UAV's position, velocity, and attitude, adding the moment of inertia, representing the UAV's rotational inertia, as a variable to the equations, thus constructing an augmented system. Simultaneously, through analysis of the system matrix, we ensured that the system meets the observability requirements, meaning that by observing the UAV's trajectory and sensor data, the current moment of inertia value can be uniquely determined, laying the foundation for subsequent accurate estimation.
[0039] S1.2. Utilizing the prediction step of the Extended Kalman Filter (EKF), the prior state and prior error covariance at the current moment are predicted based on the state estimate and control input from the previous moment. In this embodiment, the system begins operation using the EKF (a mainstream estimation algorithm for handling nonlinear systems). At the beginning of each control cycle, the algorithm substitutes the updated UAV state (such as position, velocity, attitude, and moment of inertia) from the previous moment and the currently input motor speed command into the dynamic model for calculation. This step, called the prediction step, outputs a prior state (i.e., the current state inferred based on physical common sense) and a prior error covariance (i.e., the range of uncertainty in this inference), preparing for subsequent actual measurement comparisons.
[0040] Let the augmented state vector of the UAV be... ,in Position in the world coordinate system For linear velocity, For attitude quaternions, The angular velocity of the machine body. Let the rotational inertia be three axes to be estimated. The prediction and correction steps of the EKF are described by the following formulas:
[0041] EKF prediction steps:
[0042] ,
[0043] ,
[0044] in, For the first The prior state estimate (predicted value) of the step includes position, velocity, attitude, angular velocity and moment of inertia; The nonlinear state transition function of the UAV is the dynamic equation discretized by the fourth-order Runge-Kutta method. For the first -1 step posterior state estimation (previous cycle optimal value). For the first -1 step of control input (rotor speed command); For the first The prior error covariance matrix of the step represents the uncertainty of the predicted state; The state transition Jacobian matrix; For the first -1 step posterior error covariance matrix; This is the process noise covariance matrix, reflecting the uncertainty of the model itself.
[0045] Within each control cycle (sampling time Δt = 20ms), the onboard computer reads the optimal state estimate from the previous cycle. With current control commands Substituting into the discretized dynamic equation In this process, the prior state of the current period is obtained by numerical integration using either the forward Euler method or the fourth-order Runge-Kutta method. Simultaneously calculate the state transition Jacobian matrix. Update the prior error covariance matrix .
[0046] EKF calibration steps:
[0047] ,
[0048] ,
[0049] ,
[0050] in, The Kalman gain matrix determines the fusion weights between the predicted and measured values; To observe the Jacobian matrix; To measure the noise covariance matrix; This is the actual measurement vector; It is a nonlinear observation function; For the first The posterior state estimate (output) of the step is used to extract the estimated value of the moment of inertia. ; For the first The posterior error covariance matrix of the first step is used for the prediction step in the next cycle.
[0051] The angular velocity and acceleration data measured by the airborne IMU are used to construct the observation vector. Substitute into the above formula to calculate the Kalman gain. The prior state is weighted and corrected using the observed residuals (measured values minus predicted values) to obtain the posterior state estimate. ;from Direct extraction from The component, as the estimated value of the moment of inertia under the current load condition, overwrites the nominal value in the initial dynamic model to obtain the dynamic baseline model.
[0052] S1.3. Utilizing the extended Kalman filter correction step, the system fuses real-time angular velocity and acceleration data collected by the airborne inertial measurement unit (IMU), calculates the Kalman gain, updates the posterior state estimate and posterior error covariance, and extracts the estimated value of the change in moment of inertia. In this embodiment, the system initiates a correction step to correct prediction bias. The airborne IMU provides real-time feedback on the actual angular velocity and acceleration felt by the UAV. The algorithm compares the predicted value with the actual measured value, dynamically fusing the two information by calculating the Kalman gain (a weighting coefficient used to balance the reliability of the predicted and measured values). If the measured value shows that the UAV is rotating slower than expected (indicating an increase in inertia), the system adjusts accordingly, outputs an updated posterior state estimate, and simultaneously reduces the posterior error covariance, ultimately extracting the accurate change in moment of inertia from this updated state.
[0053] S1.4. Based on this estimated value, the moment of inertia matrix in the initial dynamic model is corrected online to obtain a dynamic baseline model adapted to the current load state and flight conditions. In this embodiment, the system feeds back the estimated change in moment of inertia from the previous step to the core control model of the UAV in real time. Specifically, the initially set moment of inertia matrix is replaced with the newly estimated value. This online correction mechanism ensures that regardless of the weight of the equipment carried or the shift in the center of gravity, the internal dynamic baseline model of the UAV can reflect the current real physical characteristics in real time, thereby eliminating control lag or oscillation caused by model mismatch and ensuring high precision and high stability of subsequent flight control.
[0054] S2. Simultaneously acquire airborne LiDAR point cloud, airborne binocular vision depth map, and railway line database elevation data. Register and crop the data using the track centerline as a constraint to generate a terrain-following flight reference altitude surface that takes into account the geometric constraints of the railway track. This step aims to endow the UAV with route recognition and obstacle avoidance capabilities. Unlike ordinary field flights, this method forcibly limits the perception range to the safety buffer zone on both sides of the railway track, automatically filtering out interference from distant mountains or irrelevant buildings. By fusing the geometric accuracy of the LiDAR with the texture details of the binocular vision, the system constructs a high-precision digital map of the aerial corridor that conforms to the railway track and takes into account ground features such as overhead contact line posts.
[0055] Specifically, in this embodiment, the registration and clipping based on the centerline of the track path as a constraint includes:
[0056] S2.1 Extract the three-dimensional spatial coordinate sequence of the track centerline from the railway line database as a spatial reference system. In this embodiment, the system first calls the pre-stored railway basic geographic information data (GIS) to accurately read the three-dimensional coordinates (including longitude, latitude, and elevation) of the track centerline. This invisible digital track line is defined as the general reference for all subsequent data processing. By strictly aligning the physical track in the real world with the digital coordinate sequence, the system establishes a spatial reference system specific to the current railway segment, ensuring that all perceived data can be interpreted within this unified framework, thereby avoiding positioning errors caused by coordinate system confusion.
[0057] S2.2. The airborne lidar point cloud data and airborne binocular vision depth map are converted to the spatial reference frame. A lateral buffer width threshold, perpendicular to the track extension direction and centered on the track centerline, is set. Point cloud and depth data of non-railway corridor features located outside this threshold range are removed. In this embodiment, the system streamlines the massive amount of data collected. The airborne lidar and binocular camera capture a wide range, often including distant mountains, trees, or buildings, which are interference information for railway inspection. The system sets a reasonable lateral safety distance (i.e., a buffer width threshold, for example, 20 meters on each side) centered on the track centerline. Any point cloud or depth data falling outside this threshold range is considered non-corridor features and removed, retaining only the terrain data of the area adjacent to the railway track. This greatly reduces the complexity of subsequent calculations and improves targeting.
[0058] S2.3. The retained registration data is segmented and organized according to track mileage markers to form a constrained terrain data sequence continuously distributed along the track path. In this embodiment, the pruned clean data is further structured. The system slices and archives the data according to the railway's unique mileage markers (such as K100+500), organizing scattered point cloud and image data into continuous data packets extending along the track. This constrained terrain data sequence organized by mileage not only allows the UAV to clearly know which section of track it is currently on, but also ensures that the flight trajectory is strictly constrained by the track geometry, providing an ordered data foundation for generating high-precision terrain-following flight surfaces.
[0059] The generation of the geomorphic flight reference altitude surface that takes into account the geometric constraints of the railway track specifically includes:
[0060] S2.4. Map the registered and cropped LiDAR point cloud and binocular vision depth map onto a track coordinate system with track mileage as the horizontal axis and lateral offset as the vertical axis. In this embodiment, the system flattens the previously processed jumbled data onto a two-dimensional map. This map does not use traditional latitude and longitude coordinates, but instead adopts a railway-specific track coordinate system: the horizontal axis (X-axis) represents the mileage traveled along the track, and the vertical axis (Y-axis) represents the left and right offset distance perpendicular to the center of the track. By projecting the LiDAR point cloud and binocular vision depth map onto this coordinate system, the originally three-dimensional spatial data is converted into a standard terrain grayscale map, facilitating subsequent gridded numerical processing.
[0061] S2.5. A Bayesian probabilistic fusion framework is adopted to fuse elevation observations from multiple sources within the same spatial grid cell. The posterior probability distribution of elevation for each grid cell is calculated, and the expected value of this distribution is used as the optimal elevation estimate for that cell. In this embodiment, the system utilizes a Bayesian probabilistic fusion framework (a data fusion algorithm based on statistical probability) to resolve discrepancies between sensors. For the same grid cell on the map, the LiDAR might measure a height of 10.1 meters, while binocular vision might measure 9.9 meters. The system does not simply average the measurements; instead, it calculates the posterior probability distribution of the grid cell's height based on the current environmental confidence levels of both sensors (e.g., reducing visual weight in poor lighting conditions). Finally, the value with the highest probability (i.e., the expected value) is selected as the most reliable height value for that point, thus combining the geometric accuracy of the LiDAR with the textural detail of the vision.
[0062] S2.6. The elevation estimates of adjacent grid cells are smoothed and filtered along the track extension direction to eliminate outlier noise points and generate a ground-following flight reference elevation surface that changes continuously along the track path and takes into account the track geometric constraints. This surface shows a gradual change trend in the direction perpendicular to the track.
[0063] In this embodiment, to prevent abrupt changes in terrain data (such as a sudden jump in altitude caused by a noise point), the system performs smoothing filtering on the data of adjacent grids along the track direction. This is similar to filtering out outliers that do not conform to physical laws. Ultimately, the system generates a continuous and smooth terrain-following flight reference altitude surface. This surface not only strictly conforms to the actual terrain undulations of the railway but also exhibits a gentle gradient in the lateral direction, ensuring that the UAV's flight trajectory does not experience severe turbulence when crossing the track or avoiding obstacles.
[0064] S3. Based on the curvature of the surface, a vertical terrain-following trajectory and a horizontal obstacle-avoidance buffer trajectory are planned. The expected value of the dynamic yaw angle is calculated based on the tangent direction of the track path. The expected values of roll and pitch attitude are calculated in real time by the subsequent outer-loop position controller based on the tracking error. This step is equivalent to the navigator of the drone, responsible for formulating specific flight strategies. It not only determines the flight altitude based on the terrain undulations (to prevent collisions with mountains or the ground), but also automatically calculates the safe distance for outward deviation at curves (to prevent side collisions), and dynamically adjusts the direction of the drone's nose according to the curvature of the road surface to ensure that the drone always smoothly enters along the direction of the railway track, avoiding loss of control due to sharp turns.
[0065] Specifically, in this embodiment, the step of planning the vertical terrain following trajectory and the horizontal obstacle avoidance buffer trajectory based on the surface curvature, and calculating the expected value of the dynamic yaw angle based on the tangent direction of the track path, specifically includes:
[0066] S3.1 Perform second-order differential calculations on the ground-following flight reference altitude surface along the trajectory extension direction to extract the curvature values at each mileage point.
[0067] In this embodiment, the system performs a refined mathematical analysis of the generated terrain-following flight reference altitude surface. By performing second-order differential calculations on the surface morphology along the trajectory extension direction (i.e., calculating the second derivative of the curve), the system can quantify the curvature of the terrain, i.e., the curvature value. This is analogous to determining whether a road has a sharp turn or a gentle slope; a larger curvature value indicates more dramatic terrain changes (such as the entrance / exit of a tunnel or the approach section of a bridge across a river), providing data support for subsequent differentiated flight strategies.
[0068] S3.2. Based on the curvature value, the vertical terrain-following altitude command is calculated in real time, enabling the UAV to automatically reduce its flight speed and increase the damping coefficient for altitude tracking in sections with drastic curvature changes, and increase its flight speed and decrease the damping coefficient for altitude tracking in sections with gentle curvature. In this embodiment, the system achieves terrain-adaptive vertical flight control. On complex road sections with large curvature, the UAV, like a car entering a curve, automatically slows down to ensure safety, while increasing the damping coefficient (a parameter to suppress oscillations) to prevent severe vertical shaking caused by sudden terrain changes; while on straight road sections with gentle curvature, the UAV is allowed to increase its cruising speed and decrease damping, thereby achieving efficient and stable inspection operations.
[0069] S3.3 Simultaneously, based on the curvature value and the current lateral offset of the UAV, a horizontal obstacle avoidance buffer trajectory is calculated, causing the UAV to automatically deviate a preset safe distance towards the outer rail at curves. In this embodiment, the system specifically designs a horizontal obstacle avoidance strategy. Considering that there are usually catenary supports or signal equipment at railway curves, simply flying along the centerline carries a collision risk. Therefore, the system combines the curvature value and the current lateral position to calculate an obstacle avoidance buffer trajectory, controlling the UAV to automatically deviate a preset safe distance towards the outside of the curve (outer rail direction) when turning, thereby physically moving away from obstacles beside the track.
[0070] S3.4. Using the tangent direction of the orbital path centerline at each mileage point as a reference, calculate the expected angle between the UAV's nose and this tangent direction. Then, dynamically adjust this expected angle based on the current flight speed to generate a dynamic yaw angle expectation that ensures the UAV always faces the orbital path's forward direction. In this embodiment, the system solves the problem of dynamic yaw angle planning for the UAV. It calculates the appropriate nose direction (yaw angle) of the UAV based on the extension direction (tangent direction) of the orbital centerline. Specifically, the system introduces a feedforward control concept: when the flight speed is high, the UAV will appropriately advance its rudder (increasing the expected angle) to cope with inertial lag at high speeds; when the speed is low, the angle will decrease. This dynamic adjustment ensures that the UAV can accurately cut corners at any speed and always fly in the forward direction.
[0071] S4. Based on the aforementioned dynamic baseline model, Gaussian process regression is used to learn aerodynamic parameter perturbations and unmodeled dynamics, embedding them into the prediction equations of the nonlinear model predictive controller to form a Gaussian process enhanced prediction model. Simultaneously, an L1 adaptive law is introduced into the objective function to compensate for remaining uncertainties online. The controller adopts an inner and outer loop cascaded architecture. This is the brain of the entire system, responsible for combining the physical model with artificial intelligence. It uses Gaussian processes (GP) to learn complex factors such as air resistance that cannot be calculated by traditional formulas, while introducing an L1 adaptive law specifically to cope with extreme disturbances such as gusts of wind. This dual-protection mechanism ensures that the controller can make accurate long-term plans and respond instantly to emergencies when facing unknown environments.
[0072] Specifically, in this embodiment, the step of using Gaussian process regression to learn aerodynamic parameter perturbations and unmodeled dynamics and embedding them into the prediction equation of the nonlinear model predictive controller to form a Gaussian process enhanced prediction model specifically includes:
[0073] S4.1. Using the UAV's flight state parameters, including linear velocity, attitude angle, and control inputs, as input variables, and the residual between the actual flight acceleration and the theoretical acceleration calculated by the dynamic baseline model as the output variable, a training dataset is constructed by collecting multiple sets of flight state data. In this embodiment, the system adopts a data-driven approach to compensate for the deficiencies of the physical model. We use the UAV's current flight state (such as speed, tilt angle, and throttle position) as input, and the error (i.e., residual) between the actual acceleration and the theoretically calculated value as output. By recording this data under various flight conditions, a large training set is constructed. This process is like recording the gap between the actual performance of the UAV under different attitudes and the theoretical expectations, accumulating experience for subsequent intelligent compensation.
[0074] S4.2. Using radial basis functions as kernel functions, Gaussian process regression models are independently trained in the X, Y, and Z axes to learn aerodynamic parameter perturbations and unmodeled dynamic characteristics in each axis. In this embodiment, the system utilizes Gaussian process regression (a machine learning algorithm adept at handling small samples and nonlinear relationships) to uncover patterns behind the data. Radial basis functions are selected as the core computational tool to establish independent prediction models for the UAV's forward / backward (X-axis), left / right (Y-axis), and up / down (Z-axis) directions. The advantage of this approach is that it can accurately capture the unique aerodynamic characteristics in each direction (for example, the air resistance during forward flight is completely different from the wind disturbance characteristics during lateral hovering).
[0075] Let the linear velocity of the UAV in the body coordinate system be... The theoretical acceleration calculated by the dynamic baseline model is The actual flight acceleration is Then the acceleration residuals of each axis With linear velocity There exists a nonlinear mapping relationship, which is modeled by Gaussian process regression as follows:
[0076] ,
[0077] ,
[0078] superscript This represents the axes of three independent training operations. for Axial acceleration residual (GP output); For Gaussian processes, for The mean function of the axis; for The kernel function (covariance function) of the axis measures the variance between two inputs. and Similarity; for The signal variance of the axis reflects the range of variation in the output amplitude. for The noise variance of the shaft reflects the uncertainty of measurement noise; For the Kronecker delta function, when = Set the value to 1 if the condition is met, otherwise set it to 0. (Data collection) Group flight data, input matrix Output vector During the offline training phase, hyperparameters are optimized by maximizing the logarithmic marginal likelihood function. , and After training, for the new linear velocity... The GP model's prediction mean is:
[0079] ,
[0080] in, This is the kernel function value vector of the test point and all training points. This is the kernel function matrix between training points. The predicted mean... As an aerodynamic compensation, it is directly superimposed into the NMPC prediction equation.
[0081] S4.3. The predicted mean of the trained Gaussian process regression model is used as a pre-compensation term and superimposed on the discretized state prediction equation of the nonlinear model predictive controller. This enables the prediction equation to compensate for unmodeled dynamics based on the original mechanics model, forming a Gaussian process enhanced prediction model. The Gaussian process enhanced prediction model outputs the corresponding aerodynamic compensation amount in real time according to the current linear velocity of the aircraft in each prediction time domain. In this embodiment, a deep integration of AI learning and physical control is achieved. The system uses the trained Gaussian model as an intelligent compensator, directly embedding it into the core calculation formula of the nonlinear model predictive controller (NMPC). Whenever the controller predicts the flight trajectory a few seconds into the future, it no longer relies solely on rigid physical formulas but adds the compensation amount given by the Gaussian model in real time. This gives the entire prediction model the ability to predict in advance, anticipating deviations caused by airflow or parameter changes, thus forming a Gaussian process enhanced prediction model that understands both physical principles and practical experience.
[0082] The introduction of an L1 adaptive law into the objective function to compensate for the remaining uncertainty online specifically includes:
[0083] S4.4 Construct an L1 adaptive state predictor based on the Gaussian process augmentation prediction model. This predictor runs in parallel with the actual UAV system to estimate the error between the system state and the predictor state. In this embodiment, the system establishes a shadow model, namely the L1 adaptive state predictor. This predictor uses the previously optimized Gaussian process augmentation model to simulate the UAV's flight state at the software level. It acts like a parallel simulated cockpit, receiving control commands and simulating flight in real time. By calculating the difference between the predictor state and the actual state, the system can capture the deviation between the two in real time. This deviation is the key indicator for measuring whether the model is deviating from its intended path.
[0084] S4.5. A piecewise constant adaptive law is employed to estimate the matching uncertainty and mismatch uncertainty acting on the system online based on the state error within each sampling period. This piecewise constant adaptive law significantly reduces the state prediction error of the previous period. In this embodiment, the system uses the piecewise constant adaptive law to handle the state error obtained in the previous step. This algorithm divides continuous time into sampling periods. Within each period, it decomposes the error into matching uncertainty (interference that can directly affect the system through control input) and mismatch uncertainty (interference that cannot be directly affected by control input, such as center of gravity shift). In this way, the algorithm can quickly adjust parameters to ensure that the prediction error is significantly suppressed when the next period arrives, thereby achieving a rapid response to sudden disturbances.
[0085] S4.6 The estimated matching uncertainty is filtered using a first-order low-pass filter to remove high-frequency noise introduced during the estimation process. The filtered output is then superimposed on the nominal control quantity output by the nonlinear model predictive controller as the L1 adaptive control compensation quantity. In this embodiment, a first-order low-pass filter is introduced to prevent the adaptive algorithm from becoming overly sensitive and generating high-frequency jitter. This is like adding a damper to the control signal, allowing only low-frequency, substantial compensation signals to pass through, while filtering out high-frequency glitches caused by sensor noise or calculation errors. The purified signal is then directly superimposed on the original command calculated by the nonlinear model predictive controller (NMPC) as the L1 adaptive compensation quantity, thereby fine-tuning the control quantity at the underlying level.
[0086] S4.7 The cutoff frequency of the first-order low-pass filter is adaptively adjusted according to the sampling time of the hardware platform and the desired robustness, thus separating the estimation accuracy from the system robustness. In this embodiment, the system implements intelligent configuration of filter parameters. Due to the different computational delays and sampling frequencies of different hardware platforms, the system dynamically adjusts the cutoff frequency of the low-pass filter (i.e., the upper limit of the allowed signal frequency). This adaptive adjustment mechanism cleverly achieves decoupling: it ensures that it can keep up with error changes at high sampling rates (ensuring estimation accuracy) and maintains sufficient filtering depth when the system is subjected to strong shocks (ensuring robustness), so that the control performance is no longer limited by a single hardware parameter.
[0087] The Gaussian process-enhanced prediction model is used as the discretized prediction equation for NMPC, while an L1 adaptive law compensation term is embedded in the objective function. Let the NMPC prediction time domain be... Control time domain is -1, the state equation of the discrete system is:
[0088] GP-enhanced discrete-state prediction equations:
[0089] ,
[0090] in, For the first The system status of the step, The mechanism model for discretization of the fourth-order Runge-Kutta method; For the first Step control input; This is the input matrix for the GP compensation term; This represents the aerodynamic compensation amount predicted by the GP model.
[0091] In each control cycle, the NMPC solver reads the current state. Call the GP model based on the current linear velocity of the machine. Real-time calculation of aerodynamic compensation This is used as an additional term in the prediction model to construct the state prediction trajectory for the next N steps.
[0092] NMPC objective function (including L1 compensation):
[0093] ,
[0094] in, For the first The predicted state of the step, For the first The reference trajectory state of the step, For the first The control quantity of the step; For the first The reference control quantity for the step. This is a matrix of state weights, control weights, and terminal weights. This is the matching uncertainty vector estimated by the L1 adaptive law. It is the weighted L2 norm.
[0095] L1 adaptive law matching uncertainty estimation:
[0096] ,
[0097] in, This is the estimated value of the matching uncertainty for the current sampling period. Input matrix to the system, This is the Hurwitz matrix (state predictor gain). The sampling period is It is the identity matrix. This represents the error between the actual state of the system and the state of the predictor.
[0098] In each sampling period Inside, the system obtains the actual status of the drone. With L1 state predictor output Calculate the state error Calculate the estimated matching uncertainty for the current period using the formula described above. Through a first-order low-pass filter (cutoff frequency) =8Hz) after filtering, as an additional compensation term Embedded NMPC objective function. The solver satisfies thrust limiting. With torque limiting Under the given conditions, the optimal control sequence is solved, and the first component is taken as the total lift of the current cycle. With triaxial torque .
[0099] S5. The outer-loop position controller solves for the optimal control sequence based on the Gaussian process augmented prediction model, outputting the total lift and virtual level control quantities, and inversely solves for the desired roll and pitch angles by combining the expected dynamic yaw angle. The inner-loop attitude controller tracks the desired attitude angles based on the same model and L1 adaptive law and outputs three-axis torque control quantities. This step realizes the transformation from decision-making to action. The outer-loop controller acts like a macro-level commander, calculating the position and speed the aircraft should reach based on the planned path, and converting it into the required roll angle; the inner-loop controller acts like a micro-level executor, responsible for finely adjusting the aircraft's roll, pitch, and yaw, ensuring that the fuselage attitude follows the outer-loop commands at the millisecond level, maintaining flight stability.
[0100] Specifically, in this embodiment, step S5 includes:
[0101] S5.1 The outer-loop position controller uses the Gaussian process augmentation prediction model as the prediction equation for rolling optimization, and uses the vertical terrain following trajectory, the horizontal obstacle avoidance buffer trajectory, and the expected value of the dynamic yaw angle as the tracking targets. It constructs a quadratic objective function that includes position tracking error and control increment costs. Under the condition of satisfying thrust limiting and attitude angular rate constraints, it solves for the optimal control sequence in the future prediction time domain, and outputs the first component of this sequence as the expected total lift and virtual horizontal control quantity at the current moment. In this embodiment, the outer-loop position controller plays the role of a navigator. It uses the aforementioned Gaussian process augmentation prediction model as a telescope to look ahead to a prediction time domain. The controller attempts to find an optimal control path that allows the UAV to closely follow the previously planned terrain trajectory and yaw angle, while making control actions (such as throttle changes) as smooth and effortless as possible. During the solution process, the system strictly adheres to physical limits (such as maximum thrust and attitude angular rate limits), and finally only extracts the first step of the optimal sequence, converting it into the total lift and virtual horizontal control quantity output required at the current moment.
[0102] S5.2. Based on the virtual horizontal control quantity and the expected dynamic yaw angle, the desired roll angle and desired pitch angle are inversely solved through geometric transformation relationships. Specifically, based on the components of the virtual horizontal control quantity in the X and Y axes of the body coordinate system, the total lift, and the dynamic yaw angle, the desired attitude angles are calculated using trigonometric function relationships. In this embodiment, the system needs to convert the macroscopic instructions given by the navigator into action instructions that the pilot can understand. Since the virtual horizontal control quantity is calculated in the Earth coordinate system, while the UAV attitude is described in the body coordinate system, the system decomposes the horizontal thrust requirement into the nose and wing directions through specific geometric transformation relationships (essentially trigonometric function rotation based on the yaw angle). Combining the current total lift, the system inversely solves how many degrees the UAV needs to tilt forward (pitch angle) and how many degrees it needs to tilt to the side (roll angle), thereby determining the specific body posture of the UAV.
[0103] S5.3 The inner-loop attitude controller is based on the same dynamic baseline model and Gaussian process augmentation prediction model as the outer-loop position controller. It uses the desired roll angle, desired pitch angle, and dynamic yaw angle obtained from the inverse solution as tracking targets, constructs a quadratic objective function of attitude angle tracking error and control cost, and introduces an L1 adaptive law to compensate for the residual uncertainty of the attitude loop online. Under the condition of satisfying the torque amplitude constraint, it solves for the optimal torque sequence and outputs the three-axis torque control quantities for roll, pitch, and yaw. In this embodiment, the inner-loop attitude controller acts as the executor, responsible for executing actions in milliseconds. It is also based on the Gaussian process augmentation model, but its goal is to allow the UAV to instantly reach the attitude angle required by the outer loop. It constructs its own optimization objective, which is not only fast (reducing tracking error) but also stable (low control cost). In particular, it introduces an L1 adaptive law as a compensation mechanism to compensate for attitude control uncertainties caused by airflow or mechanical wear in real time. Finally, it calculates how much rotational torque needs to be applied on the three axes of roll, pitch, and yaw to drive the rotor to respond.
[0104] S6. The total lift and three-axis torque control quantities are mapped into rotor speed commands through a pseudo-inverse distribution matrix, driving the UAV to perform low-altitude autonomous terrain-following flight along the curved surface. The system also monitors the distance between the UAV and railway facilities in real time. When the distance falls below a preset safety threshold, the trajectory replanning in step three is triggered to maintain a safe distance. This is the final hand-footwork action and the role of the safety operator. The system translates abstract control commands into specific rotor speed values for the four rotors, driving the aircraft to fly close to the ground. Simultaneously, it remains vigilant; if it detects that the distance to the railway tracks or facilities is below the safety red line, it immediately triggers an emergency replanning procedure, forcibly pulling up or deviating from the flight path to ensure the safety of both the railway infrastructure and the UAV itself.
[0105] Specifically, in this embodiment, mapping the total lift and three-axis torque control quantities into rotor speed commands via a pseudo-inverse allocation matrix includes:
[0106] S6.1 Establish a control efficiency matrix for the quadcopter UAV. This matrix describes the linear mapping relationship between total lift and the three-axis torques (roll, pitch, and yaw) and the square values of the four rotor speeds. Use the pseudo-inverse method to invert the control efficiency matrix. Combine the total lift control quantity output by the outer loop position controller with the three-axis torque control quantity output by the inner loop attitude controller into a four-dimensional virtual control vector. Map this vector to the square commands of the four rotor speeds through the pseudo-inverse matrix, and then obtain the final speed commands of each rotor through square root operation.
[0107] In this embodiment, the system completes the final conversion from control intent to physical action. First, a control efficiency matrix is established, which acts like a recipe, specifying how much a change in the rotational speed of each rotor will affect the drone's ascent, descent, forward, backward, left, and right movements. Since the quadcopter has four motors but only four control targets (lift + triaxial torque), the system uses a pseudo-inverse method (a mathematical tool for solving multivariable linear mappings) to solve this mapping relationship. The total lift and triaxial torque sent from the upper-level controller are packaged into a four-dimensional vector, and the square value of the rotational speed required for each rotor is calculated using the pseudo-inverse matrix. Finally, the specific rotational speed command (RPM) is obtained through square root operation.
[0108] S6.2. The speed command is sent to the electronic speed controller to drive each rotor motor to generate corresponding thrust and counter-torque, so that the UAV generates a resultant force and resultant torque to fly along the ground-following flight reference altitude surface, and continuously executes the safe distance monitoring and replanning steps during flight.
[0109] In this embodiment, the system sends the calculated rotational speed command to the underlying electronic speed controller (ESC), which drives the motor to rotate at high speed, generating precise aerodynamics. These forces combine to form a resultant force propelling the drone along the curved terrain surface and a resultant torque maintaining attitude stability. Simultaneously, the drone does not fly blindly but continuously executes the previously set safe distance monitoring logic. Once it detects that the distance to the rails or facilities is approaching a danger zone, the system immediately interrupts the current process, rolls back to the trajectory planning step for emergency obstacle avoidance and replanning, thus forming a complete closed-loop safe flight circuit.
[0110] Example 2
[0111] like Figure 2 As shown, this application provides an architecture diagram of an adaptive terrain-following flight control system for railway UAVs that integrates multi-source terrain data. This system is applied to the adaptive terrain-following flight control method for railway UAVs that integrates multi-source terrain data as described in Embodiment 1, and includes:
[0112] The model correction module 210 is used to establish a preset initial dynamic model of the UAV, use an extended Kalman filter to estimate the change in rotational inertia online and dynamically correct the initial dynamic model to obtain a dynamic baseline model.
[0113] The terrain fusion module 220 is used to simultaneously acquire airborne lidar point clouds, airborne binocular vision depth maps, and railway line database elevation data. It performs registration and cropping with the centerline of the track path as a constraint to generate a terrain-following flight reference altitude surface that takes into account the geometric constraints of the railway track.
[0114] The trajectory planning module 230 is used to plan the vertical terrain following trajectory and the horizontal obstacle avoidance buffer trajectory based on the curvature of the surface, and to calculate the expected value of the dynamic yaw angle based on the tangent direction of the track path.
[0115] The controller module 240 is used to form a Gaussian process enhanced prediction model by using Gaussian process regression to learn and embed aerodynamic parameter perturbations and unmodeled dynamics based on the dynamic baseline model and embed them into the prediction equation of the nonlinear model prediction controller. At the same time, an L1 adaptive law is introduced into the objective function to compensate for the remaining uncertainty online. The controller adopts an inner and outer loop cascade architecture.
[0116] The inner and outer loop coordinated control module 250 is used to enable the outer loop position controller to solve the optimal control sequence based on the Gaussian process enhanced prediction model, output the total lift and virtual level control quantity, and combine the dynamic yaw angle expectation value to solve the expected roll angle and pitch angle; and enable the inner loop attitude controller to track the expected attitude angle based on the same model and L1 adaptive law and output the three-axis torque control quantity.
[0117] The execution and safety module 260 is used to map the total lift and three-axis torque control quantities into rotor speed commands through a pseudo-inverse distribution matrix, drive the UAV to perform low-altitude autonomous terrain-following flight along the curved surface, and monitor the distance between the UAV and railway facilities in real time. When the distance is lower than a preset safety threshold, the trajectory planning module is triggered to perform trajectory replanning to maintain a safe distance.
[0118] Figure 3 This is an electronic device provided in one embodiment of this application. For example... Figure 3 As shown, the electronic device includes at least the following components: processor 301 and memory 300, communication interface 303, and bus 302.
[0119] In this embodiment of the application, memory 300 is used to store executable instructions of processor 301, which is configured to implement the method as described in the first aspect when executing instructions.
[0120] In embodiments of this application, a computer-readable storage medium includes instructions that instruct a device to perform the method as described in the first aspect. For example, the instructions instruct the device to perform... Figure 1 The method is shown in the process steps.
[0121] In one embodiment of this application, the program operating in the electronic device may be a program that controls a central processing unit (CPU) or similar device to achieve the functions of the above-described embodiments of the present invention (a program that enables the computer to function). Information processed by these systems is then temporarily stored in random access memory (RAM) during processing, and subsequently stored in various ROMs such as read-only memory (FlashROM) and hard disk drives (HDDs), and read, corrected, and written by the CPU as needed.
[0122] It should be noted that a portion of the electronic device described above can also be implemented using a computer. In this case, the program for implementing the control function can be recorded on a computer-readable recording medium, and the program recorded on the recording medium can be read into the computer and executed.
[0123] It should be noted that the computer mentioned here refers to a computer built into an electronic device, employing hardware including an operating system and peripheral devices. Furthermore, computer-readable recording media refers to removable media such as floppy disks, magneto-optical disks, ROMs, and CD-ROMs, as well as storage systems such as hard drives built into the computer.
[0124] Furthermore, computer-readable recording media can include: media that dynamically stores programs for short periods of time, such as communication lines used when transmitting programs via networks like the Internet or communication lines like telephone lines; and media that store programs for fixed periods of time, such as volatile memory inside a computer that serves as a server or client in this case. In addition, the aforementioned program can be a program used to implement the above-mentioned functions, or it can be a program that can implement the above-mentioned functions by combining them with programs already recorded in the computer.
[0125] Furthermore, the electronic device in the above embodiments can also be implemented as an assembly (system group) composed of multiple systems. Each system constituting the system group can possess some or all of the functions or functional blocks of the electronic device in the above embodiments. As a system group, it is sufficient to have all the functions or functional blocks of the electronic device.
[0126] Those skilled in the art should recognize that the above embodiments are only used to illustrate this application and are not intended to limit this application. Any appropriate changes and variations made to the above embodiments within the essential spirit and scope of this application fall within the scope of protection claimed in this application.
Claims
1. A method for adaptive terrain-following flight control of a railway unmanned aerial vehicle (UAV) that integrates multi-source terrain data, characterized in that, Includes the following steps: A preset initial dynamic model of the UAV is established, and the change in rotational inertia is estimated online using an extended Kalman filter. The initial dynamic model is then dynamically corrected to obtain a dynamic baseline model. Simultaneously acquire airborne lidar point cloud, airborne binocular vision depth map and railway line database elevation data, perform registration and cropping with the centerline of the track path as constraint, and generate a ground-following flight reference altitude surface that takes into account the geometric constraints of the railway track. Based on the curvature of the surface, a vertical terrain following trajectory and a horizontal obstacle avoidance buffer trajectory are planned, and the expected value of the dynamic yaw angle is calculated based on the tangent direction of the track path. Based on the aforementioned dynamic baseline model, Gaussian process regression is used to learn aerodynamic parameter perturbations and unmodeled dynamics and embed them into the prediction equation of the nonlinear model predictive controller to form a Gaussian process enhanced prediction model. At the same time, an L1 adaptive law is introduced into the objective function to compensate for the remaining uncertainty online. The controller adopts an inner and outer loop cascade architecture. The outer loop position controller solves the optimal control sequence based on the Gaussian process enhanced prediction model, outputs the total lift and virtual level control quantities, and combines the dynamic yaw angle expectation value to solve for the desired roll angle and pitch angle; the inner loop attitude controller tracks the desired attitude angle based on the same model and L1 adaptive law and outputs the three-axis torque control quantities. The total lift and three-axis torque control quantities are mapped into rotor speed commands through a pseudo-inverse distribution matrix, driving the UAV to perform low-altitude autonomous terrain-following flight along the curved surface, and the distance between the UAV and railway facilities is monitored in real time. When the distance is lower than a preset safety threshold, the trajectory replanning in step three is triggered to maintain a safe distance.
2. The method according to claim 1, characterized in that, The method of using an extended Kalman filter to estimate the change in moment of inertia online and dynamically correct the initial dynamic model specifically includes: By incorporating the rotational inertia parameter as an augmented state variable into the UAV state space equation, an augmented system whose observability meets the estimation requirements is constructed. Using the prediction step of the extended Kalman filter, the prior state and prior error covariance at the current time are predicted based on the state estimate and control input at the previous time step. By utilizing the correction steps of the extended Kalman filter, the real-time angular velocity and acceleration data collected by the airborne inertial measurement unit are fused to calculate the Kalman gain, update the posterior state estimate and posterior error covariance, and extract the estimated value of the change in moment of inertia from them. Based on this estimate, the moment of inertia matrix in the initial dynamic model is corrected online to obtain a dynamic baseline model that adapts to the current load state and flight conditions.
3. The method according to claim 1, characterized in that, The registration and clipping process, constrained by the centerline of the track path, specifically includes: The three-dimensional spatial coordinate sequence of the track path centerline is extracted from the railway line database and used as a spatial reference system. The airborne lidar point cloud data and the airborne binocular vision depth map are converted to this spatial reference system. With the track path centerline as the axis, a lateral buffer width threshold perpendicular to the track extension direction is set, and non-railway corridor feature point cloud and depth data outside the threshold range are removed. The retained registration data is segmented according to the track mileage station to form a constrained terrain data sequence continuously distributed along the track path.
4. The method according to claim 3, characterized in that, The generation of the geomorphic flight reference altitude surface that takes into account the geometric constraints of the railway track specifically includes: The registered and cropped lidar point cloud and binocular vision depth map are mapped onto an orbital coordinate system with orbital mileage as the horizontal axis and lateral offset as the vertical axis. A Bayesian probabilistic fusion framework is used to fuse elevation observations from multiple sources within the same spatial grid cell, calculate the posterior probability distribution of elevation for each grid cell, and use the expected value of this distribution as the optimal elevation estimate for that cell. The elevation estimates of adjacent grid cells are smoothed and filtered along the orbital extension direction to eliminate outlier noise points, generating a geomorphic flight reference altitude surface that continuously changes along the orbital path and takes into account orbital geometric constraints. This surface exhibits a gradual change trend in the direction perpendicular to the orbit.
5. The method according to claim 1, characterized in that, The process of planning a vertical terrain-following trajectory and a horizontal obstacle avoidance buffer trajectory based on the surface curvature, and calculating the expected value of the dynamic yaw angle based on the tangent direction of the trajectory path, specifically includes: The second-order differential calculation is performed on the reference altitude surface for terrain-following flight along the trajectory extension direction to extract the curvature values at each mileage point. Based on the curvature values, the terrain-following altitude command in the vertical direction is calculated in real time, enabling the UAV to automatically reduce its flight speed and increase the damping coefficient for altitude tracking in sections with drastic curvature changes, and increase its flight speed and decrease the damping coefficient for altitude tracking in sections with gentle curvature. At the same time, based on the curvature values and the current lateral offset of the UAV, the obstacle avoidance buffer trajectory in the horizontal direction is calculated, enabling the UAV to automatically deviate from the outer track direction by a preset safe distance at curves. Using the tangent direction of the trajectory centerline at each mileage point as a reference, the expected value of the angle between the UAV's nose pointing and the tangent direction is calculated, and the expected value of the angle is dynamically adjusted in combination with the current flight speed to generate a dynamic yaw angle expected value that keeps the UAV always facing the direction of travel of the trajectory path.
6. The method according to claim 1, characterized in that, The method of utilizing Gaussian process regression to learn aerodynamic parameter perturbations and unmodeled dynamics and embedding them into the prediction equations of a nonlinear model predictive controller to form a Gaussian process enhanced prediction model specifically includes: Using the flight state parameters of the UAV, including body linear velocity, attitude angle, and control input, as input variables, and the residual between the actual flight acceleration and the theoretical acceleration calculated by the dynamic benchmark model as the output variable, a training dataset is constructed by collecting multiple sets of flight state data. A radial basis function is used as the kernel function to independently train Gaussian process regression models in the X, Y, and Z axes, respectively learning aerodynamic parameter perturbations and unmodeled dynamic characteristics in each axis. The predicted mean of the trained Gaussian process regression model is used as a pre-compensation term and superimposed on the discretized state prediction equation of the nonlinear model predictive controller, enabling the prediction equation to acquire the ability to compensate for unmodeled dynamics based on the original dynamic model, forming a Gaussian process enhanced prediction model. This Gaussian process enhanced prediction model outputs the corresponding aerodynamic compensation amount in real time according to the current body linear velocity in each prediction time domain.
7. The method according to claim 6, characterized in that, The introduction of an L1 adaptive law into the objective function to compensate for the remaining uncertainty online specifically includes: An L1 adaptive state predictor based on the Gaussian process enhanced prediction model is constructed. This predictor runs in parallel with the actual UAV system to estimate the error between the system state and the predictor state. A piecewise constant adaptive law is adopted to estimate the matching uncertainty and mismatch uncertainty acting on the system online based on the state error in each sampling period. The piecewise constant adaptive law can significantly reduce the state prediction error of the previous period. The estimated matching uncertainty is filtered by a first-order low-pass filter to remove high-frequency noise introduced during the estimation process. The filtered output is used as the L1 adaptive control compensation quantity and superimposed on the nominal control quantity output by the nonlinear model predictive controller. The cutoff frequency of the first-order low-pass filter is adaptively adjusted according to the sampling time of the hardware platform and the desired robustness, so that the estimation accuracy and system robustness are separated.
8. The method according to claim 1, characterized in that, The outer loop position controller solves the optimal control sequence based on the Gaussian process enhanced prediction model, outputs the total lift and virtual horizontal control quantity, and combines the dynamic yaw angle expectation value to solve for the expected roll angle and pitch angle. The inner-loop attitude controller tracks the desired attitude angle based on the same model and L1 adaptive law, and outputs three-axis torque control quantities, specifically including: The outer loop position controller uses the Gaussian process enhanced prediction model as the prediction equation for rolling optimization, and uses the vertical terrain following trajectory, the horizontal obstacle avoidance buffer trajectory, and the dynamic yaw angle expectation value as the tracking targets. It constructs a quadratic objective function that includes the position tracking error and the cost of control increment. Under the condition of satisfying the thrust limit and attitude angular rate constraints, it solves the optimal control sequence in the future prediction time domain, and outputs the first component of the sequence as the total lift expectation value and the virtual horizontal control quantity at the current moment. Based on the virtual horizontal control quantity and the expected value of the dynamic yaw angle, the expected roll angle and the expected pitch angle are solved by geometric transformation relationship. Specifically, based on the components of the virtual horizontal control quantity in the X and Y axes of the body coordinate system, the total lift and the dynamic yaw angle, the expected attitude angle is calculated by using trigonometric function relationship. The inner-loop attitude controller is based on the same dynamic baseline model and Gaussian process enhanced prediction model as the outer-loop position controller. It uses the expected roll angle, expected pitch angle and expected dynamic yaw angle obtained from the inverse solution as the tracking targets, constructs a quadratic objective function of attitude angle tracking error and control cost, and introduces L1 adaptive law to compensate for the residual uncertainty of the attitude loop online. Under the condition of satisfying the torque amplitude constraint, it solves the optimal torque sequence and outputs the three-axis torque control quantities of roll, pitch and yaw.
9. The method according to claim 1, characterized in that, The mapping of total lift and three-axis torque control quantities to rotor speed commands via a pseudo-inverse allocation matrix specifically includes: A control efficiency matrix for a quadcopter UAV is established, which describes the linear mapping relationship between total lift and the three-axis torques (roll, pitch, and yaw) and the square values of the rotational speeds of the four rotors. The control efficiency matrix is inverted using a pseudo-inverse method. The total lift control quantity output by the outer loop position controller and the three-axis torque control quantity output by the inner loop attitude controller are combined into a four-dimensional virtual control vector. This vector is then mapped to the squared rotational speed commands of the four rotors through the pseudo-inverse matrix, and the final rotational speed commands of each rotor are obtained by square root operation. The speed command is sent to the electronic speed controller, which drives each rotor motor to generate corresponding thrust and counter-torque, so that the UAV generates a resultant force and resultant torque to fly along the ground-following flight reference altitude surface, and continuously executes the safe distance monitoring and replanning steps during flight.
10. An adaptive terrain-following flight control system for railway unmanned aerial vehicles (UAVs) that integrates multi-source terrain data, applied to the method described in any one of claims 1 to 9, characterized in that, The system includes: The model correction module is used to establish a preset initial dynamic model of the UAV, use an extended Kalman filter to estimate the change in moment of inertia online, and dynamically correct the initial dynamic model to obtain a dynamic baseline model. The terrain fusion module is used to simultaneously acquire airborne lidar point clouds, airborne binocular vision depth maps, and railway line database elevation data. It performs registration and cropping with the centerline of the track path as a constraint to generate a terrain-following flight reference altitude surface that takes into account the geometric constraints of the railway track. The trajectory planning module is used to plan the vertical terrain following trajectory and the horizontal obstacle avoidance buffer trajectory based on the curvature of the surface, and to calculate the expected value of the dynamic yaw angle based on the tangent direction of the trajectory path. The controller module is used to learn and embed aerodynamic parameter perturbations and unmodeled dynamics into the prediction equation of the nonlinear model predictive controller based on the dynamic baseline model using Gaussian process regression, forming a Gaussian process enhanced prediction model. At the same time, an L1 adaptive law is introduced into the objective function to compensate for the remaining uncertainty online. The controller adopts an inner and outer loop cascade architecture. The inner and outer loop coordinated control module is used to enable the outer loop position controller to solve the optimal control sequence based on the Gaussian process enhanced prediction model, output the total lift and virtual level control quantity, and combine the dynamic yaw angle expectation value to solve the expected roll angle and pitch angle; and enable the inner loop attitude controller to track the expected attitude angle based on the same model and L1 adaptive law and output the three-axis torque control quantity. The execution and safety module is used to map the total lift and three-axis torque control quantities into rotor speed commands through a pseudo-inverse distribution matrix, drive the UAV to perform low-altitude autonomous terrain-following flight along the curved surface, and monitor the distance between the UAV and railway facilities in real time. When the distance is lower than a preset safety threshold, the trajectory planning module is triggered to perform trajectory replanning to maintain a safe distance.
Citation Information
Patent Citations
Unmanned aerial vehicle load optimization control system and method based on multi-sensor fusion
CN121232866A
Unmanned aerial vehicle anti-disturbance self-adaptive balancing method and system based on multi-modal perception
CN122086074A
