CN113985900A - Attitude dynamic characteristic model, identification method and self-adaptive flexible prediction control method for quad-rotor unmanned aerial vehicle - Google Patents
Attitude dynamic characteristic model, identification method and self-adaptive flexible prediction control method for quad-rotor unmanned aerial vehicle Download PDFInfo
- Publication number
- CN113985900A CN113985900A CN202110889990.9A CN202110889990A CN113985900A CN 113985900 A CN113985900 A CN 113985900A CN 202110889990 A CN202110889990 A CN 202110889990A CN 113985900 A CN113985900 A CN 113985900A
- Authority
- CN
- China
- Prior art keywords
- model
- output
- aerial vehicle
- unmanned aerial
- quad
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000000694 effects Effects 0.000 claims abstract description 22
- 230000008034 disappearance Effects 0.000 claims abstract description 6
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 claims description 21
- 230000004913 activation Effects 0.000 claims description 13
- 230000001419 dependent effect Effects 0.000 claims description 12
- 238000010586 diagram Methods 0.000 claims description 11
- 230000003044 adaptive effect Effects 0.000 claims description 7
- 239000011159 matrix material Substances 0.000 claims description 7
- 238000012937 correction Methods 0.000 claims description 6
- 238000005457 optimization Methods 0.000 claims description 6
- 238000005315 distribution function Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 claims description 2
- 230000000630 rising effect Effects 0.000 claims description 2
- 230000001105 regulatory effect Effects 0.000 claims 1
- 230000008901 benefit Effects 0.000 abstract description 2
- 230000002708 enhancing effect Effects 0.000 abstract description 2
- 238000004422 calculation algorithm Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 16
- 238000013527 convolutional neural network Methods 0.000 description 6
- 210000002569 neuron Anatomy 0.000 description 6
- 238000012549 training Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 238000012360 testing method Methods 0.000 description 5
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000012512 characterization method Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000005312 nonlinear dynamic Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000003723 Smelting Methods 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/08—Control of attitude, i.e. control of roll, pitch, or yaw
- G05D1/0808—Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft
- G05D1/0816—Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft to ensure stability
- G05D1/0825—Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft to ensure stability using mathematical models
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
- Mathematical Physics (AREA)
- Mathematical Analysis (AREA)
- Algebra (AREA)
- Aviation & Aerospace Engineering (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Automation & Control Theory (AREA)
- Feedback Control In General (AREA)
Abstract
The invention relates to a posture dynamic characteristic model of a quadrotor unmanned aerial vehicle, which is characterized in that three posture angles of the quadrotor unmanned aerial vehicle are used as outputs, four rotor motor voltages of the quadrotor unmanned aerial vehicle are used as inputs, and a RecNN-ARX dynamic characteristic model of the quadrotor unmanned aerial vehicle is established. The method has the advantages that a nonlinear model RecNN-ARX which has strong representation capability and describes the attitude dynamic characteristics of the quadrotor unmanned aerial vehicle is obtained by modeling aiming at the attitude dynamic characteristics of the quadrotor unmanned aerial vehicle and combining the RecNN model and the SD-ARX model, wherein the RecNN can effectively solve the problem of gradient disappearance, and the prediction precision of the model is improved compared with the linear ARX model; the method uses the residual convolutional network RecNN to fit the nonlinear coefficient of the SD-ARX model, and compared with the common convolutional network, the obtained model is more stable; and the problem of small gradient is effectively solved, so that the model has the capability of expanding the number of network layers and enhancing the nonlinear fitting effect.
Description
Technical Field
The invention relates to the field of attitude control of a quad-rotor unmanned aerial vehicle, and provides a RecN-ARX model for describing nonlinear dynamic characteristics of the attitude of the quad-rotor unmanned aerial vehicle and an identification method thereof. Meanwhile, a method for predicting and controlling the attitude of the quad-rotor unmanned aerial vehicle based on the RecNN-ARX model by sampling the self-adaptive softening factors is provided, the softening factors are associated with control errors, and the softening factors are adjusted in different control stages to obtain a better control effect.
Background
At present, the application of four rotor unmanned aerial vehicle in actual life is more and more extensive, as following scene: in a certain large-scale metal smelting plant area, due to the work and management requirements, environmental parameters such as temperature, humidity and the like of each point in the plant area need to be monitored; need monitor factory air circumstance index etc. traditional method had both consumed a large amount of manpower, materials and financial resources its effect not good enough, nevertheless through four rotor unmanned aerial vehicle collocation each instrument then can be fast convenient accurate realization above-mentioned work, but above-mentioned work is also very high to four rotor unmanned aerial vehicle attitude control precision's requirement. As a complex system, the quad-rotor unmanned aerial vehicle has the characteristics of high speed, strong nonlinearity, strong coupling, multiple input and multiple output and the like, and brings difficulty for the design of a control algorithm. Before a control study is performed, it is usually necessary to build a reasonable model of the controlled object for the design of the controller. The modeling methods are generally classified into mechanism modeling and experimental modeling. For a quad-rotor unmanned aerial vehicle, a physical model of the quad-rotor unmanned aerial vehicle is established through dynamic analysis; or a basic control method is applied to control experiments and obtain identification data, and experimental modeling of the quad-rotor unmanned aerial vehicle object is carried out according to the data. For a quad-rotor unmanned aerial vehicle object, a physical model obtained by using a mechanism modeling mode has considerable limitation because an accurate expression of a mechanism model is difficult to obtain and relevant parameters are difficult to accurately obtain. The experimental modeling mode can obtain a model of the system by sampling the input and output data of the system and adopting a system identification method, the obtained model has stronger anti-interference capability, but the modeling effect can be greatly different by adopting different identification models. After obtaining the model of the quad-rotor drone object, the quad-rotor drone object can be used as a prediction model, and a prediction control algorithm is designed on the basis of the prediction model. Because the actual output of the system cannot realize rapid change like the expected output, a fixed softening factor is often added in the traditional predictive control algorithm to soften the reference trajectory to obtain a better control effect. However, the predictive control using the fixed softening factor method sometimes has difficulty in achieving satisfactory results.
Disclosure of Invention
Aiming at the experimental modeling problem of the quad-rotor unmanned aerial vehicle, the invention provides a RecNN-ARX model combining a convolutional neural network and an SD-ARX model, which is used for describing the dynamic change characteristic of the attitude of the quad-rotor unmanned aerial vehicle. The model combines the nonlinear parameter fitting capability of a residual convolutional network and the nonlinear system characterization capability of an SD-ARX model, and is a locally linear and globally nonlinear model. The residual convolution network structure is flexible and variable, and compared with a common convolution network, the problem of gradient disappearance in modeling can be better solved; the SD-ARX model can comprehensively represent the nonlinear dynamic characteristics of the system by selecting historical state variables related to the system.
Aiming at the problem of the design of the prediction control algorithm of the attitude of the quad-rotor unmanned aerial vehicle, the invention also provides a flexible factor self-adaptive quad-rotor unmanned aerial vehicle attitude prediction control algorithm based on the Recnn-ARX model, which relates the flexible factor with the deviation between the actual value and the expected value of the output signal, and corrects the flexible factor on line according to the difference of the deviation, thereby obtaining better control effect than the traditional prediction control algorithm adopting the fixed flexible factor.
The invention provides a four-rotor unmanned aerial vehicle attitude dynamic characteristic model and an identification method thereof, and a four-rotor unmanned aerial vehicle attitude self-adaptive softening factor predictive control algorithm based on a constructed characteristic model, so as to improve the prediction precision of the four-rotor unmanned aerial vehicle attitude dynamic characteristic model and improve the predictive control effect.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a RecNN-ARX model of attitude dynamic characteristics of a quad-rotor unmanned aerial vehicle is disclosed, and the expression of the model is as follows:
wherein y (t) represents the actual attitude angle output of the quad-rotor unmanned aerial vehicle at the moment t, and the actual attitude angle output is a pitch angle phi (t), a roll-over angle theta (t) and a yaw angle psi (t); u (t) represents the voltages of the four motors of the quad-rotor aircraft at time t;is the state dependent offset at time t; ny, nu are the output and input orders of the model respectively,is a state dependent coefficient matrix.
The state dependent coefficients of the above-mentioned recann-ARX model of the quad-rotor drone are calculated by the following recann (residual convolutional network) model:
wherein ,the state dependent coefficient matrix is an element of a state dependent coefficient matrix in a RecNN-ARX model of the quad-rotor unmanned aerial vehicle; h isi(t) represents the output of the fully-connected layer of the residual convolutional network,respectively representing offset coefficient, output coefficient and offset parameter in input coefficient in a RecNN-ARX model of the quad-rotor unmanned aerial vehicle; wi、biRepresenting weight parameters and bias parameters of a full-link layer of the residual convolutional network, and g (-) representing an activation function of the full-link layer;represents the jth feature map, M, of the ith convolutional layer in the r-th residual block in the ith residual convolutional network1、M2Respectively representing the number of convolution kernels of a first convolution layer and the number of convolution kernels of a third convolution layer in the residual block and the number of convolution kernels of a second convolution layer;showing a one-dimensional vector obtained by flattening all output feature maps of the nth residual block at the t moment, f (-) shows an activation function of the convolutional layer,a jth feature map representing an r-th residual block,is the input vector of the first residual block, i.e. the input vector of the residual convolutional network, [ y (t-1)T y(t-2)T … y(t-d)T]TAnd d is the dimension of the input vector.
The RecNN-ARX model of the quad-rotor unmanned aerial vehicle has the remarkable characteristic of modularization, wherein the residual convolutional neural network part comprises the following modules:
(1) an input layer for receiving an input state vector input;
(2) the residual error blocks are formed by combining convolution layers and used for carrying out residual error convolution operation on the input vector input, calculating an output characteristic diagram through an activation function and a weight parameter of each convolution layer and taking the output characteristic diagram as the input of the next residual error block; when the gradient of the output layer is transmitted to the input layer, the residual block provides a bypass for gradient rising, and the gradient of the output layer is transmitted to the position close to the input layer, so that the parameters of the input layer can be updated normally, and the problem of gradient disappearance is avoided;
(3) the full connection layer is used for processing the flattened characteristic diagram;
(4) the output layer, which may be considered as a fully connected layer without an activation function, performs only linear operations. And the output layer linearly combines the characteristics output by the full connection layer to obtain the state dependent coefficient of the RecnN-ARX model.
The identification method of the RecNN-ARX model of the quad-rotor unmanned aerial vehicle comprises the following steps:
(a) acquiring output/input data of the quad-rotor unmanned aerial vehicle as identification data of the RecNN-ARX model;
(b) selecting the output/input variable orders ny and nu of the Recnn-ARX model and the structural parameter M of the model1、 M2、n;
(c) Assigning initial values to the model parameters;
(d) performing forward operation on the model to obtain the predicted output of the RecNN-ARX model of the quad-rotor unmanned aerial vehicle, and calculating the MSE (Mean Square Error) between the predicted output and the expected output as a loss function;
(e) calculating the gradient of backward propagation according to the loss function, and updating parameters from the output layer to the input layer in a backward mode;
(f) repeating steps (d) - (e) until the optimal parameters of the model are found;
(g) and (4) selecting other model input and output orders and model structure parameters, repeating the steps (b) to (f), and finding out a model order and structure parameter with better model prediction effect under the condition of meeting the real-time requirement of the system.
Compared with the traditional CNN-ARX model, the quad-rotor unmanned aerial vehicle RecNN-ARX model established by the invention can effectively solve the problem of gradient disappearance and avoid the phenomenon that the prediction precision of the model is reduced when the number of network layers is deepened. The RecnN-ARX model is more stable than the CNN-ARX model, and provides an expansion capability of deepening the number of neural network layers within an allowable calculation amount range.
In order to solve the problem of attitude control of a quad-rotor unmanned aerial vehicle, the invention adopts the technical scheme that: a four-rotor unmanned aerial vehicle attitude self-adaptive flexible prediction control method. Compared with the traditional predictive control algorithm, the self-adaptive softening predictive control algorithm provided by the invention can be used for self-adaptively adjusting the compliance factor in the controller along with the size of the error. When the error is large, the system is enabled to respond quickly, and the actual output of the system is enabled to be close to the target output quickly; when the error is small, the actual output is smoothly close to the expected value, the system is kept stable, and the overshoot of the system is reduced; when the actual output of the system is close to the expected value, the softening factor of the system is further increased, the influence of micro perturbation and interference on the system is avoided, and the anti-interference capability of the system is increased. The method comprises the following control quantity optimization strategy and compliance factor adaptation law.
The attitude control quantity optimization strategy of the quad-rotor unmanned aerial vehicle is as follows:
in the formula ,Q≥0,R1>0,R2weighting matrix is more than 0;the regression coefficient of a quad-rotor unmanned aerial vehicle RecNN-ARX model is fixed at the moment t, and an output pre-sequencing column is obtained based on the recursive quad-rotor unmanned aerial vehicle RecNN-ARX model;is an output expected value sequence after being corrected by a self-adaptive softening factor; u (t) is the sequence of control variables to be optimized,. DELTA.U (t) is the sequence of control increments, U*(t) is a controlled variable sequence obtained by optimization, u in the sequence*(t) control for time t; n is a radical ofyIs a prediction of the time domain length, NuIs the control time domain length.
The self-adaptation law of the softening factors in the attitude prediction control law of the quad-rotor unmanned aerial vehicle is as follows:
where y (t) is the actual output value of the quad-rotor unmanned plane at the current time t, e (t) represents the deviation between the output expected value and the actual value,is the desired output, y, after adaptive softeningrIs the desired output, α is the softening factor; alpha is alpha0Is the initial value of the softening factor, mu and sigma are the mean and variance of the normal distribution function, a is the scaling factor, b is the deviation term, fe(e (t)) represents a softening factor correction function based on error variation.
The method for tuning the self-adaptation law parameters of the softening factors comprises the following steps:
(1) firstly, the attitude prediction control of the quad-rotor unmanned aerial vehicle with fixed softening factors is used, and an initial value alpha of the softening factor with better control effect is searched between [0 and 1 ]0;
(2) Then, the attitude prediction control of the quad-rotor unmanned aerial vehicle of the self-adaptive softening factor is sampled, and proper correction direction and force are selected according to the characteristics of the system and the control result to search proper parameters a and b;
(3) according to the attitude prediction control effect of the quad-rotor unmanned aerial vehicle, the error tolerance range is finely adjusted, and suitable parameters mu and sigma are found.
The specific process of the self-adaptive law parameter setting comprises the following steps:
(1) taking a to 0, i.e. adjusting the initial value alpha of the softening factor without considering the adaptation0A relatively good control effect is obtained;
(2) and taking mu as 0 and sigma as 1, and finely adjusting two parameters of a and b on the basis of the two parameters. Taking a positive-acting system as an example, if the dynamic response of the system is slow, a is greater than 0, b is less than 0, and when the set value changes, the system error e (t) increases, and the system deviates far from the steady state. At this time, the correction coefficient fe(e (k)) α is about ab, so α < α0The dynamic response speed of the system is accelerated; when the system is close to the steady state,if the parameters are chosen properly, then alpha > alpha0The control action of the system is slowed to reduce overshoot. If the dynamic response of the system is faster, a is greater than 0 and b is greater than 0, and the analysis is the same as the above;
(3) finally setting parameters mu, sigma and mu to determine fe(e (k)) if μ > 0, it means that the tolerance to the forward error is high, and even if the forward error is slightly large, the system is considered to be in a steady state; if μ < 0, in contrast, in general, μmay be 0. The parameter σ determines the sensitivity range of steady state errors, which can be considered to enter steady state at μ ± σ. The control effect can be finely adjusted through mu and sigma to achieve the best effect.
Compared with the prior art, the invention has the beneficial effects that:
1. the method aims at the modeling of the attitude dynamic characteristics of the quad-rotor unmanned aerial vehicle, and combines a RecNN model and an SD-ARX model to obtain a nonlinear model RecNN-ARX which has stronger representation capability and describes the attitude dynamic characteristics of the quad-rotor unmanned aerial vehicle, wherein the RecNN can effectively solve the problem of gradient disappearance, and the prediction precision of the model is improved compared with a linear ARX model.
2. The method uses the residual convolutional network RecNN to fit the nonlinear coefficient of the SD-ARX model, and compared with the common convolutional network, the obtained model is more stable; the problem of small gradient is effectively solved, so that the model has the capability of expanding the number of network layers and enhancing the nonlinear fitting effect;
3. the RecNN-ARX model and the identification method thereof provided by the invention can also be applied to the modeling of other multi-input multi-output complex nonlinear systems similar to a four-rotor unmanned plane;
4. the posture self-adaptive softening predictive control algorithm of the quad-rotor unmanned aerial vehicle improves the traditional model-based predictive control algorithm, and can obtain better control effect than the traditional predictive control algorithm using a fixed softening factor after setting the parameters in the self-adaptive law of the softening factor.
Drawings
FIG. 1 is a diagram of a RecNN-ARX model architecture of a quad-rotor drone system according to the present invention;
fig. 2 is a flow chart of the recognition process of the ReCNN-ARX model of the quad-rotor unmanned aerial vehicle system according to the present invention.
Detailed Description
Aiming at a quad-rotor unmanned aerial vehicle, voltages of four rotor motors of the quad-rotor unmanned aerial vehicle are used as model input, three attitude angles of a pitch angle, a roll-over angle and a yaw angle of the aircraft are used as model output, and a four-input three-output RecNN-ARX model is established.
The initial input order nu, output order ny, and state vector dimension d of the model are first determined. Each output dimension corresponds to a residual convolutional neural network, i.e. q networks in total. Each residual convolutional neural network comprises an input layer, the number of neurons of the input layer is consistent with the length of an input state vector input, and the number of neurons of the input layer is 3 multiplied by d; can also be regarded as the input of the first residual block
Secondly, three cascaded residual blocks, namely the output of the last residual block is used as the input of the next residual block, each residual block is composed of three convolution layers, the number of convolution kernels in each layer is 32, 64 and 32, the sizes of the convolution kernels are all 3 multiplied by 3, a post-activation calculation mode is adopted, and the structure and the operation process can be represented by the following formula:
wherein ,which represents the output of the (r-1) th residual block at time t, is also the input of the (r) th residual block. The input is processed by the first convolutional layer operation to obtain the output characteristic diagram of the first convolutional layer,the jth output characteristic diagram of a first convolution layer in an ith residual block of the ith residual convolutional neural network at the tth moment is shown;representing the parameter of the mth convolution kernel corresponding to the jth characteristic diagram of the ith residual convolution neural network,is the corresponding bias parameter; f (-) is the activation function of the convolutional layer, where tan h activation function is chosen and can be expressed as:
wherein x is an independent variable and f (x) is a dependent variable.
The output characteristic diagram of the last residual block is flattened and then serves as the input of the full connection layer, the output of the full connection layer serves as the input of the output layer, and the full connection layer has 32 neurons in total. The calculation of the fully connected layer can be represented by the following formula:
wherein ,is a one-dimensional vector obtained by flattening the input of the last residual block, the vector and the parameter W of the full link layeriAdding the offset b of the full link layer after multiplicationiThe input of the final output layer can be obtained. g (-) is the activation function of the fully connected layer, also chosen as the tanh activation function.
And finally, an output layer is provided, the output layer has no activation function, only one linear combination operation is carried out on the input of the output layer, the number of the neurons of the output layer is the number of the state coefficients of the corresponding output dimension in the SD-ARX model, and the total number of the neurons is 4 × nu +3 × ny.
Building a corresponding model structure in a python programming language and a tensorrlow + keras framework, generating initial weight parameters and bias in a residual convolutional neural network by using an Xavier parameter initialization mode for generating random numbers according to a normal distribution mode, sorting input and output data into a sample set according to corresponding orders, and dividing the sample set into a training set and a testing set according to a proportion of 0.75: 0.25.
The model is first trained. Carrying out forward operation after initializing the model, and calculating a current loss function; and then performing back propagation according to the gradient of the loss function, and updating the parameters of each layer of neurons. The training algorithm of the model selects an Adam (Adaptive motion Estimation) algorithm. The principle can be represented by the following formula:
in the formula ,ΘkIs the kth iterative update of the parameter to be updated theta, zeta is the set learning rate, delta theta represents the gradient of the parameter to be updated,denotes the partial derivative, f (x), of thetai;Θk-1) When it indicates the k-th update, the x-th updateiForward calculation of samples, yiThe label representing the sample, i.e. the actual output at the input, L (-) represents the loss function, where the loss function takes the form of MSE (Mean Square Error), β1、β2Is a given attenuation parameter and satisfies beta1,β2E (0,1), s, r are two variables that control the cumulative change of the gradient, δ is a small constant that prevents the denominator from being 0. The Adam algorithm calculates the moving average of the gradient by the two variables s and r, and then by beta1And beta2Two parameters control the decay rate of the moving average. In actual use, the learning rate ζ is 0.0001 and the hyper-parameter β is taken1=0.9,β20.999. And updating the model parameters in the back propagation by using an Adam algorithm until the model converges, namely the MSE value of the model training set is stable or the descending amplitude is extremely small.
And predicting the test set by using the trained model, calculating whether the MSE value of the prediction error of the test set is close to the training set, and if the MSE value is obviously larger than or smaller than the training set, the MSE value does not belong to a normal phenomenon, and retraining after adjusting the hyper-parameters or the network structure. If the two are close, the model can be proved to be converged to a better solution, an error distribution histogram and a residual error map of the test set are further drawn, and whether the distribution of the errors accords with normal distribution or not is observed; if the model does not accord with the normal distribution, the model only has a good effect on a training set and cannot predict each state of the four-rotor aircraft; if the model basically conforms to the normal distribution, the model has certain system characterization capability.
And adjusting the input order nu, the output order ny and the state vector order d of the model, repeating the steps, and searching for the order with smaller fitting error and higher calculation speed.
After the trained RecNN-ARX model is obtained, a corresponding adaptive softening prediction controller is designed, and parameter setting of an adaptive law is carried out through repeated tests.
Firstly, a is equal to 0, b is equal to 0, and an initial value alpha of a softening factor with better control effect is searched under the condition of not using an adaptive law0;
Secondly, enabling mu to be 0 and sigma to be 1, selecting a proper softening factor correction direction and force according to the actual control condition, and searching proper a and b values through repeated experiments;
finally, fine-tuning parameters of mu and sigma to obtain the best control effect.
By combining the advantages of RecNN and SD-ARX, compared with a linear ARX model or a common CNN-ARX modeling method, the RecNN-ARX model improves the prediction precision of the attitude dynamic characteristic of the quad-rotor unmanned aerial vehicle, enhances the stability of the model, and gives the capability of expanding the number of model network layers in a real-time allowable range; the method for controlling the attitude of the quad-rotor unmanned aerial vehicle based on the RecNN-ARX model by the self-adaptive method of the softening factor along with the error obtains a better control effect than the traditional predictive control method.
It should be understood by those skilled in the art that the protection scheme of the present invention is not limited to the embodiments described above, and various permutations, combinations and modifications can be made on the above embodiments without departing from the spirit of the present invention.
Claims (7)
1. The utility model provides a four rotor unmanned aerial vehicle gesture dynamic characteristic model which characterized in that uses four rotor unmanned aerial vehicle's three gesture angle as output, four rotor motor voltage of four rotor unmanned aerial vehicle as the input, establishes four rotor unmanned aerial vehicle's RecNN-ARX dynamic characteristic model, and its expression is as follows:
wherein y (t) represents the actual attitude angle output of the quad-rotor unmanned aerial vehicle at the moment t, and the actual attitude angle output is a pitch angle phi (t), a roll-over angle theta (t) and a yaw angle psi (t); u (t) represents the voltages of the four motors of the quad-rotor aircraft at time t;is the state dependent offset at time t; ny, nu are the output and input orders of the model respectively,is a state dependent coefficient matrix;
the state dependent coefficient of the Recnn-ARX dynamic characteristic model is obtained by calculating through a Recnn (residual convolutional network) model, and the model is as follows:
wherein ,is an element of a state dependent coefficient matrix in the Recnn-ARX model; h isi(t) represents the output of the fully-connected layer of the residual convolutional network,respectively representing offset item coefficients, output item coefficients and bias parameters in the input item coefficients in the Recnn-ARX model; wi、biRepresenting weight parameters and bias parameters of a full-link layer of the residual convolutional network, and g (-) representing an activation function of the full-link layer;represents the jth feature map, M, of the ith convolutional layer in the r-th residual block in the ith residual convolutional network1、M2Respectively represent the residueThe number of convolution kernels of the first and third convolution layers and the number of convolution kernels of the second convolution layer in the difference block;showing a one-dimensional vector obtained by flattening all output feature maps of the nth residual block at the t moment, f (-) shows an activation function of the convolutional layer,a jth feature map representing an r-th residual block,is the input vector of the first residual block, i.e. the input vector of the residual convolutional network, [ y (t-1)T y(t-2)T … y(t-d)T]TAnd d is the dimension of the input vector.
2. The model of claim 1, wherein the residual convolutional network comprises the following modules:
(1) an input layer for receiving an input state vector input;
(2) the residual error blocks are formed by combining convolution layers and used for carrying out residual error convolution operation on the input vector input, calculating an output characteristic diagram through an activation function and a weight parameter of each convolution layer and taking the output characteristic diagram as the input of the next residual error block; when the data is reversely transmitted, the residual block provides a bypass for gradient rising, and the gradient of the output layer is uploaded to be close to the input layer, so that the parameters of the input layer can be normally updated, and the problem of gradient disappearance is avoided;
(3) the full connection layer is used for processing the flattened characteristic diagram;
(4) the output layer, which may be considered as a fully connected layer without an activation function, performs only linear operations. And the output layer linearly combines the characteristics output by the full connection layer to obtain the state dependent coefficient of the RecnN-ARX model.
3. A method for identifying a four-rotor unmanned aerial vehicle attitude dynamic characteristic model comprises the following steps:
(S1) acquiring the input/output data of the quad-rotor drone as the identification data of the recann-ARX model;
(S2) selecting the output/input variable orders ny, nu of the RecnN-ARX model and the structural parameter M of the model1、M2、n;
(S3) initializing the model parameters;
(S4) carrying out forward operation on the model to obtain the prediction output of the RecNN-ARX model of the quad-rotor unmanned aerial vehicle, and calculating the MSE (Mean Square Error) between the prediction output and the expected output as a loss function;
(S5) calculating a back-propagated gradient from the loss function, and updating the parameters from the output layer to the input layer in a reverse direction;
(S6) repeating the steps (S4) - (S5) until the optimal parameters of the model are found;
(S7) selecting other model input/output orders and model structure parameters, repeating the steps (S2) to (S6) and finding out the model orders and the structure parameters with better model prediction effect under the condition of meeting the real-time requirement of the system.
4. A self-adaptive posture softening prediction control method for a quad-rotor unmanned aerial vehicle is characterized by comprising a control quantity optimization strategy and a softening factor self-adaptive law.
5. The method according to claim 4, wherein the control quantity optimization strategy is as follows:
in the formula ,Q≥0,R1>0,R2weighting matrix is more than 0;the prediction method comprises the steps that at the t moment, the regression coefficient of a RecNN-ARX model is obtained through recursion based on the RecNN-ARX model of the quad-rotor unmanned aerial vehicle;is an output expected value sequence after being corrected by a self-adaptive softening factor; u (t) is the sequence of control variables to be optimized,. DELTA.U (t) is the sequence of control increments, U*(t) is a controlled variable sequence obtained by optimization, u in the sequence*(t) control for time t; n is a radical ofyIs a prediction of the time domain length, NuIs the control time domain length.
6. The method according to claim 4 or 5, wherein the adaptive posture compliance prediction control method for the quad-rotor unmanned aerial vehicle is characterized in that the compliance factor is adaptively regulated as follows:
where y (t) is the actual output value of the quad-rotor unmanned plane at the current time t, e (t) represents the deviation between the output expected value and the actual value,is the desired output, y, after adaptive softeningrIs the desired output, α is the softening factor; alpha is alpha0Is the initial value of the softening factor, μσ is the mean and variance of the normal distribution function, a is the scaling factor, b is the deviation term, fe(e (t)) represents a softening factor correction function based on error variation.
7. The self-adaptive softening prediction control method of the quad-rotor unmanned aerial vehicle as claimed in claim 6, wherein the parameter setting method of the self-adaptive law of the softening factor comprises the following steps:
(1) firstly, the attitude prediction control of the quad-rotor unmanned aerial vehicle with fixed softening factors is used, and an initial value alpha of the softening factor with better control effect is searched between [0 and 1 ]0;
(2) Then, the attitude prediction control of the quad-rotor unmanned aerial vehicle of the self-adaptive softening factor is sampled, and proper correction direction and force are selected according to the characteristics of the system and the control result to search proper parameters a and b;
(3) according to the attitude prediction control effect of the quad-rotor unmanned aerial vehicle, the error tolerance range is finely adjusted, and suitable parameters mu and sigma are found.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110889990.9A CN113985900B (en) | 2021-08-04 | 2021-08-04 | Four-rotor unmanned aerial vehicle attitude dynamic characteristic model, identification method and self-adaptive soft prediction control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110889990.9A CN113985900B (en) | 2021-08-04 | 2021-08-04 | Four-rotor unmanned aerial vehicle attitude dynamic characteristic model, identification method and self-adaptive soft prediction control method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113985900A true CN113985900A (en) | 2022-01-28 |
CN113985900B CN113985900B (en) | 2023-09-08 |
Family
ID=79735137
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110889990.9A Active CN113985900B (en) | 2021-08-04 | 2021-08-04 | Four-rotor unmanned aerial vehicle attitude dynamic characteristic model, identification method and self-adaptive soft prediction control method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113985900B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090150008A1 (en) * | 2007-12-11 | 2009-06-11 | Airbus France | Method and device for generating a speed for an aircraft during a taxiing |
JP2013025521A (en) * | 2011-07-20 | 2013-02-04 | Kyushu Univ | Operation support device for vehicle |
CN107065902A (en) * | 2017-01-18 | 2017-08-18 | 中南大学 | UAV Attitude fuzzy adaptive predictive control method and system based on nonlinear model |
CN109885077A (en) * | 2019-03-21 | 2019-06-14 | 中南大学 | Attitude control method and controller of a quadrotor aircraft |
CN112036513A (en) * | 2020-11-04 | 2020-12-04 | 成都考拉悠然科技有限公司 | Image anomaly detection method based on memory-enhanced potential spatial autoregression |
US20210090694A1 (en) * | 2019-09-19 | 2021-03-25 | Tempus Labs | Data based cancer research and treatment systems and methods |
CN112947532A (en) * | 2021-04-13 | 2021-06-11 | 中国计量大学 | A height control method for plant protection quadrotor UAV based on medicinal liquid measurement |
-
2021
- 2021-08-04 CN CN202110889990.9A patent/CN113985900B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090150008A1 (en) * | 2007-12-11 | 2009-06-11 | Airbus France | Method and device for generating a speed for an aircraft during a taxiing |
JP2013025521A (en) * | 2011-07-20 | 2013-02-04 | Kyushu Univ | Operation support device for vehicle |
CN107065902A (en) * | 2017-01-18 | 2017-08-18 | 中南大学 | UAV Attitude fuzzy adaptive predictive control method and system based on nonlinear model |
CN109885077A (en) * | 2019-03-21 | 2019-06-14 | 中南大学 | Attitude control method and controller of a quadrotor aircraft |
US20210090694A1 (en) * | 2019-09-19 | 2021-03-25 | Tempus Labs | Data based cancer research and treatment systems and methods |
CN112036513A (en) * | 2020-11-04 | 2020-12-04 | 成都考拉悠然科技有限公司 | Image anomaly detection method based on memory-enhanced potential spatial autoregression |
CN112947532A (en) * | 2021-04-13 | 2021-06-11 | 中国计量大学 | A height control method for plant protection quadrotor UAV based on medicinal liquid measurement |
Non-Patent Citations (1)
Title |
---|
王晓林,等: "一种基于级联神经网络的飞机检测方法", 《智能系统学报》, vol. 15, no. 4 * |
Also Published As
Publication number | Publication date |
---|---|
CN113985900B (en) | 2023-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Han et al. | Real-time model predictive control using a self-organizing neural network | |
US6611823B1 (en) | Backlash compensation using neural network | |
CN110009528B (en) | A Parameter Adaptive Update Method Based on Optimal Structure Multidimensional Taylor Nets | |
Selmic et al. | Backlash compensation in nonlinear systems using dynamic inversion by neural networks | |
Sun et al. | Robust adaptive neural network control of a class of uncertain strict-feedback nonlinear systems with unknown dead-zone and disturbances | |
Moumouh et al. | A Novel Tuning approach for MPC parameters based on Artificial Neural Network | |
Rospawan et al. | Intelligent PID temperature control using output recurrent fuzzy broad learning system for nonlinear time-delay dynamic systems | |
Chowdhary et al. | Adaptive neural network flight control using both current and recorded data | |
Zhou et al. | Launch vehicle adaptive flight control with incremental model based heuristic dynamic programming | |
CN113985900A (en) | Attitude dynamic characteristic model, identification method and self-adaptive flexible prediction control method for quad-rotor unmanned aerial vehicle | |
Kocer et al. | Deep neuromorphic controller with dynamic topology for aerial robots | |
Slema et al. | A radial basis function neural network model reference adaptive controller for nonlinear systems | |
Yu et al. | Fault tolerant control for near space vehicles with input saturation using disturbance observer and neural networks | |
Raimalwala et al. | An upper bound on the error of alignment-based transfer learning between two linear, time-invariant, scalar systems | |
Kuljaca et al. | Adaptive critic design using non‐linear network structures | |
Jiang et al. | Fast and smooth composite local learning-based adaptive control | |
CN111522240B (en) | MTMLP-ARX model of four-rotor aircraft, identification method, system and storage medium | |
Zhang et al. | Formation control of multiple underactuated surface vehicles based on prescribed-time method | |
CN114186477A (en) | Elman neural network-based orbit prediction algorithm | |
Xu et al. | Neural network-based AILC for nonlinear discrete-time system with iteration varying initial error and reference trajectory | |
Chen et al. | Recurrent fuzzy system design using mutation-aided elite continuous ant colony optimization | |
Alshareefi et al. | Real-time implementation of adaptive neural controller by LabVIEW software | |
Yoo et al. | Trajectory generation for networked UAVs using online learning for delay compensation | |
Elkins et al. | Online neural sliding mode control with guaranteed stability | |
Yildirim | Robot trajectory control using neural networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |