A data-driven online wind disturbance estimation method for UAV wind disturbance model

Through the data-driven UAV wind disturbance model online wind disturbance estimation method, using the HPS framework and the least squares algorithm, real-time estimation of UAV wind disturbance is achieved, which solves the problem of motion deviation under the influence of wind disturbance in the existing technology. Improved control performance and computational efficiency.

CN114756038BActive Publication Date: 2024-09-17BEIJING INST OF TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202210291293.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-23
Publication Date
2024-09-17
Estimated Expiration
2042-03-23

Smart Images

  • Figure CN114756038B
    Figure CN114756038B
Patent Text Reader

Abstract

The present invention discloses a data-driven online wind disturbance estimation method for a wind disturbance model of an unmanned aerial vehicle. In practical applications, a complex and cumbersome wind disturbance theoretical model is not required. Instead, a data-driven strategy is adopted to obtain a set of neural network feature quantities that can display wind disturbance characteristics through offline training, thereby avoiding the huge amount of calculation required for updating the neural network parameters online. The neural network feature quantities are linearly combined using a least squares algorithm, and the parameters of the linear combination can be adjusted online using online real-time feedback data to achieve an adaptive estimation effect. The method of the present invention utilizes the concept of multi-task learning, uses the neural network features as a shared layer, uses the linear combination of features as a top layer, places the neural network feature training process with a large amount of calculation offline, and runs the least squares algorithm with a small amount of calculation online, thereby fully utilizing the powerful representation capability of the neural network and enabling the online calculation amount to meet the requirements of real-time operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicle (UAV) anti-disturbance control, and in particular to an online wind disturbance estimation method for a data-driven UAV wind disturbance model. Background Art

[0002] In recent years, due to the wide application of UAVs in exploration, search and rescue, space imaging, transportation and other scenarios, the research on UAV control has received great attention from academia and industry. It is worth noting that in practical applications, wind disturbance in the natural environment is almost everywhere, causing uncertainty and complexity in the UAV system. If not properly handled, it will have a serious impact on the movement of the UAV. However, the general UAV system motion control usually does not design an anti-disturbance control system for wind disturbance scenarios, but simply introduces an integral link in the controller to suppress possible disturbances. Since the integral takes time to offset the disturbance, the disturbance suppression process is very slow. In this process, the UAV will deviate significantly from the set target point. Compared with feedback control, feedforward control can effectively suppress the adverse effects of external disturbances by compensating and offsetting disturbances in real time. However, in practical applications, it is necessary to obtain an estimated value of wind disturbance online before feedforward compensation can be performed.

[0003] Therefore, in order to improve the control performance of UAV in wind disturbance scenarios by using the feedforward control idea, it is necessary to design a reliable wind disturbance estimation method. Summary of the invention

[0004] In view of this, the present invention provides a data-driven online wind disturbance estimation method for a UAV wind disturbance model, which can be trained in a data-driven manner based on pre-collected flight record data without analyzing a complex wind disturbance mechanism model, and uses a least squares algorithm to linearly combine the neural network feature quantities online to achieve real-time estimation of the wind disturbance amount.

[0005] In order to achieve the above-mentioned object of the invention, the technical solution of the present invention is:

[0006] A data-driven online wind disturbance estimation method for an unmanned aerial vehicle wind disturbance model, characterized in that the specific steps include:

[0007] Step 1: Construct a wind disturbance estimator: define different wind disturbance environments as different wind disturbance tasks, and construct a bottom-level parameter-sharing HPS framework for different wind disturbance tasks. The bottom layer of the HPS framework is a shared layer, and the top layer is a single linear layer. All wind disturbance tasks share parameters at the bottom layer, and are independent at the top layer.

[0008] The shared layer adopts a neural network structure. The shared layer takes the state data of the drone under wind disturbance as input. The input state data is trained by the neural network to obtain the neural network feature quantity at each sampling time point; the output of the shared layer is the neural network feature quantity.

[0009] The single linear layer takes the neural network feature as input, performs linear combination on the neural network feature, and the output of the single linear layer is the wind disturbance estimation result.

[0010] Step 2: Use the training data to perform offline training on the shared layer in the constructed wind disturbance estimator.

[0011] Step 3: Deploy the wind disturbance estimator trained in step 2 onto the UAV, obtain the real-time status data of the UAV, and use the real-time status data to perform online training on the single linear layer in the wind disturbance estimator to obtain an adaptive wind disturbance estimation result.

[0012] Furthermore, in step 2, offline training is performed on the shared layer in the constructed wind disturbance estimator using the training data, specifically:

