A method and device for estimating the height of a UAV relative to the ground, a UAV and a medium
By integrating IMU, optical flow, and GPS data into a Kalman filter algorithm, the problems of short range, susceptibility to interference, and single sensor failure in UAV ground altitude estimation are solved, achieving altitude estimation with a wider range and higher accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN DEEPSEA LNNOVATIONS TECH CO LTD
- Filing Date
- 2023-12-29
- Publication Date
- 2026-05-05
AI Technical Summary
Existing UAV ground altitude estimation methods suffer from problems such as short measurement distance, susceptibility to interference, accuracy dependence on calibration, and high computational resources, especially system crashes when a single sensor fails.
By fusing IMU data, optical flow data, and GPS data, and using the Kalman filter algorithm for altitude estimation, a state variable equation and covariance matrix are constructed to achieve accurate correction of ground altitude.
This improves the reliability and ranging range of UAV ground altitude estimation, reduces reliance on a single sensor, and enhances the robustness of the system.
Smart Images

Figure CN117805876B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unmanned aerial vehicle (UAV) technology, and more particularly to a method, apparatus, UAV, and medium for estimating the ground altitude of a UAV. Background Technology
[0002] Ground altitude estimation is a crucial technology in drone applications. In drone flight control, ground altitude estimation is essential for autonomous flight and positioning. It not only helps drones avoid obstacles but also ensures accurate positioning and control at different altitudes. The development and application of ground altitude estimation technology can improve drone flight safety and accuracy, and expand the application areas of drones, such as drone delivery, agricultural plant protection, and traffic monitoring, showing broad application prospects.
[0003] In existing technologies, the ground altitude estimation methods commonly used for UAVs typically employ ultrasonic sensors, lidar, and binocular vision ranging.
[0004] Using ultrasonic sensors to estimate ground altitude is an economical method for drones; however, its measurement distance is generally short, typically 3 to 5 meters, and it is susceptible to interference, with a relatively large detection field of view.
[0005] While lidar is more accurate than ultrasonic sensors for ground altitude estimation in drones, it is also more expensive. The distance of a typical single-point laser measurement is usually no more than 10 meters, and long-distance laser ranging is even more expensive.
[0006] Binocular vision ranging for ground height estimation is relatively novel, as it can acquire depth information through cameras. However, the measurement accuracy of binocular modules depends on the accuracy of calibration and requires a large amount of computing resources, placing high demands on platform performance. Summary of the Invention
[0007] The purpose of this application is to provide a method, apparatus, drone, and medium for estimating the ground altitude of a drone. By utilizing the drone's existing sensors and fusing IMU data, optical flow data, and GPS data, the drone's ground altitude can be estimated, avoiding the inability to estimate altitude when a single sensor fails, and improving the reliability of ground altitude estimation.
[0008] To solve the above-mentioned technical problems, the embodiments of this application adopt the following technical solutions:
[0009] In a first aspect, embodiments of this application provide a method for estimating the ground altitude of a UAV, the method comprising:
[0010] Receive observation data; the observation data includes IMU data, and at least one of optical flow data and GPS data;
[0011] When new IMU data is received, based on the state variables of the previous moment and the covariance corresponding to the state variables, the state variables and covariance of the current moment are predicted using the new IMU data; the state variables include the horizontal velocity of the UAV in the body coordinate system.
[0012] Based on the optical flow data at the current moment, the state variables and covariance at the current moment are measured and updated to correct the relationship between the horizontal velocity and the UAV's altitude above the ground, and / or based on the GPS data at the current moment, the state variables and covariance at the current moment are measured and updated to correct the horizontal velocity, thereby correcting the altitude above the ground;
[0013] When the updated covariance is less than the preset error, the corrected ground altitude is taken as the ground altitude at the current moment.
[0014] In some embodiments, the method further includes:
[0015] Based on the UAV's horizontal velocity in the body coordinate system, the zero bias of the UAV's accelerometer's horizontal axis, and the UAV's altitude above the ground, state variable equations and covariance matrices are constructed.
[0016] In some embodiments, when new IMU data is received, the state variables and covariance at the current moment are predicted based on the state variables at the previous moment and the covariance corresponding to the state variables; the state variables include the horizontal velocity of the UAV in the body coordinate system, including:
[0017] When new IMU data is received, the gravitational acceleration in the new IMU data is removed;
[0018] Based on the IMU data after removing gravitational acceleration, as well as the horizontal velocity at the previous moment, the zero bias of the horizontal axis of the UAV's accelerometer, and the UAV's altitude above the ground, the horizontal velocity in the state variables at the current moment is predicted.
[0019] Based on the accelerometer measurement of the UAV at the previous moment, the accelerometer bias, and the noise at the ground altitude, predict the covariance at the current moment.
[0020] In some embodiments, the step of measuring and updating the state variables and covariance at the current moment based on the optical flow data at the current moment to correct the relationship between the horizontal velocity and the UAV's altitude above the ground includes:
[0021] Obtain the first included angle of the drone's offset from the horizontal plane;
[0022] Based on the first included angle, the first measurement error of the equivalent angular velocity in the optical flow data, and the horizontal velocity, calculate the first optical flow measurement value at the current moment;
[0023] Based on the first optical flow measurement value at the current moment, the state variables and covariance at the current moment are measured and updated to correct the relationship between the horizontal velocity and the UAV's altitude above the ground.
[0024] In some embodiments, correcting the altitude above the ground includes:
[0025] If, at the current moment, the error between the attitude and horizontal attitude of the UAV is within the error range, then the GPS data is acquired;
[0026] Based on the magnitude of the horizontal velocity in the GPS data and the optical flow data, the state variables and covariance at the current moment are measured and updated to correct the relationship between the horizontal velocity and the UAV's altitude above the ground, and to correct the horizontal velocity, thereby correcting the horizontal velocity.
[0027] In some embodiments, the modulus of the horizontal velocity is obtained based on the measurement error of the GPS modulus and the modulus of the UAV's body velocity.
[0028] In some embodiments, the step of measuring and updating the state variables and covariance at the current moment based on the magnitude of the horizontal velocity in the GPS data and the optical flow data to correct the horizontal velocity includes:
[0029] Obtain the second included angle of the drone's offset from the horizontal plane;
[0030] Based on the second included angle, the second measurement error of the equivalent angular velocity in the optical flow data, the horizontal velocity, and the magnitude of the horizontal velocity in the GPS data, the state variables and covariance at the current moment are measured and updated.
[0031] Secondly, embodiments of this application also provide a UAV ground altitude estimation device, the device comprising:
[0032] An observation data receiving module is used to receive observation data; the observation data includes IMU data, and at least one of optical flow data and GPS data;
[0033] The prediction module is used to predict the state variables and covariance at the current moment based on the state variables at the previous moment and the covariance corresponding to the state variables when new IMU data is received; the state variables include the horizontal velocity of the UAV in the body coordinate system;
[0034] An update module is used to measure and update the state variables and covariance at the current time based on the optical flow data at the current time, so as to correct the relationship between the horizontal velocity and the UAV's altitude above the ground, and / or to measure and update the state variables and covariance at the current time based on the GPS data at the current time, so as to correct the horizontal velocity and thus correct the altitude above the ground;
[0035] The determination module is used to take the corrected ground altitude as the ground altitude at the current moment when the updated covariance is less than the preset error.
[0036] Thirdly, this application also provides an unmanned aerial vehicle (UAV), which includes a flight control module, an IMU module, a GPS module, and an optical flow module, wherein the flight control module is connected to the IMU module, the GPS module, and the optical flow module respectively;
[0037] The flight control module includes: a memory, which is communicatively connected to the processor, and the memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the method described in any of the first aspects.
[0038] Fourthly, this application also provides a non-volatile computer-readable storage medium storing computer-executable instructions that, when executed by a drone, cause the drone to perform the method described in any of the first aspects.
[0039] The beneficial effects of the embodiments of this application are as follows: Unlike the prior art, the UAV ground altitude estimation method, apparatus, UAV, and medium provided in the embodiments of this application enable UAVs to estimate ground altitude during flight missions. This is achieved by utilizing the UAV's existing sensors and fusing IMU data, optical flow data, and even GPS data. Furthermore, when the altitude sensor fails, alternative altitude estimation methods can be provided, improving the reliability of UAV altitude estimation and expanding the ranging range. Attached Figure Description
[0040] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0041] Figure 1 This is a structural schematic diagram of one embodiment of the drone of this application;
[0042] Figure 2This is a flowchart illustrating one embodiment of the UAV ground altitude estimation method of this application;
[0043] Figure 3 This is a schematic diagram of the horizontal velocity of the UAV in the body coordinate system of this application;
[0044] Figure 4 This is a schematic diagram illustrating the calculation of the ground height d after angle compensation in this application;
[0045] Figure 5 This is a comparison chart of the ground altitude accuracy using TOF as a reference during low-altitude experiments in this application;
[0046] Figure 6 This is a comparison chart of the ground distance obtained by single-point TOF measurement in this application and the ground height obtained by measurement in this application;
[0047] Figure 7 This is a schematic diagram of one embodiment of the UAV ground altitude estimation device of this application;
[0048] Figure 8 This is a schematic diagram of the hardware structure of the controller in one embodiment of the UAV of this application. Detailed Implementation
[0049] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.
[0050] 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 and not intended to limit the scope of this application.
[0051] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," and "third" used herein do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0052] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.
[0053] Furthermore, the technical features involved in the various embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0054] The UAV ground altitude estimation method and apparatus provided in this application can be applied to UAVs, such as... Figure 1 As shown, Figure 1 This is a schematic block diagram of one embodiment of a drone. The drone 100 includes a flight control module 10, an IMU module 20, a GPS module 30, and an optical flow module 40. The flight control module 10 is connected to the IMU module 20, the GPS module 30, and the optical flow module 40, respectively.
[0055] Among them, the flight control module 10 is the flight control module of the UAV 100, which has the ability to monitor and manipulate the flight and mission of the UAV, and is used to control the UAV 100 to perform flight missions.
[0056] An IMU (Inertial Measurement Unit) is a sensor module that integrates a three-axis accelerometer and a three-axis gyroscope to measure the linear acceleration and angular velocity of an object. In drones, the IMU plays a crucial role, providing precise attitude and motion information, offering critical data for drone control and navigation. IMU data can be used to calculate changes in an object's angle, angular velocity, and acceleration, as well as its attitude (roll angle, pitch angle, and yaw angle). Furthermore, the IMU module can provide other information such as direction, velocity, and position.
[0057] GPS actually refers to the Global Navigation Satellite System, or GNSS, which is mainly used for positioning. GPS data includes time, positioning status, north-south latitude, and velocity information.
[0058] The optical flow module 40 includes an optical flow motherboard and an optical flow camera. The optical flow motherboard is equipped with an optical flow sensor to detect the horizontal movement of the drone during flight and transmit the results to the flight control module 10. The flight control module 10 then combines this with altitude data to control the drone, enabling it to automatically hover. Furthermore, the optical flow module 40 can also provide a measurement of the equivalent angular velocity.
[0059] The drone 100 can be a fixed-wing drone or a multi-rotor drone. The multi-rotor drone can be a quadcopter drone or a hexacopter drone, and there are no restrictions here.
[0060] In existing technologies, if only a single sensor is used to estimate the ground altitude of a UAV, the entire ground altitude estimation system may collapse if the single sensor module fails.
[0061] To resolve the above issues, please refer to [link / reference]. Figure 2 The above is a flowchart illustrating an embodiment of the UAV ground altitude estimation method applied in this application. The method can be executed by the controller 11 in the UAV and includes steps S201-S204.
[0062] S201: Receive observation data; the observation data includes IMU data, and at least one of optical flow data and GPS data.
[0063] The UAV's flight control module 10 receives observation data sent by the IMU module 20. When this IMU data is used as observation data, it is acceleration, not velocity.
[0064] If only the IMU module 20 is used for ground altitude estimation, the resulting altitude information will have high noise and low accuracy.
[0065] Therefore, the IMU data in this application, by fusing optical flow data, or fusing optical flow data and GPS data, or fusing GPS data, and using Kalman filtering for height estimation, can obtain a smooth height estimate with higher accuracy.
[0066] In some implementations, the method may further include:
[0067] Based on the UAV's horizontal velocity in the body coordinate system, the zero bias of the UAV's accelerometer's horizontal axis, and the UAV's altitude above the ground, state variable equations and covariance matrices are constructed.
[0068] Specifically, when performing Kalman filtering on the UAV's flight control module 10, it is first necessary to construct the state variable equations and covariance matrix.
[0069] The Kalman filter is an algorithm for estimating the state of a system. It is commonly used in data fusion in measurement and control systems. It models the uncertainty of the system state and iteratively updates it by combining observation data to obtain the optimal estimate of the system state.
[0070] Therefore, when performing Kalman filtering in this application, the system first needs to be modeled, and the parameter to be estimated is defined as the state variable x, which is a vector, and the uncertainty of the state variable x is represented by the covariance P.
[0071] Furthermore, the state variable x in this application is constructed based on the horizontal velocity of the UAV in the body coordinate system, the zero bias of the horizontal axis of the UAV's accelerometer, and the UAV's altitude above the ground, and is expressed by Formula 1:
[0072] x = [v b ,b a Formula 1;
[0073] Among them, v b The horizontal velocity of the UAV in the body coordinate system is a two-dimensional vector; b a The zero offset of the horizontal axis of the drone's accelerometer is indicated; h represents the drone's altitude above the ground.
[0074] The XYZ coordinate system of a drone refers to a three-dimensional orthogonal Cartesian coordinate system fixed on the drone, following the right-hand rule, with its origin located at the drone's center of mass. Horizontal velocity v b In the body coordinate system XYZ, as follows Figure 3 As shown.
[0075] The covariance P is a 5-dimensional matrix. During initialization, the covariance P is a 5-dimensional identity matrix.
[0076] After constructing the state variable equations and covariance matrix, the state variables and covariance are initialized. The horizontal velocity v of the UAV in the body coordinate system can be set. b Set the horizontal axis offset b of the UAV's accelerometer to 0. a The initial value is 0, and the ground altitude h of the UAV is set to 1. The covariance P is initialized as a 5-dimensional identity matrix. After initialization, state prediction can be performed.
[0077] S202: When new IMU data is received, based on the state variables of the previous moment and the covariance corresponding to the state variables, the state variables and covariance of the current moment are predicted using the new IMU data; the state variables include the horizontal velocity of the UAV in the body coordinate system.
[0078] As observation data is continuously received, when new IMU data is received at the current moment, the state variables and covariance at the current moment are predicted using the new IMU data based on the Kalman filter algorithm, using the state variables and their corresponding covariances from the previous moment.
[0079] In some implementations, step S202 may include:
[0080] When new IMU data is received, the gravitational acceleration in the new IMU data is removed;
[0081] Based on the IMU data after removing gravitational acceleration, as well as the horizontal velocity at the previous moment, the zero bias of the horizontal axis of the UAV's accelerometer, and the UAV's altitude above the ground, the horizontal velocity in the state variables at the current moment is predicted.
[0082] Based on the accelerometer measurement of the UAV at the previous moment, the accelerometer bias, and the noise at the ground altitude, predict the covariance at the current moment.
[0083] Specifically, the state variable for predicting the current moment can be represented by Equation 2:
[0084]
[0085] in, This represents the state variable at the current time being the k-th iteration. Let a represent the updated horizontal velocity of the UAV in the body coordinate system at the (k-1)th iteration in the previous time step. m This represents the data from the new IMU data at the current moment after removing gravitational acceleration, k represents the kth iteration, and Δt represents the time from the previous moment to the current moment.
[0086] The covariance predicted at the current moment can be expressed by Formula 3:
[0087]
[0088] Among them, Q k Expressed in Equation 4, φ k Equation 5 represents the following: Equations 4 and 5 are respectively:
[0089]
[0090]
[0091] Where, ∑ a This represents the measurement value of the drone's accelerometer, ∑ ba σ represents the zero bias of the accelerometer of the drone. h The noise represents the altitude h above the ground, and Δt represents the time from the previous moment to the current moment. This represents the updated covariance at the (k-1)th iteration.
[0092] Using formulas 2 to 5, when new IMU data is received, state prediction is performed on the state variables and covariance of the previous moment, thereby predicting the current horizontal velocity of the UAV in the body coordinate system.
[0093] like Figure 3 As shown, due to the optical flow velocity w opt equals v b / h(v b Let h represent the drone's horizontal velocity (and h represent the drone's altitude above the ground). Therefore, if the drone's horizontal velocity in the body coordinate system at the current moment... If it is accurate enough, then we can rely on optical flow data Z opt By deducing the ground altitude h, the ground altitude h can be estimated, thus eliminating the need for a single-sensor ground altitude estimation method that does not require a height sensor.
[0094] S203: Based on the optical flow data at the current moment, measure and update the state variables and covariance at the current moment to correct the relationship between the horizontal velocity and the UAV's altitude above the ground, and / or based on the GPS data at the current moment, measure and update the state variables and covariance at the current moment to correct the horizontal velocity, thereby correcting the altitude above the ground.
[0095] The optical flow module 40 detects optical flow data in real time, and the UAV's flight control module 10 receives the optical flow data sent by the optical flow module 40 in real time.
[0096] In some implementations, during data fusion, only optical flow data and IMU data can be fused. Then, based on the optical flow data at the current moment, the state variables and covariance at the current moment are measured and updated to correct the relationship between the horizontal velocity and the UAV's altitude above the ground. This can include:
[0097] Obtain the first included angle of the drone's offset from the horizontal plane;
[0098] Based on the first included angle, the first measurement error of the equivalent angular velocity in the optical flow data, and the horizontal velocity, calculate the optical flow measurement value at the current moment;
[0099] Based on the optical flow measurement value at the current moment, the state variables and covariance at the current moment are measured and updated to correct the relationship between the horizontal velocity and the UAV's altitude above the ground.
[0100] Specifically, when fusing optical flow data and IMU data, the first step is to obtain the first included angle θ between the UAV and the horizontal plane at the current moment. Then, based on the first included angle θ and the first measurement error σ of the equivalent angular velocity in the optical flow data... opt The state variables and covariance at the current moment are measured and updated, and can be calculated according to the following formula 6:
[0101]
[0102] Where d represents the ground height after angle compensation, and Z opt σ represents the optical flow measurement value. opt The first measurement error represents the equivalent angular velocity in the optical flow data, and the angle-compensated height above the ground, d, is as follows: Figure 4 As shown, it can be calculated using the following formula 7:
[0103] d = arccos(θ)·h (Formula 7)
[0104] Here, θ represents the first included angle of the drone's distance from the horizontal plane, which can be directly obtained through the AHRS system of the flight control module 40.
[0105] Based on formulas 6 and 7, the first optical flow measurement value Z can be deduced. opt Furthermore, the first optical flow measurement value Z opt It is in the same coordinate system as the IMU data.
[0106] The first optical flow measurement value Z at the current moment is obtained through calculation. opt Then, based on the first optical flow measurement value Z at the current moment... opt For the state variable at the current moment Covariance Perform a measurement update to obtain the updated state variables. Covariance Furthermore, due to the first optical flow measurement value Z opt equals v b / h(v b Let v represent the horizontal speed of the drone, and h represent the drone's altitude above the ground. This corrects the ratio between the horizontal speed and the altitude above the ground, thus correcting the horizontal speed v. b The relationship between the altitude h above the ground and the altitude h above the ground.
[0107] Once the ratio between horizontal speed and altitude above the ground is accurately corrected, the altitude above the ground can be precisely determined.
[0108] During data fusion, optical flow data, IMU data, and GPS data can also be fused. Therefore, in some implementations, correcting the altitude above the ground may further include:
[0109] If, at the current moment, the error between the attitude and horizontal attitude of the UAV is within the error range, then the GPS data is acquired;
[0110] Based on the magnitude of the horizontal velocity in the GPS data and the optical flow data, the state variables and covariance at the current moment are measured and updated to correct the relationship between the horizontal velocity and the UAV's altitude above the ground, and to correct the horizontal velocity, thereby correcting the altitude above the ground.
[0111] Specifically, the flight control module 10 obtains GPS data through the GPS module 30.
[0112] When the drone is outdoors, the GPS module 30 can acquire GPS data. Furthermore, if the error between the drone's attitude and its horizontal attitude is within the acceptable range, the drone is considered to be close to a horizontal attitude. The drone's attitude information can be obtained through its AHRS (Attitude Heading Reference System) to determine if the drone is horizontal. If the error between the drone's attitude and its horizontal attitude is determined to be within the acceptable range, then the drone's attitude is considered to be close to a horizontal attitude, and GPS data is acquired at this time to ensure consistency between the coordinate system of the GPS data and the coordinate system of the drone's horizontal velocity.
[0113] The modulus of horizontal velocity in GPS data can be obtained based on the measurement error of GPS modulus and the modulus of the UAV's body velocity. Furthermore, the modulus of horizontal velocity in GPS data can be calculated with reference to the following formula 8:
[0114]
[0115] Among them, z gps σ represents the magnitude of the horizontal velocity in GPS data. gps This represents noise in GPS data.
[0116] According to Formula 8, the magnitude of the horizontal velocity in the GPS data is calculated, and then expressed as v. b The modulus of horizontal velocity in GPS data.
[0117] Then, based on the magnitude of the horizontal velocity in the GPS data and the optical flow data, i.e., v b After representing the magnitude of the horizontal velocity in the GPS data, substituting it into Formula 8, the state variables and covariance at the current moment are measured and updated, which may include:
[0118] Obtain the second included angle of the drone's offset from the horizontal plane;
[0119] Based on the second included angle, the second measurement error of the equivalent angular velocity in the optical flow data, the horizontal velocity, and the magnitude of the horizontal velocity in the GPS data, the state variables and covariance at the current moment are measured and updated.
[0120] In the state prediction process of Kalman filtering, IMU data is used to correct the horizontal velocity, while optical flow data is used to correct the relationship between the horizontal velocity and the UAV's altitude above the ground. With accurate horizontal velocity and accurate ratio between the horizontal velocity and the UAV's altitude above the ground, the altitude above the ground is accurate.
[0121] Similar to fusing optical flow data and IMU data individually, a second included angle θ between the UAV and the horizontal plane at the current moment is obtained. Then, based on the second included angle θ, a second measurement error of the equivalent angular velocity in the optical flow data, the horizontal velocity, and the magnitude z of the horizontal velocity in the GPS data, the UAV is... gps The state variables and covariance at the current moment are measured and updated to correct the horizontal velocity and the ratio between the horizontal velocity and the UAV's altitude above the ground.
[0122] During measurement updates, the current state variables and covariance are continuously corrected to adjust the horizontal velocity and the ratio between the horizontal velocity and the UAV's altitude above the ground, thereby continuously updating the altitude above the ground.
[0123] Understandably, when correcting for state variables and covariance, Equation 9 is first used to calculate the measurement model of the sensor (optical flow module and / or GPS module) to represent the relationship between sensor measurements and state variables. Equation 9 is as follows:
[0124] z k =z(x k ,v k ) Formula 9;
[0125] Among them, z k The measurement equation represents the relationship between sensor measurements and state variables, where x... k The state variable v represents the state variable at the time of the test. k This indicates measurement noise.
[0126] After determining the measurement equation, the H matrix is obtained through linear expansion. Then, based on the H matrix, the Kalman update formula, and the Kalman gain, the state variables and covariance at the current time can be corrected, thereby obtaining the updated state variables. and the covariance Furthermore, based on the updated state variables The covariance Formulas 2 and 3 are used to update the ground altitude h at the current moment.
[0127] Kalman updates can be found in common knowledge in this field, and will not be elaborated upon here.
[0128] S204: When the updated covariance is less than the preset error, the corrected ground altitude is taken as the ground altitude at the current moment.
[0129] In Kalman filtering, the covariance P is used to represent the uncertainty of the state variable x. The smaller the covariance, the smaller the estimation error. Therefore, when the updated covariance is less than the preset error, the state is considered to have converged and the ground altitude at that moment is more accurate. The corrected ground altitude is then used as the ground altitude at the current moment.
[0130] In embodiments of this application, when a UAV performs a flight mission, it needs to estimate its altitude above the ground. This estimation is achieved by utilizing the UAV's existing sensors and fusing IMU data, optical flow data, and even GPS data. Furthermore, when the altitude sensor fails, alternative altitude estimation methods can be provided, improving the reliability of the UAV's altitude estimation and expanding its ranging range.
[0131] The embodiments of this application, as tested, show that, as Figure 5 As shown, Figure 5 This is a comparison chart showing the accuracy of ground altitude using TOF (Time of Flight) as a reference during low-altitude experiments in this application. Figure 5 In this study, using ToF as a reference value, two experiments were conducted at low altitude to verify the accuracy of the multi-sensor fusion scheme. The results showed that the accuracy of this application is relatively high. Figure 6 As shown, Figure 6 This is a comparison chart of the ground clearance distance obtained by single-point TOF measurement in this application and the ground clearance height obtained by this application. Figure 6 In the figure, h_gnd is the distance from the ground obtained by single-point ToF measurement, and ekf_h is the height h estimated by the method of this application. It can be seen that when the UAV just takes off, there is a certain error between h and h_gnd, but as it moves horizontally, ekf_h and h_gnd quickly approach each other, and the trend of height change is consistent.
[0132] The experiments presented in this application demonstrate the feasibility of the UAV ground altitude estimation method, with an overall error within 15%. Furthermore, by calibrating the camera parameters of the optical flow sensor, the accuracy can be further improved, with a ranging range exceeding 100 meters, which is larger than that of commonly used ultrasonic and TOF ground altitude estimation methods.
[0133] This application also provides a UAV ground altitude estimation device; please refer to [link / reference]. Figure 7 This illustration shows the structure of a UAV ground altitude estimation device 600 provided in an embodiment of this application. The UAV ground altitude estimation device 600 includes:
[0134] The observation data receiving module 601 is used to receive observation data; the observation data includes IMU data, and at least one of optical flow data and GPS data;
[0135] Prediction module 602 is used to predict the state variables and covariance at the current moment based on the state variables at the previous moment and the covariance corresponding to the state variables when new IMU data is received; the state variables include the horizontal velocity of the UAV in the body coordinate system;
[0136] The update module 603 is used to measure and update the state variables and covariance at the current time based on the optical flow data at the current time, so as to correct the relationship between the horizontal velocity and the UAV's altitude above the ground, and / or to measure and update the state variables and covariance at the current time based on the GPS data at the current time, so as to correct the horizontal velocity and thus correct the altitude above the ground;
[0137] The determination module 604 is used to take the corrected ground altitude as the ground altitude at the current moment when the updated covariance is less than the preset error.
[0138] In embodiments of this application, when a UAV performs a flight mission, it needs to estimate its altitude above the ground. This estimation is achieved by utilizing the UAV's existing sensors and fusing IMU data, optical flow data, and even GPS data. Furthermore, when the altitude sensor fails, alternative altitude estimation methods can be provided, improving the reliability of the UAV's altitude estimation and expanding its ranging range.
[0139] In some embodiments, the UAV ground altitude estimation device 600 further includes a construction module 605 for:
[0140] Based on the UAV's horizontal velocity in the body coordinate system, the zero bias of the UAV's accelerometer's horizontal axis, and the UAV's altitude above the ground, state variable equations and covariance matrices are constructed.
[0141] In some embodiments, the prediction module 602 is further configured to:
[0142] When new IMU data is received, the gravitational acceleration in the new IMU data is removed;
[0143] Based on the IMU data after removing gravitational acceleration, as well as the horizontal velocity at the previous moment, the zero bias of the horizontal axis of the UAV's accelerometer, and the UAV's altitude above the ground, the horizontal velocity in the state variables at the current moment is predicted.
[0144] Based on the accelerometer measurement of the UAV at the previous moment, the accelerometer bias, and the noise at the ground altitude, predict the covariance at the current moment.
[0145] In some embodiments, the update module 603 is further configured to:
[0146] Obtain the first included angle of the drone's offset from the horizontal plane;
[0147] Based on the first included angle, the first measurement error of the equivalent angular velocity in the optical flow data, and the horizontal velocity, calculate the first optical flow measurement value at the current moment;
[0148] Based on the first optical flow measurement value at the current moment, the state variables and covariance at the current moment are measured and updated to correct the relationship between the horizontal velocity and the UAV's altitude above the ground.
[0149] In some embodiments, the update module 603 is further configured to:
[0150] Based on the current optical flow data and / or GPS data, the state variables and covariance at the current moment are measured and updated, including:
[0151] If, at the current moment, the error between the attitude and horizontal attitude of the UAV is within the error range, then the GPS data is acquired;
[0152] Based on the magnitude of the horizontal velocity in the GPS data and the optical flow data, the state variables and covariance at the current moment are measured and updated to correct the relationship between the horizontal velocity and the UAV's altitude above the ground, and to correct the horizontal velocity, thereby correcting the altitude above the ground.
[0153] In some embodiments, the modulus of the horizontal velocity is obtained based on the measurement error of the GPS modulus and the modulus of the UAV's body velocity.
[0154] In some embodiments, the update module 603 is configured to:
[0155] Obtain the second included angle of the drone's offset from the horizontal plane;
[0156] Based on the second included angle, the second measurement error of the equivalent angular velocity in the optical flow data, the horizontal velocity, and the magnitude of the horizontal velocity in the GPS data, the state variables and covariance at the current moment are measured and updated.
[0157] It should be noted that the above-described apparatus can execute the method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the apparatus embodiments can be found in the method provided in the embodiments of this application.
[0158] Figure 8 This is a schematic diagram of the hardware structure of the controller 11 of the flight control module 10 in one embodiment of a drone, as shown below. Figure 8 As shown, the controller 11 includes:
[0159] One or more processors 111 and memory 112. Figure 8 The example uses a processor 111 and a memory 112.
[0160] Processor 111 and memory 112 can be connected via a bus or other means. Figure 8 Taking the example of a connection between China and Israel via a bus.
[0161] Memory 112, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the UAV ground altitude estimation method in the embodiments of this application (e.g., attached...). Figure 7 The diagram shows an observation data receiving module 601, a prediction module 602, an update module 603, a determination module 604, and a construction module 605. The processor 111 executes various functional applications and data processing of the controller 11 by running non-volatile software programs, instructions, and modules stored in the memory 112, thereby implementing the UAV ground altitude estimation method of the above method embodiment.
[0162] Memory 112 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the UAV's ground altitude estimation device, etc. Furthermore, memory 112 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 112 may optionally include memory remotely located relative to processor 111, and this remote memory may be connected to the UAV via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0163] The one or more modules are stored in the memory 112. When executed by the one or more processors 111, they perform the UAV ground altitude estimation method in any of the above method embodiments, for example, the method described above. Figure 2 Method steps S201 to S204; implementation Figure 7 The functions of modules 601-605 in the document.
[0164] The above-described product can perform the methods provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for performing the methods. Technical details not described in detail in this embodiment can be found in the methods provided in the embodiments of this application.
[0165] This application provides a non-volatile computer-readable storage medium storing computer-executable instructions that are executed by one or more flight control modules, for example... Figure 8 One of the processors 111 enables one or more flight control modules to execute the UAV ground altitude estimation method in any of the above method embodiments, for example, to execute the method described above. Figure 2 Method steps S201 to S204; implementation Figure 7 The functions of modules 601-605 in the document.
[0166] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0167] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0168] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for estimating the ground altitude of a UAV, characterized in that, The method includes: Receive observation data; the observation data includes IMU data, optical flow data, and GPS data; When new IMU data is received, the state variables and covariance at the current moment are predicted based on the state variables at the previous moment and the covariance corresponding to the state variables; the state variables include the UAV's altitude above the ground and the UAV's horizontal velocity in the body coordinate system. Based on the optical flow data at the current moment, the state variables and covariance at the current moment are measured and updated, or... Based on the optical flow data and GPS data at the current moment, the state variables and covariance at the current moment are measured and updated to correct the horizontal velocity and the altitude above the ground; When the updated covariance is less than the preset error, the corrected ground altitude is taken as the ground altitude at the current moment.
2. The method according to claim 1, characterized in that, The method further includes: Based on the UAV's horizontal velocity in the body coordinate system, the zero bias of the UAV's accelerometer's horizontal axis, and the UAV's altitude above the ground, state variable equations and covariance matrices are constructed.
3. The method according to claim 2, characterized in that, When new IMU data is received, the state variable and covariance at the current moment are predicted based on the state variable at the previous moment and the covariance corresponding to the state variable. The state variables include the UAV's altitude above the ground and the UAV's horizontal velocity in the body coordinate system, including: When new IMU data is received, the gravitational acceleration in the new IMU data is removed; Based on the IMU data after removing gravitational acceleration, as well as the horizontal velocity at the previous moment, the zero bias of the horizontal axis of the UAV's accelerometer, and the UAV's altitude above the ground, the UAV's altitude above the ground and the horizontal velocity in the state variables at the current moment are predicted. Based on the accelerometer measurement of the UAV at the previous moment, the accelerometer bias, and the noise at the ground altitude, predict the covariance at the current moment.
4. The method according to claim 2, characterized in that, The step of measuring and updating the state variables and covariance at the current moment based on the optical flow data at the current moment includes: Obtain the first included angle of the drone's offset from the horizontal plane; The first optical flow measurement value at the current moment is calculated based on the following formula. in, The value represents the horizontal velocity of the drone in the body coordinate system, and h represents the drone's altitude above the ground. The first included angle, The first measurement error represents the equivalent angular velocity in the optical flow data, and d represents the ground height after angle compensation. Based on the first optical flow measurement value at the current moment, the state variables and covariance at the current moment are measured and updated.
5. The method according to claim 2, characterized in that, The step of measuring and updating the state variables and covariance at the current moment based on the optical flow data and GPS data at the current moment includes: If, at the current moment, the error between the attitude and horizontal attitude of the UAV is within the error range, then the GPS data is acquired; Based on the horizontal velocity magnitude and optical flow data in the GPS data, the state variables and covariance at the current moment are measured and updated.
6. The method according to claim 5, characterized in that, The modulus of the horizontal velocity in the GPS data is obtained based on the following formula: in, The magnitude of horizontal velocity in GPS data. This represents noise in GPS data. This represents the magnitude of the horizontal velocity of the UAV in the body coordinate system.
7. A device for estimating the ground altitude of an unmanned aerial vehicle (UAV), characterized in that, The device includes: An observation data receiving module is used to receive observation data, which includes IMU data, optical flow data, and GPS data. The prediction module is used to predict the state variables and covariance at the current moment based on the state variables at the previous moment and the covariance corresponding to the state variables when new IMU data is received; the state variables include the UAV's altitude above the ground and the UAV's horizontal velocity in the body coordinate system; An update module is used to measure and update the state variables and covariance at the current time based on the optical flow data at the current time, or to measure and update the state variables and covariance at the current time based on the optical flow data and GPS data at the current time, so as to correct the horizontal velocity and the altitude above the ground. The determination module is used to take the corrected ground altitude as the ground altitude at the current moment when the updated covariance is less than the preset error.
8. A drone, characterized in that, The drone includes a flight control module, an IMU module, a GPS module, and an optical flow module, wherein the flight control module is connected to the IMU module, the GPS module, and the optical flow module respectively; The flight control module includes a processor and a memory, the memory being communicatively connected to the processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-6.
9. A non-volatile computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by the drone, cause the drone to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Unmanned aerial vehicle spotting realization method and device based on optical flow sensor and acceleration sensor
CN107389968A
Ground height correction method and device and unmanned aerial vehicle (UAV)
CN110658831A