An accurate learning method for Gaussian variational inference of UAV trajectories
Through the improved Gaussian variational inference method combined with the MAP method and natural gradient descent method, the problem of large state estimation error in the UAV system is solved, and more accurate large-scale state estimation of the UAV trajectory is achieved, which is suitable for nonlinearity system.
Patent Information
- Application Number
- CN202210171410.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-02-24
AI Technical Summary
Traditional state estimation methods have problems such as large errors and many algorithm iterations in UAV systems, especially when the system parameters are nonlinear and batched, traditional Gaussian variational inference methods cannot perform large-scale state estimation.
The improved Gaussian variational inference method combined with the MAP method to find the closest Gaussian approximation through KL divergence, and iteratively update the mean and covariance using natural gradient descent method, which improves the accuracy of batch state estimation.
A more accurate large-batch state estimation of the drone trajectory is achieved, with higher accuracy and computing efficiency than traditional methods, and is suitable for batch state estimation of nonlinear systems.
Smart Images

Figure CN114580721B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of nonlinear and batch state estimation, and mainly to a Gaussian variational inference state estimation method for accurate prediction of unmanned aerial vehicle trajectories. Background Art
[0002] State estimation is the core part of UAV system navigation. The goal of state estimation is to estimate the unobservable state of the system through the known observable state. When the model parameters of the UAV system are complex, the system parameters change with the sensors, and the state has nonlinear and batch characteristics, the traditional state estimation method has defects such as large error and many algorithm iterations.
[0003] State estimation can be regarded as the identification of nonlinear systems, so it can be processed using machine learning technology. The advantage of machine learning methods is that they do not need to accurately and completely model the estimated object, do not consider the object's motion details, and simply start from the data point of view. When the estimated object model and motion are simple, this method can accurately estimate the state of the moving object. However, when the moving object model and motion are complex, long-term stable and effective state estimation cannot be performed.
[0004] Another method is to estimate the state of the moving object probabilistically, using methods such as Kalman filtering, Bayesian filtering, sigmapoint filtering, particle filtering, Gaussian process regression, maximum a posteriori estimation (MAP) and Gaussian variational inference (GVI) to estimate the state of the moving object when it moves in space. These methods have been used in point cloud alignment, pose graph relaxation, bundle adjustment, and simultaneous positioning and mapping. The traditional GVI method is characterized by initially determining the optimal mean and covariance of the optimization target. If the mean dimension is N, the covariance matrix will become an N×N matrix, and the optimization calculation complexity will be greatly increased. Therefore, although the GVI framework has the advantages of high computational efficiency and small error, it cannot perform such large-scale state estimation when targeting the nonlinear and batch characteristics of UAV models and system parameters. Summary of the invention
[0005] The present invention proposes a Gaussian variational inference state estimation method for accurate prediction of unmanned aerial vehicle estimation, improves the GVI algorithm to make it suitable for batch state estimation, and combines the algorithm structure of the MAP method into the GVI method to construct a complete optimization iterative algorithm. The improved GVI method will improve the accuracy of batch state estimation at the cost of a slight increase in computational cost, and further approximate the complete Bayesian posterior. The improved GVI method finds the Gaussian approximation closest to the complete Bayesian posterior through KL divergence. Unlike the traditional GVI method, this paper will use the natural gradient descent method in the algorithm to iteratively update the mean and covariance, so that the improved GVI method can perform batch state estimation. Compared with the traditional method, the improved GVI method has better performance in terms of accuracy, so the batch state estimation and trajectory prediction method is applied to the trajectory prediction of unmanned aerial vehicles.
[0006] Therefore, the purpose of the present invention is to improve a Gaussian variational inference accurate learning method for UAV trajectories. The present invention can improve the accuracy of large-scale state estimation in the process of accurate trajectory of UAV trajectories.
[0007] To achieve the above purpose, the Gaussian variational inference accurate learning method for UAV trajectory provided by the present invention comprises the following steps:
[0008] Step S1: constructing a mathematical model of the UAV according to the aerodynamic principles and kinematic principles of the UAV in actual flight;
[0009] Step S2: Based on Gaussian variational inference, the true Bayesian posterior and the approximate posterior are linked through KL divergence, the state estimation problem is transformed into the posterior approximation problem, and then the calculation of KL divergence is transformed into the optimization problem of the loss function by defining the loss function;
[0010] Step S3: Use Newton's method to update the loss function and use the natural gradient descent method to iteratively optimize the mean and inverse covariance matrices to minimize the loss function V(q) to achieve the purpose of effective approximation of the posterior. Furthermore, the mathematical model of the drone constructed in step 1 is as follows:
[0011] In the inertial coordinate system Oxy, assume that the drone is located at any point in space, the coordinates are ξ = [x, y, z], and the Euler angle is Its kinetic equation is:
[0012]
[0013] Where v represents the speed of the drone; n x , n z They represent the tangential overload and normal overload of the drone respectively; g represents the acceleration due to gravity, which is 9.8m / s 2 .
[0014] Furthermore, in step 2, based on Gaussian variational inference, the true Bayesian posterior and the approximate posterior are linked through KL divergence, and the KL divergence expansion of the approximate posterior and the true Bayesian posterior is obtained as follows:
[0015]
[0016] in, is the information entropy of the Gaussian distribution, ln p(z) is a constant;
[0017] Convert KL divergence into a loss function, defined as follows:
[0018]
[0019] Among them, φ(x) = -ln p(x|z); V(q) is used as the loss function. The subsequent steps will optimize the loss function V(q) to obtain the minimum value of the loss function.
[0020] Furthermore, step 3 specifically includes the following steps:
[0021] Step S301: Substitute the joint likelihood function of the drone’s state / data into the loss function V(q)
[0022] The joint likelihood function of the drone's state / data is as follows:
[0023]
[0024] Where K represents the number of data in the subset, k represents the kth group of data, and const represents a constant value. Substitute this formula into φ(x) in the loss function V(q);
[0025] Step S302: Update the loss function V(q) using Newton's method;
[0026] For the loss function V(q) with respect to Gaussian parameters μ and ∑ -1 The derivative of is as follows:
[0027]
[0028]
[0029] The second-order derivative of the loss function V(q) is as follows:
[0030]
[0031] Comparing the latter two equations, we can get
[0032]
[0033] The Taylor series expansion of V(q) is as follows:
[0034]
[0035] Where: δμ=μ (i+1) -μ (i) ,δ∑ -1 =(∑ -1 ) (i+1) -(∑ -1 ) i , i is the iteration index of the optimization scheme;
[0036] In order to minimize the loss function V(q), it is necessary to choose appropriate δμ and δ∑ -1 ;
[0037] For the covariance ∑ -1 ,make
[0038] get:
[0039]
[0040] After using the iterative scheme in the above formula, the change in inverse covariance is:
[0041]
[0042] Use the Gaussian nonlinear batch state estimation framework in the maximum a posteriori estimation method and the Newton update method to calculate the mean μ;
[0043] To determine the minimum, take the derivative of δμ and set it to zero, so that the linear equation system for δμ is transformed into the following form:
[0044]
[0045] δμ and δ∑ -1 Substituting the optimization scheme into the loss approximation of the loss function, we get:
[0046]
[0047] When δμ and δ∑ -1 are not all zero, and with respect to μ and ∑ -1 When the derivatives of are not all zero, the loss of V(q) will decrease during the iteration process.
[0048] Furthermore, step 3 specifically includes the following steps:
[0049] Step S303: Update δμ and δ∑ by natural gradient descent method -1
[0050] Natural gradient descent uses information more efficiently than conventional gradient descent; the vec(·) operator concentrates the variational parameters into a single column vector α, converting the matrix into a vector:
[0051]
[0052]
[0053] The above formula is the gradient of the loss function V(q) with respect to α; the natural gradient descent update scheme is defined as:
[0054]
[0055] Γ a is the Fisher information matrix of the variational parameter α; combined with the above formula, we get:
[0056]
[0057] is the Kronecker inner product; extract the individual updates:
[0058]
[0059]
[0060] according to Get Updates:
[0061]
[0062]
[0063] Finally, the iterative update method is expressed as:
[0064] μ (i+1) ←μ (i) +α B δμ
[0065] ∑ -1(i+1) ←∑ -1(i) +α B δ∑ -1
[0066] Among them, α = 0.95, B = 0, 1, 2, ..., and keeps increasing until the loss function decreases compared to the value of the previous iteration.
[0067] The beneficial effects of the present invention are as follows: the present invention can improve the Gaussian variational inference of the flight system of the UAV by using the natural gradient descent method, and realize batch state estimation of the nonlinear system. The state estimation under the condition of introducing Gaussian variational inference has higher accuracy than the maximum a posteriori estimation method, and can more accurately estimate the flight trajectory of the UAV. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 This is a comparison chart of the trajectory estimated by the MAP method and the GVI method and the true value.
[0069] Figure 2 It is the loss function value and iteration number diagram of MAP and GVI in the UAV trajectory estimation experiment. Specific implementation methods
[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] For the Gaussian variational inference accurate learning method of drone trajectories, we must first introduce the main algorithms involved in this algorithm:
[0072] 1. Gaussian variational inference
[0073] The variational inference method hopes to minimize the KL divergence between the true Bayesian posterior p(x|z) and the posterior estimate q(x). x is the state you want to estimate, and z is the known observed state. Gaussian variational inference assumes that all states x in q(x) satisfy the Gaussian distribution, so q(x) can be expressed as follows:
[0074]
[0075] The asymmetry of the divergence requires us to first choose between using KL(p||q) or KL(q||p). The forward KL divergence of KL(p||q) is expressed as follows:
[0076]
[0077] The backward KL divergence of KL(p||q) is expressed as follows:
[0078]
[0079] where x∈R N , is to try to get from the data z∈RD The inferred unobservable state, E|·| represents the expectation. The reason for choosing KL(q||p) is that the expectation in the formula is the expectation of the posterior estimate q(x). The iterative scheme designed for q(x) using this property can approximate the posterior more effectively.
[0080] Expand the KL(q||p) expression to get:
[0081]
[0082] is the information entropy of the Gaussian distribution, and ln p(z) is a constant. KL divergence is converted into a loss function, which is defined as follows:
[0083]
[0084] Where φ(x)=-ln p(x|z).
[0085] Example 1
[0086] This embodiment proposes a Gaussian variational inference accurate learning method for drone trajectories, and the implementation steps are as follows:
[0087] Step S1: construct a mathematical model of the drone based on the aerodynamic and kinematic principles of the drone in actual flight. In actual flight, the motion model of the drone has the characteristics of continuity and nonlinearity. The premise of trajectory estimation is to estimate the state of the drone's motion parameters, that is, the position, velocity and corresponding acceleration of the drone.
[0088] In order to improve the accuracy of state estimation and trajectory estimation, the UAV is first modeled, assuming that the UAV model meets the following conditions:
[0089] ① Treat the drone as a rigid body and ignore the vibration and deformation of the rotor blades;
[0090] ② Treat the drone body as an absolutely symmetrical object with uniform mass, and the center of gravity coincides with the origin of the coordinate system;
[0091] ③ Ignore the impact of ground effect on the UAV;
[0092] ④ Ignore the rotation of the earth, keep the gravitational acceleration constant, and regard the ground coordinate system as an inertial coordinate system.
[0093] In the inertial coordinate system Oxy, assume that the drone is located at any point in space, the coordinates are ξ = [x, y, z], and the Euler angle is Its kinetic equation is:
[0094]
[0095] Where v represents the speed of the drone; n x , n z They represent the tangential overload and normal overload of the drone respectively; g represents the acceleration due to gravity, which is 9.8m / s 2 .
[0096] The structural parameters and mechanical constants of the UAV are shown in Table 1, including the mass, axis radius, and the moment of inertia of the x-axis, y-axis, and z-axis of the UAV.
[0097] Table 1 UAV structural parameters and mechanical constants
[0098]
[0099] In order to evaluate the performance of the GVI method in trajectory estimation, the UAV is used as the research object for trajectory prediction. In this experiment, the flight altitude of the UAV is locked, which can be regarded as fixed altitude flight.
[0100] In the trajectory estimation experiment, the position information of the UAV needs to be measured as the true value to compare with the estimated value, mainly including the position, speed, angle, and angular velocity of the UAV.
[0101] The entire dataset contains 10,000 time steps, which are divided into 5 subsets, each containing 2,000 time steps.
[0102] The states that need to be estimated are:
[0103]
[0104] Among them, X K is the drone state, K=2000.x for all 5 subsets k ,y k ,ψ k They are the position of the drone on the x-axis, y-axis and the yaw angle of the drone; are the corresponding speed and angular velocity respectively.
[0105] The linear prior factor of the drone state has the following form:
[0106]
[0107] in
[0108]
[0109]
[0110] Q c =diag(Q c,1 , Qc,2 , Q c,3 )
[0111] T is the discrete time sampling period, Q C,i is the power spectral density, is the variance corresponding to each quantity.
[0112] The nonlinear mileage factor of the drone is:
[0113]
[0114] in:
[0115]
[0116]
[0117] υ k Including the forward speed, lateral speed and yaw rate of the drone; is the measurement noise variance.
[0118] The joint likelihood function of state / data is:
[0119]
[0120] Step S2: Based on Gaussian variational inference, the true Bayesian posterior and the approximate posterior are linked through KL divergence, and the state estimation problem is transformed into the posterior approximation problem. Then, by defining the loss function, the calculation of KL divergence is transformed into the optimization problem of the loss function.
[0121] The KL divergence expansion of the approximate posterior and the true Bayesian posterior is as follows:
[0122]
[0123] is the information entropy of the Gaussian distribution, ln p(z) is a constant, and the KL divergence is converted into a loss function, which is defined as follows:
[0124]
[0125] Among them, φ(x) = -ln p(x|z). V(q) is used as the loss function, and the subsequent steps will optimize V(q) to obtain the minimum value of the loss function.
[0126] Step S3: Use Newton's method to update the loss function and use the natural gradient descent method to iteratively optimize the mean and inverse covariance matrix to minimize the loss function V(q) to achieve the purpose of effective approximation of the posterior.
[0127] Step S301: Substitute the joint likelihood function of the drone’s state / data into the loss function V(q)
[0128] The joint likelihood function of the drone’s state / data is substituted into φ(x) in the loss function of V(q), and let.
[0129] Step S302: Use Newton's method to update the loss function V(q).
[0130] For the loss function V(q) with respect to Gaussian parameters μ and ∑ -1 The derivative of is as follows:
[0131]
[0132]
[0133] The second-order derivative of the loss function V(q) is as follows:
[0134]
[0135] Comparing the latter two equations, we can get
[0136]
[0137] The Taylor series expansion of V(q) is as follows:
[0138]
[0139] Where: δμ=μ (i+1) -μ (i) ,δ∑ -1 =(∑ -1 ) (i+1) -(∑ -1 ) i , i is the iteration index of the optimization scheme. In order to minimize the loss function V(q), it is necessary to select appropriate δμ and δ∑ -1 .
[0140] For the covariance ∑ -1 ,make
[0141]
[0142] get
[0143]
[0144] The simultaneous formula, after using the iterative scheme in Formula 9, the change in inverse covariance is:
[0145]
[0146] The Gaussian nonlinear batch state estimation framework in the maximum a posteriori estimation method and the Newton update method are used to find the mean μ. In order to determine the minimum value, the derivative of δμ is taken and set to zero, so that the linear equation system of δμ is transformed into the following form:
[0147]
[0148] δμ and δ∑ -1 Substituting the optimization scheme into the loss approximation of the loss function, we get:
[0149]
[0150] δμ and δ∑ -1 are not all zero, and with respect to μ and ∑ -1 When the derivatives of are not all zero, the loss of V(q) will decrease during the iteration process.
[0151] Step S303: Update δμ and δ∑ by natural gradient descent method -1
[0152] The natural gradient descent method uses information more efficiently than the conventional gradient descent method. The vec(·) operator concentrates the variational parameters into a single column vector α, converting the matrix into a vector:
[0153]
[0154]
[0155] The above formula is the gradient of the loss function V(q) with respect to α. The natural gradient descent update scheme is defined as:
[0156]
[0157] Γ a is the Fisher information matrix of the variational parameter α. Combining the above formula, we get:
[0158]
[0159] is the Kronecker inner product. Extract the individual updates:
[0160]
[0161]
[0162] according to Get Updates:
[0163]
[0164]
[0165] Finally, the iterative update method is expressed as:
[0166] μ (i+1) +-μ (i) +α B δμ
[0167] ∑ -1(i+1) ←∑ -1(i) +α B δ∑ -1 Among them, α = 0.95, B = 0, 1, 2, ..., and keeps increasing until the loss function decreases compared to the value of the previous iteration.
[0168] Figure 1 The figure shows the trajectories estimated by the MAP method and the GVI method and the true trajectory in the experiment. The solid line is the true trajectory, the dashed line is the trajectory estimated by the MAP method, and the dotted line is the trajectory estimated by the GVI method. The trajectory estimated by the GVI method is closer to the true trajectory, and the trajectory estimated by the MAP method deviates more from the true trajectory. At the point where the true trajectory has a large bend, the trajectory estimated by the MAP method deviates more from the true value.
[0169] Figure 2 The solid box and dashed box are the loss function values of the MAP method and the GVI method in the UAV trajectory estimation experiment. Figure 2 The upper edge values of the loss functions of the MAP method and the GVI method are 5.923×10 3 and 5.918×10 3 , the upper quartile values were 5.913×10 3 and 5.908×10 3 , and the medians were 5.903×10 3 and 5.900×10 3 , the lower quartile values were 5.882×10 3 and 5.880×10 3 , and the lower edge values are 5.875×10 3 and 5.871×10 3 By comparing the data, we can see that the loss function value of the GVI method is smaller than that of the MAP method. The GVI method can make the loss function converge to a smaller value.
[0170] It should be pointed out that the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes and substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. Gaussian variational inference accurate learning method for UAV trajectories, characterized by: The steps include: Step S1: constructing a mathematical model of the UAV according to the aerodynamic principles and kinematic principles of the UAV in actual flight; Step S2: Based on Gaussian variational inference, the true Bayesian posterior and the approximate posterior are linked through KL divergence, the state estimation problem is transformed into the posterior approximation problem, and then the calculation of KL divergence is transformed into the optimization problem of the loss function by defining the loss function; Step S3: Use Newton's method to update the loss function and use the natural gradient descent method to iteratively optimize the mean and inverse covariance matrix to minimize the loss function V(q) to achieve the purpose of effective approximation of the posterior; In step S2, based on Gaussian variational inference, the true Bayesian posterior and the approximate posterior are linked by KL divergence, and the KL divergence expansion of the approximate posterior and the true Bayesian posterior is obtained as follows: in, is the information entropy of Gaussian distribution, lnp(z) is a constant; Convert KL divergence into a loss function, defined as follows: Among them, φ(x) = -lnp(x|z); V(q) is used as the loss function. The subsequent steps will optimize the loss function V(q) to obtain the minimum value of the loss function; Step S3 specifically includes the following steps: Step S301: Substitute the joint likelihood function of the drone's state / data into the loss function V(q); The joint likelihood function of the drone's state / data is as follows: Among them, K represents the number of data in the subset, k represents the kth group of data, and const represents a constant value; Substitute this formula into φ(x) in the loss function V(q); Step S302: Update the loss function V(q) using Newton's method; For the loss function V(q) with respect to Gaussian parameters μ and ∑ -1 The derivative of is as follows: The second-order derivative of the loss function V(q) is as follows: Comparing the last two equations, we can get: The Taylor series expansion of V(q) is as follows: Where: δμ=μ (i+1) -μ (i) ,δΣ -1 =(∑ -1 ) (i+1) -(∑ -1 ) i , i is the iteration index of the optimization scheme; In order to minimize the loss function V(q), it is necessary to choose appropriate δμ and δ∑ -1 ; For the covariance ∑ -1 ,make get: After using the iterative scheme in the above formula, the change in inverse covariance is: Use the Gaussian nonlinear batch state estimation framework in the maximum a posteriori estimation method and the Newton update method to calculate the mean μ; To determine the minimum, take the derivative of δμ and set it to zero, so that the linear equation system for δμ is transformed into the following form: δμ and δ∑ -1 Substitute the optimization solution into the loss function and get: When δμ and δ∑ -1 are not all zero, and with respect to μ and ∑ -1 When the derivatives of are not all zero, the loss of V(q) will decrease during the iteration process.
2. The Gaussian variational inference accurate learning method for UAV trajectories according to claim 1 is characterized in that: The mathematical model of the drone constructed in step S1 is as follows: In the inertial coordinate system Oxg, assume that the drone is located at any point in space, the coordinates are ξ = [x, g, z], and the Euler angle is Its kinetic equation is: Where v represents the speed of the drone; n x , n z They represent the tangential overload and normal overload of the drone respectively; g represents the acceleration due to gravity, which is 9.8m / s 2 .
3. The Gaussian variational inference accurate learning method for UAV trajectories according to claim 1 is characterized in that: Step S3 specifically also includes the following steps: Step S303: Update δμ and δ∑ by natural gradient descent method -1 ; The vec(·) operator concentrates the variational parameters into a single column vector α, converting the matrix into a vector: The above formula is the gradient of the loss function V(q) with respect to α; the natural gradient descent update scheme is defined as: Γ a is the Fisher information matrix of the variational parameter α; combined with the above formula, we get: is the Kronecker inner product; extract the individual updates: according to Get Updates: Finally, the iterative update method is expressed as: m (i+1) ←m (i) +a B dm ∑ -1(i+1) ←∑ -1(i) +a B δ∑ -1 Among them, α = 0.95, B = 0, 1, 2, ..., and keeps increasing until the loss function decreases compared to the value of the previous iteration.
Citation Information
Patent Citations
A target tracking method with colored measurement noise and variational Bayesian adaptive Kalman filter
CN109508445A
Learning-based rotor unmanned aerial vehicle path tracking prediction control method
CN112416021A
Methods and systems for data collection, learning, and streaming of machine signals for analytics and maintenance using the industrial internet of things
CN112703457A
Distribution line nest fault identification method based on RVI-BNN
CN113903032A
Gaussian variation inference accurate learning method for unmanned aerial vehicle track
CN114580721A