[0013] The first step is to set the hyperparameters of the neural network structure used in the shared layer. The hyperparameters include architecture, learning rate, batch size, and maximum number of iterations.

[0014] The second step is to randomly initialize the parameters Θ of the shared layer network structure.

[0015] The third step is to record the parameters Θ of the neural network structure of the current shared layer.

[0016] Step 4: For each wind disturbance task dataset, perform the following process to obtain the shared layer neural network structure:

[0017] S401, reset the parameters of the shared layer neural network structure to the Θ value in step 3.

[0018] S402, in the task data set D i Extract a batch of data d i For current training.

[0019] S403, the N drone status data s1, s2, ..., s N Input the neural network and get M neural network features k1, k2, ..., k M .

[0020] S404, run the linear least squares algorithm to linearly combine the neural network features to obtain the minimum residual square sum as the loss value J i; Use the neural network training optimizer Adam to run the back propagation algorithm according to the loss value to update the parameters Θ of the neural network structure of the network sharing layer.

[0021] S405: From the task data set D i Extract the test set t i , and d i Perform the same steps S403 to S404 and record the parameter change Δ of the shared layer neural network structure Θ i.

[0022] Step 5: According to the formula Θ=Θ+β∑Δ Θ i updates the network sharing layer parameters, where β is the set update coefficient.

[0023] Step 6: Determine whether the current number of iterations is greater than the maximum number of iterations. If not, return to step 3; otherwise, end the training and save all parameters of the shared layer neural network structure, which is the optimized shared layer parameter θ. * , that is, the neural network feature model k of the shared layer in the wind disturbance estimator is established m .

[0024] Furthermore, in step three, the single linear layer in the wind disturbance estimator is trained online using the real-time state data, using a batch least squares algorithm.

[0025] Furthermore, in step 3, the single linear layer in the wind disturbance estimator is trained online using the real-time state data, which specifically includes the following steps:

[0026] According to the real-time state of the drone at the current time t, run the shared layer neural network to obtain the neural network feature vector φ(t):

[0027]

[0028] in They are the 1st to mth neural network features at time t respectively.

[0029] Update the two intermediate variables Q(t) and K(t) at time t:

[0030]

[0031] K(t)=Q(t)φ(t)

[0032] Where P(t) is the value of the third intermediate variable at time t, and P(t-1) is the value of the third intermediate variable at time t-1.

[0033] Time value.

[0034] According to the top-level parameters of the previous moment The wind disturbance is estimated to be

[0035]

[0036] Update top-level parameters The update law is:

[0037]

[0038] where a d (t) is the actual wind disturbance at time t.

[0039] Update the intermediate variable P(t) to prepare for the next recursive operation:

[0040]

[0041] Using the above process, the online linear combination of neural network features is realized in the single linear layer to achieve real-time estimation of wind disturbance.

[0042] Furthermore, the real-time status data of the UAV includes the acceleration, attitude angle, attitude angle error and motor speed of the UAV at the same moment, and also includes the actual wind disturbance of the UAV at the same moment.

[0043] Furthermore, the drone is a quad-rotor drone.

[0044] Beneficial effects:

[0045] 1. In practical applications, the method of the present invention does not require a complex and cumbersome wind disturbance theoretical model, but adopts a data-driven strategy to obtain a set of neural network feature quantities that can display wind disturbance characteristics through offline training, thereby avoiding the huge amount of calculation for online updating of neural network parameters; the method of the present invention uses a least squares algorithm to linearly combine the neural network feature quantities, and can use online real-time feedback data to adjust the parameters of the linear combination online to achieve an adaptive estimation effect.

[0046] 2. The method of the present invention utilizes the concept of multi-task learning, takes the neural network features as the shared layer, takes the linear combination of the features as the top layer, puts the computationally intensive neural network feature training process offline, and runs the least squares algorithm with a relatively small computational amount online, which can fully utilize the powerful representation ability of the neural network and enable the online computational amount to meet the requirements of real-time operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 The figure is a flow chart of the method of the present invention.

[0048] Figure 2 This is a schematic diagram of the HPS framework.

[0049] Figure 3 This is a curve chart showing the change in loss value of the standardized data. DETAILED DESCRIPTION

[0050] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0051] like Figure 1 As shown, the present invention proposes a data-driven online wind disturbance estimation method for a UAV wind disturbance model, and the specific steps include:

[0052] Step 1: Construct a wind disturbance estimator: Define different wind disturbance environments as different wind disturbance tasks, and construct a bottom-level parameter-sharing HPS framework for different wind disturbance tasks. The bottom layer of the HPS framework is a shared layer, and the top layer is a single linear layer. All wind disturbance tasks share parameters at the bottom layer, and are independent at the top layer.

[0053] For learning multiple wind disturbance tasks, the network is usually trained using the Hard Parameter Sharing (HPS) method. The basic framework is as follows: Figure 2 As shown in the figure. The HPS framework shows that no matter how many wind disturbance tasks there are in the end, they are adapted to different wind disturbance tasks through independent top-level parameters on the basis of shared and unified bottom-level parameters. The more parameters are shared in the framework, the lower the probability of overfitting of the final trained model. Based on this, when designing the wind disturbance estimator, only a single linear layer is used as the top layer, and all other intermediate layers are trained as shared layers.

[0054] In the embodiment of the present invention, the shared layer adopts a neural network structure. The shared layer takes the state data of the drone under wind disturbance as input. The input state data is trained by the neural network to obtain the neural network feature quantity at each sampling time point. The output of the shared layer is the neural network feature quantity. The single linear layer takes the neural network feature quantity as input, linearly combines the neural network feature quantity, and the output of the single linear layer is the wind disturbance estimation result.

[0055] The parameters of the single linear layer are obtained through the least squares algorithm, and the parameters of the shared layer are updated and iterated through the error back propagation algorithm during neural network training. The final output of the shared layer is used as the neural network feature and as the input element of the linear least squares algorithm running on the top layer.

[0056] Step 2: Use the training data to perform offline training on the shared layer in the constructed wind disturbance estimator.

[0057] Under different wind disturbances, the neural network feature quantities should make the sum of squares of the residuals as small as possible, that is, they can adapt to different disturbances. When training the neural network feature quantities offline, different wind disturbance environments are defined as different training tasks, and the neural network feature quantity training process is transformed into a machine learning problem in a multi-task scenario. In an embodiment of the present invention, the wind turbine is placed in different directions and positions, and the air outlet is kept facing the hovering drone to produce different wind disturbance effects on the drone.

[0058] The relevant status data of the drone (acceleration, attitude angle, attitude angle error, motor speed, etc.) n (n∈[1, N], where N is the number of input states) is low-pass filtered and used as the input of the neural network. The output of the neural network is a set of feature quantities k obtained by nonlinear mapping of the state vector. m (m∈[1,M], where M is the number of neural network features and is a hyperparameter that needs to be adjusted), that is:

[0059] k m =f m (s1,s2,...,s N )

[0060] Among them, fm is the nonlinear function corresponding to the neural network, which is determined by the network structure and network parameters Θ. The network is obtained and fixed through offline training in a data-driven way. When deployed online, the network structure and network parameters will not be changed.

[0061] Under different wind disturbance conditions i (different magnitudes and directions, i∈[1, I N ]) to collect the drone runtime data D i , the corresponding multi-task learning problem is modeled as follows:

[0062]

[0063] Among them J i is the cost function under wind disturbance condition i. The cost decreases as the estimation error of the wind disturbance estimator decreases. The specific expression is:

[0064]

[0065] The introduction of ≈ in the above formula is due to the approximation when continuous integral is replaced by numerical integral. According to the cost function expression, the cost function is the data set D i , least squares solution is related to the neural network shared layer parameter θ that represents the neural network feature quantity. It can be expressed as Φ and δa d function, and the elements in Φ are composed of k t (Θ,s1,s2,...,sN ), where s1, s2, ..., s N ∈D i x and δa d ∈D i .therefore Yes D i , a function of Θ. And since It is the solution of the linear least squares problem, so the training process can be equivalent to a two-level optimization problem:

[0066]

[0067] In order to obtain the shared layer parameters, the optimization problem needs to be solved hierarchically: the inner optimization problem is solved analytically by the linear least squares algorithm, and the outer optimization problem is to update the shared layer parameters of the multi-task learning neural network, using the gradient descent-based neural network optimizer to solve the error back propagation algorithm. The pre-training of the shared layer parameters is performed offline after collecting data. The entire training process follows the following steps:

[0068] The first step is to set the hyperparameters of the neural network structure used in the shared layer. The hyperparameters include architecture, learning rate, batch size, and maximum number of iterations.

[0069] The second step is to randomly initialize the parameters Θ of the shared layer network structure.

[0070] The third step is to record the parameters Θ of the neural network structure of the current shared layer.

[0071] Step 4: For each wind disturbance task dataset, perform the following process to obtain the shared layer neural network structure:

[0072] S401, resetting the parameters of the shared layer neural network structure to the θ value in step 3;

[0073] S402, in the task data set D i Extract a batch of data d i For current training;

[0074] S403, the N drone status data s1, s2, ..., s N Input the neural network and get M neural network features k1, k2, ..., k M ;

[0075] S404, run the linear least squares algorithm to linearly combine the neural network features to obtain the minimum residual square sum as the loss value J i; Using the neural network training optimizer Adam, run the back propagation algorithm according to the loss value to update the parameters Θ of the neural network structure of the network sharing layer;

[0076] S405: From the task data set D i Extract the test set t i , and d i Perform the same steps S403 to S404 and record the parameter change Δ of the shared layer neural network structure Θ i.

[0077] Step 5: According to the formula Θ=Θ+β∑Δ Θ i updates the network sharing layer parameters, where β is the set update coefficient.

[0078] Step 6: Determine whether the current number of iterations is greater than the maximum number of iterations. If not, return to step 3; otherwise, end the training and save all parameters of the shared layer neural network structure, which is the optimized shared layer parameter θ. * , that is, the neural network feature model k of the shared layer in the wind disturbance estimator is established m .

[0079] Step 3: Deploy the wind disturbance estimator trained in step 2 onto the drone, obtain the real-time status data of the drone, and use the real-time status data to perform online training on the single linear layer in the wind disturbance estimator to obtain an adaptive wind disturbance estimation result. The specific method is:

[0080] is the neural network feature quantity k generated by the neural network m The changing disturbance acceleration is inferred online, using the least squares algorithm which has a small computational cost and is widely used in the fields of system identification and adaptive control. The least squares problem in wind disturbance estimation is modeled as follows:

[0081] For a given set of neural network features TN is the number of sampling time points, and the disturbance amount is Find a set of parameters θ M , so that the disturbance estimation error ∈ t The sum of squares is the smallest, that is:

[0082]

[0083] Among them, J is the cost function, and its value is the disturbance estimation error ∈ t The sum of the squares, that is:

[0084]

[0085] The constraints that need to be satisfied in the above formula are:

[0086]

[0087] Right now:

[0088] δa d =Φθ M +∈

[0089] in

[0090]

[0091] The analytical solution to the above least squares problem is:

[0092]

[0093] The residual sum of squares for the least squares problem is:

[0094]

[0095] Note that the disturbance is actually a three-dimensional vector. For the sake of simplicity in formula description, its dimension is ignored when deriving the above formulas. In actual operation, it is necessary to solve the linear least squares problem with three independent parameters.

[0096] When solving the least squares problem, the residual sum of squares is a function of Φ, and each element of Φ is a basis vector at different sampling times. Therefore, the size of the residual sum of squares is closely related to the neural network feature quantity. Appropriate neural network feature quantities help to obtain a small residual sum of squares, that is, a small estimation error.

[0097] The top-level parameters can be obtained through a linear least squares algorithm, such as a batch least squares algorithm. However, during actual online operation, as time goes by, the matrix Φ in the batch least squares algorithm will continue to "lengthen", causing the computational complexity to continue to increase according to the polynomial scale, bringing difficulties in real-time computing. Taking all the above into consideration, the update of the online top-level parameters adopts a recursive least squares algorithm whose computational complexity does not increase over time.

[0098] According to the established cost function, the optimization of the final parameters is carried out according to the principle of minimizing the sum of squares of the estimated errors at each moment. Considering that the disturbance is changing, the top-level parameters to be estimated need to be able to be updated adaptively. The estimated error value closer to the current moment can better reflect the suitability of the parameter, so a larger weight needs to be applied. Therefore, on the basis of the basic least squares method, different weights are applied to the estimated error terms at each moment, and the weights gradually decay as time goes by. The commonly used weight decay method is exponential decay, and the cost function becomes:

[0099]

[0100] In the field of system identification and adaptive control, λ is called the forgetting factor, and the corresponding algorithm is called the recursive least squares algorithm with forgetting factor. The recursive estimation process is shown below.

[0101] According to the current state of the UAV (including the acceleration, attitude angle, attitude angle error and motor speed of the UAV at the same time and the actual wind disturbance of the UAV at the same time), run the shared layer neural network to obtain the neural network feature vector φ(t):

[0102]

[0103] Update intermediate variables Q(t) and K(t):

[0104]

[0105] K(t)=Q(t)φ(t)

[0106] According to the top-level parameters of the previous moment Estimated disturbance

[0107]

[0108] Update top-level parameters The update law is:

[0109]

[0110] Update the intermediate variable P(t) to prepare for the next recursive operation:

[0111]

[0112] By using the above process, the online linear combination of neural network features can be realized to achieve real-time estimation of wind disturbance. The estimated loss results are as follows: Figure 3 shown.

[0113] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data-driven online wind disturbance estimation method for an unmanned aerial vehicle wind disturbance model, characterized in that: The specific steps include: Step 1: Construct a wind disturbance estimator: define different wind disturbance environments as different wind disturbance tasks, and construct a bottom-level parameter-sharing HPS framework for different wind disturbance tasks. The bottom layer of the HPS framework is a shared layer, and the top layer is a single linear layer. All wind disturbance tasks share parameters at the bottom layer, and are independent at the top layer. The shared layer adopts a neural network structure. The shared layer takes the state data of the drone under wind disturbance as input. The input state data is trained by the neural network to obtain the neural network feature quantity at each sampling time point; the output of the shared layer is the neural network feature quantity; The single linear layer takes the neural network feature quantity as input, performs linear combination on the neural network feature quantity, and the output of the single linear layer is the wind disturbance estimation result; Step 2: Use the training data to perform offline training on the shared layer in the constructed wind disturbance estimator; Step 3: deploy the wind disturbance estimator trained in step 2 onto the UAV, obtain the real-time status data of the UAV, and use the real-time status data to perform online training on the single linear layer in the wind disturbance estimator to obtain an adaptive wind disturbance estimation result; In the step 2, offline training is performed on the shared layer in the constructed wind disturbance estimator using the training data, specifically: The first step is to set the hyperparameters of the neural network structure used in the shared layer, including architecture, learning rate, batch size and maximum number of iterations; The second step is to randomly initialize the parameters Θ of the shared layer network structure; Step 3: Record the parameters θ of the neural network structure of the current shared layer; Step 4: For each wind disturbance task dataset, perform the following process to obtain the shared layer neural network structure: S401, resetting the parameters of the shared layer neural network structure to the θ value in step 3; S402, in the task data set D i Extract a batch of data d i For current training; S403, the N drone status data s1, s2, ..., s N Input the neural network and get M neural network features k1, k2, ..., k M ; S404, run the linear least squares algorithm to linearly combine the neural network features to obtain the minimum residual square sum as the loss value J i ; Using the neural network training optimizer Adam, run the back propagation algorithm according to the loss value to update the parameter Θ of the neural network structure of the network sharing layer; S405: From the task data set D i Extract the test set t i , and d i Perform the same steps S403 to S404 and record the parameter change Δ of the shared layer neural network structure Θ i; Step 5: According to the formula Θ=Θ+β∑Δ Θ i updates the network sharing layer parameters, where β is the set update coefficient; Step 6: Determine whether the current number of iterations is greater than the maximum number of iterations. If not, return to step 3; otherwise, end the training and save all parameters of the shared layer neural network structure, which is the optimized shared layer parameter θ. * , that is, the neural network feature model k of the shared layer in the wind disturbance estimator is established m ; In the step 3, the single linear layer in the wind disturbance estimator is trained online using the real-time state data, using a batch least squares algorithm; In step 3, the single linear layer in the wind disturbance estimator is trained online using real-time state data, which specifically includes the following steps: According to the real-time state of the drone at the current time t, run the shared layer neural network to obtain the neural network feature vector φ(t): in They are the 1st to mth neural network features at time t respectively; Update the two intermediate variables Q(t) and K(t) at time t: K(t)=Q(t)φ(t) Where P(t) is the value of the third intermediate variable at time t, and P(t-1) is the value of the third intermediate variable at time t-1; According to the top-level parameters of the previous moment The wind disturbance is estimated to be Update top-level parameters The update law is: where a d (t) is the actual wind disturbance at time t; Update the intermediate variable P(t) to prepare for the next recursive operation: Using the above process, the online linear combination of neural network features is realized in the single linear layer to achieve real-time estimation of wind disturbance.

2. The wind disturbance estimation method according to claim 1, characterized in that: The real-time status data of the UAV includes the acceleration, attitude angle, attitude angle error and motor speed of the UAV at the same moment, and also includes the actual wind disturbance amount of the UAV at the same moment.

3. The wind disturbance estimation method according to claim 1, characterized in that: The UAV is a quad-rotor UAV.

Citation Information

Patent Citations

  • Vector-field-based small-sized unmanned plane wind-field anti-interference self-adaptive control method

    CN102419596A

  • Method for guiding landing of unmanned aerial vehicle in wind disturbance environment

    CN110487280A

  • Unmanned aerial vehicle active fault-tolerant control method based on reinforcement learning

    CN111190429A

  • Wind resistance control method for oil and gas pipeline inspection unmanned aerial vehicle

    CN113433957A

  • Method for controlling a multi-rotor rotary-wing drone, with cross wind and accelerometer bias estimation and compensation

    US20150057844A1