Unmanned aerial vehicle flight attitude adaptive prediction and control method and system

By constructing compensation quantities for wind disturbance and raindrop impact, and combining multi-scale prediction and adaptive weight fusion strategies, the prediction interval length is dynamically adjusted, which solves the problem of accuracy in attitude prediction and control of UAVs under extreme weather conditions and improves flight stability and safety.

CN120803034BActive Publication Date: 2025-12-26ZHONGDIAN GUOKE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511315653.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-12-26
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

Existing UAV control technologies struggle to achieve precise attitude prediction and control under extreme weather conditions and lack effective compensation mechanisms for external disturbances, leading to decreased flight stability and control accuracy.

Method used

By constructing compensation quantities for wind disturbance and raindrop impact, and combining multi-scale prediction and adaptive weight fusion strategies, the prediction interval length is dynamically adjusted. Attitude prediction is performed based on environmental perception data, and control parameters are adaptively adjusted according to the rate of state change, thereby achieving accurate compensation for wind and rain disturbances.

Benefits of technology

It improves the flight stability and anti-interference ability of UAVs under complex weather conditions, enhances flight safety and the real-time response capability of the control system, and reduces the computational burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803034B_ABST
    Figure CN120803034B_ABST
Patent Text Reader

Abstract

The application provides a UAV flight attitude adaptive prediction and control method and system, relates to the UAV control technical field, and comprises the following steps: constructing a prediction compensation amount by acquiring environment data, performing multi-scale prediction on the flight attitude and adaptively fusing, establishing a prediction control relationship containing a state variable term, a reference input term and a disturbance compensation term, grading updating control parameters according to a state change rate, and finally generating a control instruction to adjust the flight attitude. The application improves the flight stability and adaptability of the UAV in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of unmanned aerial vehicle control, in particular to an unmanned aerial vehicle flight attitude adaptive prediction and control method and system. BACKGROUND

[0002] In actual flight process, unmanned aerial vehicles often face various complex meteorological conditions, such as strong wind, rainfall and other extreme weather environments. These external disturbances can significantly affect the flight stability and control accuracy of unmanned aerial vehicles, making it difficult for unmanned aerial vehicles to complete the scheduled tasks or even leading to crash accidents. Therefore, it is of great practical significance to improve the flight attitude prediction and control ability of unmanned aerial vehicles in complex meteorological conditions. The existing unmanned aerial vehicle flight control technology mainly has the following defects and deficiencies:

[0003] The existing unmanned aerial vehicle control method usually adopts a fixed parameter PID controller or a linear control strategy, which cannot effectively cope with the nonlinear disturbance brought by wind and rain and other complex environments. These methods lack accurate modeling and compensation mechanism for external disturbances, resulting in a significant decrease in the attitude control accuracy of unmanned aerial vehicles in extreme weather conditions and difficulty in ensuring stability.

[0004] The existing attitude prediction method mostly adopts a single prediction model, either based on a linear hypothesis to oversimplify the problem or using a complex nonlinear model to cause excessive calculation. Such a single prediction strategy is difficult to balance the prediction accuracy and real-time demand, and lacks the ability to dynamically adjust the prediction interval according to environmental changes, and cannot cope with the changing flight environment.

[0005] The parameter adjustment mechanism in the existing control method often relies on fixed update strategies or simple adaptive rules, lacking a mechanism for fine parameter update according to the state change rate and attitude change trend of the unmanned aerial vehicle. This leads to the inability of the control parameters to be updated in time and effectively in a rapidly changing environment, reducing the response speed and adaptability of the control system to environmental changes. SUMMARY

[0006] The unmanned aerial vehicle flight attitude adaptive prediction and control method and system provided by the embodiments of the present application can solve the problems in the prior art.

[0007] In a first aspect, the present application provides an unmanned aerial vehicle flight attitude adaptive prediction and control method, comprising:

[0008] Obtaining wind speed, wind direction and precipitation density data, constructing wind disturbance compensation and raindrop impact force compensation, and combining the wind disturbance compensation and raindrop impact force compensation to form a prediction compensation;

[0009] The flight attitude of the unmanned aerial vehicle is predicted in multiple scales, the attitude in a first prediction interval is predicted based on local linearization, and the attitude in a second prediction interval is predicted based on nonlinear processing; the length of the prediction interval is dynamically adjusted based on environmental perception data; the prediction results in the first prediction interval and the prediction results in the second prediction interval are adaptively weighted and fused to obtain a fused prediction result;

[0010] A prediction control relationship is established based on the prediction compensation amount and the fused prediction result, the prediction control relationship includes a state variable term, a reference input term and a disturbance compensation term; a state change rate of the unmanned aerial vehicle is calculated, the importance level of a control parameter in the prediction control relationship is determined according to the state change rate, a corresponding parameter update threshold is set for the control parameter of different importance levels, and the parameter update threshold is adaptively adjusted according to the attitude change trend of the unmanned aerial vehicle; when the state change rate exceeds the parameter update threshold of the corresponding control parameter, the update of the control parameter is triggered;

[0011] An instruction is generated according to the updated prediction control relationship, and the flight attitude of the unmanned aerial vehicle is adjusted, and the adjusted attitude information is fed back to optimize the extreme scenario dynamic prediction compensation amount.

[0012] Wind speed, wind direction and precipitation density data are obtained, wind disturbance compensation amount and raindrop impact force compensation amount are constructed, and the wind disturbance compensation amount and the raindrop impact force compensation amount are combined to form a prediction compensation amount, including:

[0013] The wind speed and wind direction data are preprocessed by Kalman filtering, the wind attack angle and the sideslip angle are calculated, and a nonlinear wind disturbance compensation vector is constructed based on the wind attack angle and the sideslip angle, the nonlinear wind disturbance compensation vector including a lift component, a drag component and a lateral force component;

[0014] The precipitation density data are smoothed, the relative speed of the unmanned aerial vehicle and the raindrops is calculated, and a raindrop impact force compensation vector is calculated based on the relative speed and the rain area of the unmanned aerial vehicle;

[0015] The coupling force of the nonlinear wind disturbance compensation vector and the raindrop impact force compensation vector is calculated, the coupling force including a wind-rain interaction coefficient;

[0016] The angular velocity change rate, the linear acceleration change rate and the attitude angle change rate of the unmanned aerial vehicle are calculated, and a state sensitivity matrix is constructed; a disturbance compensation weight index is calculated according to the state sensitivity matrix, and adaptive weight coefficients of the nonlinear wind disturbance compensation vector, the raindrop impact force compensation vector and the coupling force are determined based on the disturbance compensation weight index; the nonlinear wind disturbance compensation vector, the raindrop impact force compensation vector and the coupling force are multiplied by the corresponding adaptive weight coefficients respectively and superimposed to obtain a comprehensive prediction compensation amount.

[0017] The flight attitude of the unmanned aerial vehicle is predicted in multiple scales, the attitude in a first prediction interval is predicted based on local linearization, the attitude in a second prediction interval is predicted based on nonlinear processing, the second prediction interval is larger than the first prediction interval; the length of the prediction interval is dynamically adjusted based on environmental perception data; the prediction results in the first prediction interval and the second prediction interval are adaptively fused to obtain a fused prediction result, and the steps include:

[0018] Real-time attitude data and motion state data of the unmanned aerial vehicle are obtained, the real-time attitude data includes Euler angles and angular velocity, and the motion state data includes acceleration and speed;

[0019] The real-time attitude data is locally linearized, a state space expression is constructed, the motion state data is substituted into the state space expression for state recursive calculation to obtain a prediction result in a first prediction interval;

[0020] A nonlinear prediction equation is constructed based on the real-time attitude data and the motion state data, the nonlinear prediction equation includes aerodynamic force terms, gyroscopic force terms and disturbance force terms, a numerical solution method is used to calculate the nonlinear prediction equation to obtain a prediction result in a second prediction interval;

[0021] Environmental perception data are obtained to construct an environment type index, and the length of the prediction interval is adjusted according to the environment type index and a state error evaluation index;

[0022] The attitude change rate and the prediction error change rate of the unmanned aerial vehicle are calculated, a dynamic reliability evaluation function is constructed, and the reliability indexes of the first prediction interval result and the second prediction interval result are calculated based on the dynamic reliability evaluation function; the adaptive fusion weight coefficient is determined according to the reliability indexes, the prediction results in the first prediction interval and the second prediction interval are fused to obtain a fused prediction result.

[0023] The environmental perception data are obtained to construct an environment type index, and the length of the prediction interval is adjusted according to the environment type index and a state error evaluation index, and the steps include:

[0024] The environmental perception data of the unmanned aerial vehicle are obtained, the environmental perception data include the distance from the obstacle, the wind speed, the wind direction and the weather conditions; the flight environment is classified based on the environmental perception data to obtain an environment type index, the environment type index includes a space openness index, a wind field complexity index and a weather condition index;

[0025] An adaptive prediction interval optimization function is constructed, which comprises a prediction accuracy term, an environment adaptation term and a resource efficiency term, the prediction accuracy term is calculated based on the probability distribution characteristics of state error, the environment adaptation term is calculated based on the time-varying characteristics of the environment type index, and the resource efficiency term is calculated based on the dynamic balance characteristics of the calculation load;

[0026] The weight coefficients of each term in the adaptive prediction interval optimization function are determined according to the environment type index;

[0027] The Euler angle deviation vector and the angular velocity deviation vector of the UAV are calculated, and a state error evaluation index is constructed; the state error evaluation index is substituted into the adaptive prediction interval optimization function, and the first prediction interval length and the second prediction interval length are obtained by solving the adaptive prediction interval optimization function.

[0028] The steps of establishing a prediction control relationship based on the prediction compensation amount and the fusion prediction result, the prediction control relationship comprising a state variable term, a reference input term and a disturbance compensation term, comprise:

[0029] The state variable vector and the reference trajectory input of the UAV are obtained, and the state variable vector comprises an Euler angle vector and an angular velocity vector;

[0030] A state error matrix is calculated according to the state variable vector, a state weight coefficient is constructed based on the state error matrix, and a state variable control term is obtained by multiplying the state weight coefficient and the state variable vector;

[0031] The attitude change rate of the UAV is calculated, a dynamic response function is constructed based on the attitude change rate, and the dynamic response function increases with the increase of the attitude change rate; the dynamic response function is multiplied by the reference trajectory input to obtain a reference input control term;

[0032] A deviation vector of the fusion prediction result and the actual attitude is calculated, an adaptive gain matrix is constructed based on the deviation vector, the adaptive gain matrix is dynamically adjusted according to the norm of the deviation vector; the adaptive gain matrix is multiplied by the prediction compensation amount to obtain a disturbance compensation control term;

[0033] The state variable control term, the reference input control term and the disturbance compensation control term are multiplied by the corresponding weight coefficients respectively and are superimposed to obtain a control input vector, the weight coefficient is the ratio of the response amplitude of the corresponding control term to the total response amplitude; the flight attitude of the UAV is adjusted based on the control input vector.

[0034] calculating a state change rate of the unmanned aerial vehicle, determining a level of importance of a control parameter in the predictive control relationship according to the state change rate, setting a corresponding parameter update threshold for the control parameter of different levels of importance, the parameter update threshold being adaptively adjusted according to a trend of attitude change of the unmanned aerial vehicle; when the state change rate exceeds the parameter update threshold of the corresponding control parameter, the step of triggering the update of the control parameter comprises:

[0035] obtaining Euler angles and angular velocity data of the unmanned aerial vehicle, calculating a state change rate vector, the state change rate vector comprising an Euler angle change rate component and an angular velocity change rate component;

[0036] normalizing each component of the state change rate vector to obtain a state change rate index; calculating a standard deviation of a state quantity based on a sliding time window to obtain a state volatility index, calculating an influence degree of each state quantity on a prediction error based on a deviation between a predicted value and an actual value of the state quantity to obtain a prediction error contribution degree; constructing an importance evaluation function based on the state change rate index, the state volatility index and the prediction error contribution degree, and dividing the control parameter in the predictive control relationship into a plurality of levels of importance according to a value of the importance evaluation function;

[0037] setting a corresponding reference threshold for the control parameter of different levels of importance, constructing an adaptive adjustment factor based on the state change rate vector and state acceleration, and taking a product of the reference threshold and the adaptive adjustment factor as the parameter update threshold;

[0038] integrating state data by using a sliding time window method, assigning an exponential decay weight to state data at each sampling time, and constructing a weighted state data matrix;

[0039] when a component of the state change rate vector exceeds the parameter update threshold of the corresponding control parameter, calculating a prediction error based on the weighted state data matrix, constructing a covariance matrix of the prediction error, and updating the control parameter that triggers the update by using a recursive least square method, the control parameter that does not trigger the update remaining unchanged.

[0040] the step of constructing the adaptive adjustment factor based on the state change rate vector and state acceleration comprises:

[0041] decomposing the state change rate vector at different time scales, extracting short-term change characteristics by using short-time Fourier transform, and extracting long-term change characteristics by using wavelet transform; calculating a correlation coefficient of the short-term change characteristics and the long-term change characteristics, and taking a complement of the correlation coefficient as a trend difference index;

[0042] The state acceleration vector is obtained by time difference operation on the state change rate vector, principal component analysis is performed on the state acceleration vector, and an eigenvalue is obtained; and an acceleration response function is constructed based on the eigenvalue, the acceleration response function adopts asymmetric gain for positive acceleration and negative acceleration, and the gain corresponding to the positive acceleration is greater than the gain corresponding to the negative acceleration;

[0043] The norm of the state change rate vector is calculated, and a segmented response function is constructed, the segmented response function is linearly increased when the norm of the state change rate is less than a first preset threshold, is exponentially increased when the norm of the state change rate is greater than the first preset threshold and less than a second preset threshold, and adopts a saturation characteristic when the norm of the state change rate is greater than the second preset threshold;

[0044] The fusion weight of the acceleration response function and the segmented response function is determined based on the trend difference index; the hyperbolic tangent mapping is performed on the fused result to obtain a basic adjustment factor, the value range of the adjustment factor is set based on the state error boundedness criterion, the threshold jump is eliminated by using the smoothing processing, and the final adaptive adjustment factor is obtained.

[0045] In a second aspect of the embodiment of the present application, a flight attitude adaptive prediction and control system of a UAV is provided, comprising:

[0046] The first unit is configured to acquire wind speed, wind direction and precipitation density data, construct wind disturbance compensation and raindrop impact force compensation, and combine the wind disturbance compensation and the raindrop impact force compensation to form a prediction compensation;

[0047] The second unit is configured to perform multi-scale prediction on the flight attitude of the UAV, perform attitude prediction in a first prediction interval based on local linearization, and perform attitude prediction in a second prediction interval based on nonlinear processing; the length of the prediction interval is dynamically adjusted based on environmental perception data; the prediction results of the first prediction interval and the second prediction interval are adaptively weighted and fused to obtain a fused prediction result;

[0048] The third unit is configured to establish a prediction control relationship based on the prediction compensation and the fused prediction result, the prediction control relationship contains a state variable term, a reference input term and a disturbance compensation term; the state change rate of the UAV is calculated, the importance level of a control parameter in the prediction control relationship is determined according to the state change rate, the corresponding parameter update threshold is set for the control parameter with different importance levels, the parameter update threshold is adaptively adjusted according to the attitude change trend of the UAV; when the state change rate exceeds the parameter update threshold of the corresponding control parameter, the update of the control parameter is triggered;

[0049] The fourth unit is configured to generate an instruction according to the updated prediction control relationship and adjust the flight attitude of the UAV, and feed back the adjusted attitude information to optimization of the extreme scene dynamics prediction compensation amount.

[0050] In a third aspect, the present application provides an electronic device, comprising:

[0051] a processor;

[0052] a memory for storing processor-executable instructions;

[0053] The processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0054] In a fourth aspect, the present application provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions are executed by a processor to implement the method described above.

[0055] The present application realizes accurate compensation for wind disturbance and precipitation influence by constructing a prediction compensation amount based on acquired environmental data, enhances the flight stability and anti-interference ability of the UAV under complex weather conditions, and significantly improves the flight safety.

[0056] The present application adopts a multi-scale prediction method and an adaptive weight fusion strategy, combines local linearization and nonlinear processing technology, realizes accurate prediction of the flight attitude of the UAV, the prediction interval can be dynamically adjusted according to the environmental perception data, improves the prediction accuracy and calculation efficiency, and enhances the adaptability of the system to environmental changes.

[0057] The parameter update mechanism designed based on the state change rate enables the control parameters to be adaptively adjusted according to the flight attitude change trend, reduces unnecessary parameter update operations, reduces the calculation burden, while ensuring the real-time response ability and robustness of the control system, and improves the flight performance of the UAV under extreme weather conditions. BRIEF DESCRIPTION OF DRAWINGS

[0058] Figure 1 FIG. 1 is a flowchart of the UAV flight attitude adaptive prediction and control method according to an embodiment of the present application;

[0059] Figure 2 FIG. 4 is a performance comparison diagram of different methods under four different flight scenes. DETAILED DESCRIPTION

[0060] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0061] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and some embodiments may not be described again for the same or similar concepts or processes.

[0062] Figure 1 The flowchart of the unmanned aerial vehicle flight attitude adaptive prediction and control method of the embodiments of the present application is shown in FIG. 1, which comprises the following steps. Figure 1

[0063] Obtaining wind speed, wind direction and precipitation density data, constructing wind disturbance compensation and raindrop impact force compensation, combining the wind disturbance compensation and the raindrop impact force compensation to form a prediction compensation;

[0064] Performing multi-scale prediction on the flight attitude of the unmanned aerial vehicle, performing attitude prediction in a first prediction interval based on local linearization, and performing attitude prediction in a second prediction interval based on nonlinear processing; the length of the prediction interval is dynamically adjusted based on environmental perception data; the prediction results of the first prediction interval and the prediction results of the second prediction interval are adaptively weighted and fused to obtain a fused prediction result;

[0065] Establishing a prediction control relationship based on the prediction compensation and the fused prediction result, the prediction control relationship containing state variable terms, reference input terms and disturbance compensation terms; calculating the state change rate of the unmanned aerial vehicle, determining the importance level of the control parameters in the prediction control relationship according to the state change rate, setting corresponding parameter update thresholds for control parameters of different importance levels, and adaptively adjusting the parameter update thresholds according to the attitude change trend of the unmanned aerial vehicle; when the state change rate exceeds the parameter update threshold of the corresponding control parameter, the update of the control parameter is triggered;

[0066] Generating an instruction according to the updated prediction control relationship and adjusting the flight attitude of the unmanned aerial vehicle, and feeding back the adjusted attitude information for optimization of the extreme scenario dynamics prediction compensation.

[0067] ​For example, the environmental meteorological data is acquired to construct the extreme scenario prediction compensation. The wind speed, wind direction and precipitation density data are acquired by the micro-weather sensor group carried on the UAV. The wind speed sensor measures the range of 0-30 m / s with the accuracy of ±0.5 m / s; the wind direction sensor has the angle resolution of 5 degrees; the optical rain sensor measures the precipitation density range of 0-100 mm / h. The acquired original meteorological data is preprocessed by Kalman filtering to eliminate random noise interference. For example, when the original measured wind speed data is [8.2, 8.5, 7.9, 8.3, 8.0] m / s, the smoothed wind speed estimation value is 8.2 m / s after filtering.

[0068] Based on the processed wind speed and wind direction data, the wind attack angle and sideslip angle are calculated. When the UAV flies forward at a speed of 12 m / s and encounters a 8.2 m / s lateral wind with a direction of 45 degrees, the wind attack angle is calculated to be 12.5 degrees and the sideslip angle is calculated to be 18.2 degrees. According to the wind attack angle and the sideslip angle, a nonlinear wind disturbance compensation vector is constructed. The vector includes lift component, drag component and lateral force component, which are related to the quadratic function and cubic function of the wind attack angle and the sideslip angle, respectively. For example, when the wind attack angle is 12.5 degrees and the sideslip angle is 18.2 degrees, the normalized lift coefficient is 0.56, the drag coefficient is 0.33, and the lateral force coefficient is 0.41. Multiplying these coefficients with the current aerodynamic reference area (1.2 m2), air density (1.22 kg / m3) and relative wind speed square, the specific wind disturbance force values are obtained to form the wind disturbance compensation vector.

[0069] For the precipitation influence, the average raindrop diameter (about 1.8 mm) is calculated according to the processed precipitation density data (25 mm / h). Considering the vector composition of the UAV three-axis movement speed and the raindrop terminal falling speed (about 6.5 m / s), the relative speed of 13.7 m / s is calculated. Based on the relative speed and the rain area of the UAV in each direction (0.8 m2 on the top, 0.5 m2 forward, and 0.6 m2 sideways), the raindrop impact force is calculated. According to the raindrop momentum change principle, when the precipitation density is 25 mm / h and the relative speed is 13.7 m / s, the raindrop impact forces on the top, forward and sideways are 0.82 N, 0.59 N and 0.46 N, respectively, forming a raindrop impact force compensation vector.

[0070] The coupling force of the wind disturbance compensation vector and the raindrop impact force compensation vector is calculated, and a wind-rain interaction coefficient matrix is introduced, with the main diagonal elements being 0.85 and the off-diagonal elements being 0.15. The matrix is used to weight and combine the two compensation vectors to obtain the coupling force considering the wind-rain interaction. Based on the state sensitivity matrix calculated from the airborne inertial measurement unit data, the adaptive weight coefficients of the three types of compensation forces are determined to be 1.0, 0.78 and 0.66 respectively. The three compensation vectors are multiplied by their corresponding weight coefficients and then superimposed to form the final extreme scenario prediction compensation.

[0071] When predicting the flight attitude of the unmanned aerial vehicle, two different prediction methods are used. Real-time attitude data (Euler angles and angular velocity) and motion state data (acceleration and velocity) of the unmanned aerial vehicle are obtained. The Euler angle data is [0.05, 0.02, 0.10] radian, the angular velocity data is [0.01, 0.02, 0.03] radian / s, the acceleration data is [0.2, 0.1, 0.3] m / s 2 , and the velocity data is [10, 0, 1] m / s. Local linearization processing is performed on the real-time attitude data, and a state space expression of a 6-dimensional state vector is constructed. Recursion calculation is performed with a time step of 5 milliseconds to predict the attitude change in the future 0-100 milliseconds to obtain the results of the first prediction interval.

[0072] At the same time, a nonlinear prediction equation is constructed based on real-time attitude data and motion state data. The equation includes aerodynamic force terms, gyroscopic force terms and disturbance force terms. The aerodynamic force terms consider the aerodynamic effects at different speeds and attitudes, such as the 0.2 N·m pitch moment generated at a flight speed of 8 m / s; the gyroscopic force terms describe the gyroscopic effect of the unmanned aerial vehicle itself, such as the 0.05 N·m moment generated in the roll direction by a 30° / s yaw angular velocity; the disturbance force terms include wind disturbance and other external moments, such as the 0.3 N·m lateral moment generated under a 5-level wind. A fourth-order Runge-Kutta numerical solution method is used with a time step of 10 milliseconds to predict the attitude change in the future 0-500 milliseconds to obtain the results of the second prediction interval.

[0073] The length of the prediction interval is dynamically adjusted based on environmental perception data. Environmental perception data is obtained through vision sensors and laser radars, including obstacle distance, wind speed and direction changes, etc. Spatial openness index, wind field complexity index and meteorological condition index are calculated to construct the environment type index. When the spatial openness index is 0.8 (indicating a relatively open environment), the wind field complexity index is 0.3 (indicating a relatively stable wind field), and the meteorological condition index is 0.2 (indicating good meteorological conditions), the first prediction interval length is calculated to be 0.5 seconds and the second prediction interval length is calculated to be 1.2 seconds through an adaptive optimization function.

[0074] The attitude change rate and the prediction error change rate of the unmanned aerial vehicle are calculated, and a dynamic reliability evaluation function is constructed. When the attitude change rate is small (the Euler angle change rate is less than 5 degrees per second) and the prediction error change rate is stable in the first prediction interval, the reliability index of the linear prediction result is increased; when the attitude change rate is large (the Euler angle change rate is greater than 20 degrees per second) or the prediction error change rate fluctuates greatly, the reliability index of the nonlinear prediction result is increased. According to the calculated reliability index (linear prediction 0.7, nonlinear prediction 0.4), the fusion weight coefficients are determined to be 0.65 and 0.35 respectively. The prediction results of the first prediction interval and the second prediction interval are weighted and averaged according to the weight coefficients to obtain the final fusion prediction result.

[0075] Based on the prediction compensation and the fusion prediction result, a prediction control relationship is established. The current state variable vector and the reference trajectory input of the unmanned aerial vehicle are obtained. The Euler angle data is [0.08, 0.12, 0.25] radian, the angular velocity data is [0.02, 0.04, 0.01] radian / second, the expected Euler angle is [0.1, 0.1, 0.2] radian, and the expected angular velocity is [0, 0, 0] radian / second. The state error matrix is calculated, and the state weight coefficient is constructed according to the error absolute value. When the error is less than 0.05 radian, the weight coefficient is 1.0; when the error is between 0.05-0.1 radian, the weight coefficient is 1.5; when the error is greater than 0.1 radian, the weight coefficient is 2.0. The state weight coefficient is multiplied by the state variable vector to obtain the state variable control item.

[0076] The attitude change rate of the unmanned aerial vehicle is calculated as [-0.25, -0.1, -0.25] radian / second. Based on the attitude change rate, a dynamic response function is constructed, which increases with the increase of the absolute value of the attitude change rate, but shows saturation characteristics. When the absolute value of the attitude change rate is 0.2 radian / second, the value of the dynamic response function is 0.3; when it increases to 0.5 radian / second, the function value is 0.6; when it increases to 1.0 radian / second, the function value is 0.8. The reference input control item is obtained by multiplying the dynamic response function with the reference trajectory input.

[0077] The deviation vector of the fusion prediction result and the actual attitude is calculated as [0.005, -0.005, -0.01] radian. Based on the deviation vector, an adaptive gain matrix is constructed, and the diagonal elements of the matrix are adjusted according to the norm of the deviation vector. When the norm of the deviation is less than 0.01 radian, the diagonal element is 0.6; when the norm of the deviation is between 0.01-0.05 radian, the diagonal element is 1.0; when the norm of the deviation is greater than 0.05 radian, the diagonal element is 1.5. The interference compensation control item is obtained by multiplying the adaptive gain matrix with the prediction compensation.

[0078] The control parameters in the predictive control relationship include the state weight coefficient matrix (6x6 dimension, a total of 36 parameters) in the state variable term, the dynamic response function parameters (12 parameters) in the reference input term, and the adaptive gain matrix parameters (6x6 dimension, a total of 36 parameters) in the disturbance compensation term. The state rate of change vector of the unmanned aerial vehicle is calculated, which includes 6 components of the Euler angle rate of change and the angular velocity rate of change. The components of the vector are normalized to obtain the state rate of change index. The state quantity standard deviation is calculated based on the sliding time window (20 sampling points) to obtain the state volatility index; the influence of each state quantity on the prediction error is analyzed to obtain the prediction error contribution degree.

[0079] The three indexes are integrated to construct an importance evaluation function, and the weight proportion is 3:2:5. According to the calculation result of the evaluation function, the control parameters are divided into three importance levels: high importance (evaluation value≥0.7), medium importance (0.3≤evaluation value<0.7) and low importance (evaluation value<0.3). For example, the evaluation value of the yaw control related parameter is 0.85, which belongs to high importance; the evaluation value of the pitch angle dynamic response parameter is 0.56, which belongs to medium importance; and the evaluation value of some roll angle steady-state parameter is 0.25, which belongs to low importance.

[0080] Different reference thresholds are set for control parameters of different importance levels: 0.15 for high importance parameters, 0.25 for medium importance parameters, and 0.4 for low importance parameters. An adaptive adjustment factor is constructed based on the state rate of change vector and the state acceleration. When a drastic change in attitude is detected (acceleration greater than 5 rad / s²), the adjustment factor is increased to 1.5; when the attitude changes smoothly (acceleration less than 1 rad / s²), the adjustment factor is reduced to 0.8. The reference threshold is multiplied by the adaptive adjustment factor to obtain the final parameter update threshold.

[0081] When the component of the state rate of change vector exceeds the update threshold of the corresponding control parameter, the update operation of the parameter is triggered. For example, when the roll angle rate of change normalized value 0.35 exceeds the parameter update threshold 0.3, the related control parameter is updated. The update process uses the recursive least squares method to calculate the optimal parameter value based on the latest 40 weighted state data points (newer data has a higher weight). The control parameters that do not trigger the update remain unchanged to avoid unnecessary computational burden.

[0082] According to the updated prediction control relationship, the control input vector is calculated. The state variable control item, the reference input control item and the disturbance compensation control item are respectively multiplied by the corresponding weight coefficient and superimposed. The weight coefficient is determined according to the response amplitude ratio of each control item to the total response amplitude. For example, the amplitudes of the three control items are 2.5, 1.8 and 1.2, the total response amplitude is 5.5, and the corresponding weight coefficients are 0.45, 0.33 and 0.22. Based on the control input vector, the rudder control instruction is generated to adjust the flight attitude of the unmanned aerial vehicle. The adjusted attitude data is fed back to the prediction compensation amount calculation module to optimize the extreme scene dynamic compensation effect.

[0083] In an optional embodiment, the steps of acquiring wind speed, wind direction, and precipitation density data, constructing wind disturbance compensation and raindrop impact force compensation, and combining the wind disturbance compensation and raindrop impact force compensation to form the prediction compensation include:

[0084] The wind speed and wind direction data are preprocessed by Kalman filtering, the wind attack angle and the sideslip angle are calculated, and the nonlinear wind disturbance compensation vector is constructed based on the wind attack angle and the sideslip angle. The nonlinear wind disturbance compensation vector includes lift component, drag component and lateral force component.

[0085] The precipitation density data is smoothed, the relative speed of the unmanned aerial vehicle and the raindrop is calculated, and the raindrop impact force compensation vector is calculated based on the relative speed and the rain area of the unmanned aerial vehicle.

[0086] The coupling force of the nonlinear wind disturbance compensation vector and the raindrop impact force compensation vector is calculated, and the coupling force includes the wind-rain interaction coefficient.

[0087] The angular velocity change rate, linear acceleration change rate and attitude angle change rate of the unmanned aerial vehicle are calculated, and the state sensitivity matrix is constructed. The disturbance compensation weight index is calculated according to the state sensitivity matrix, and the adaptive weight coefficient of the nonlinear wind disturbance compensation vector, the raindrop impact force compensation vector and the coupling force is determined based on the disturbance compensation weight index. The nonlinear wind disturbance compensation vector, the raindrop impact force compensation vector and the coupling force are respectively multiplied by the corresponding adaptive weight coefficient and superimposed to obtain the comprehensive prediction compensation.

[0088] For example, by acquiring meteorological sensor data, an environmental disturbance compensation mechanism is constructed to improve flight stability in bad weather. A miniature weather station is integrated, including an ultrasonic anemometer, an electronic compass and an optical rain sensor, which can collect wind speed, wind direction and precipitation density data in the flight environment in real time.

[0089] After the meteorological data acquisition is completed, the Kalman filter algorithm is applied to preprocess the wind speed and direction data, and a state equation model is adopted, in which the state variables include the wind speed and direction angle, the measurement noise covariance matrix is set as a diagonal matrix with a diagonal element value of 0.25, and the process noise covariance matrix is set as a diagonal matrix with a diagonal element value of 0.1. Through the iterative prediction and update steps, the smoothed wind speed and direction estimation values are obtained. According to the filtered wind speed and direction data, combined with the current flight speed vector of the unmanned aerial vehicle, the relative wind speed is calculated, and then the wind attack angle and sideslip angle are solved. For example, when the unmanned aerial vehicle flies north at a speed of 12 meters per second and encounters a wind of 8 meters per second and a direction of northeast 45 degrees, the calculated wind attack angle is 12.6 degrees and the sideslip angle is 18.4 degrees. Based on the calculated wind attack angle and sideslip angle, a nonlinear wind disturbance compensation vector is constructed. The vector includes three key components: lift component, drag component and lateral force component. The lift component is related to the quadratic function of the wind attack angle, and when the wind attack angle is 12.6 degrees, the normalized lift coefficient is about 0.58; the drag component is related to the sum of the square and cubic terms of the wind attack angle and sideslip angle, and when the wind attack angle is 12.6 degrees and the sideslip angle is 18.4 degrees, the normalized drag coefficient is about 0.35; the lateral force component is mainly related to the linear and cubic terms of the sideslip angle, and when the sideslip angle is 18.4 degrees, the normalized lateral force coefficient is about 0.42. Multiplying these coefficients by the reference area of the unmanned aerial vehicle 1.2 square meters, the current air density 1.225 kg / m3 and the square of the relative wind speed, the specific wind disturbance force values are obtained, which constitute the nonlinear wind disturbance compensation vector.

[0090] For the influence of precipitation, the sliding average filter is applied to smooth the optical rain sensor data, and the window size is set to 5 sampling points. The processed precipitation density data is combined with the standard raindrop diameter distribution model to calculate the average raindrop diameter. For example, when the measured precipitation density is 25 mm / h, the calculated average raindrop diameter is about 1.8 mm. The relative speed of the unmanned aerial vehicle and the raindrop is calculated, considering the vector synthesis of the terminal falling speed of the raindrop (about 6.5 m / s) and the three-axis motion speed of the unmanned aerial vehicle. When the unmanned aerial vehicle flies horizontally at a speed of 12 m / s and ascends at a speed of 2 m / s, the relative speed with the raindrop is about 13.7 m / s. Based on the relative speed and the rain area of the unmanned aerial vehicle, the raindrop impact force compensation vector is calculated. The rain area of the top, front and side of the unmanned aerial vehicle is 0.8 square meters, 0.5 square meters and 0.6 square meters, respectively. According to the raindrop momentum change principle, when the precipitation density is 25 mm / h and the relative speed is 13.7 m / s, the raindrop impact forces on the top, front and side are about 0.82 N, 0.59 N and 0.46 N, respectively, which constitute the raindrop impact force compensation vector.

[0091] Further calculate the coupling force of the nonlinear wind disturbance compensation vector and the raindrop impact force compensation vector, introduce a wind-rain interaction coefficient matrix, the main diagonal elements of the matrix are set to 0.85, representing the self-influence weight; the off-diagonal elements are set to 0.15, representing the cross-influence weight. Apply the matrix to weighted combination of the two compensation vectors to obtain the coupling force considering the wind-rain interaction.

[0092] To realize adaptive compensation, based on the data of the airborne inertial measurement unit, the angular velocity rate of change, linear acceleration rate of change and attitude angle rate of change of the unmanned aerial vehicle are calculated. The three-axis angular velocity, linear acceleration and Euler angle data are sampled at a frequency of 10 Hz, the difference between adjacent sampling points is calculated and divided by the sampling time interval to obtain each rate of change. Based on these rate of change data, a 9x3 dimensional state sensitivity matrix is constructed to represent the sensitivity of the state change of the unmanned aerial vehicle to the three types of compensation forces. According to the state sensitivity matrix, the disturbance compensation weight index is calculated. The calculation process uses normalization processing to scale the state rate of change by its maximum possible value to obtain a normalized sensitivity matrix. For different flight stages (hovering, low-speed cruising, high-speed cruising), the reference weight vectors are set to [0.6, 0.3, 0.1], [0.5, 0.3, 0.2] and [0.4, 0.3, 0.3] respectively. The normalized sensitivity matrix is multiplied by the reference weight vector of the current flight stage to obtain the disturbance compensation weight index.

[0093] Based on the disturbance compensation weight index, the adaptive weight coefficients of the nonlinear wind disturbance compensation vector, the raindrop impact force compensation vector and the coupling force are determined. The weight indices of the three components are calculated to be 0.85, 0.62 and 0.48 respectively, and the weight coefficients of the three vectors are determined to be 1.0, 0.78 and 0.66 respectively. The specific mapping rule is: when the index value is greater than 0.8, the corresponding weight coefficient is set to 1.0 (such as the wind disturbance compensation vector); when the index value is between 0.5 and 0.8, the weight coefficient is linearly mapped to between 0.7 and 1.0 (such as the raindrop impact force compensation vector); when the index value is less than 0.5, the weight coefficient is linearly mapped to between 0.4 and 0.7 (such as the coupling force). Multiply the three compensation vectors by their corresponding weight coefficients respectively, and then perform vector superposition to obtain the final comprehensive prediction compensation, which realizes accurate compensation of different disturbance sources.

[0094] The present application can accurately capture the combined influence of wind-rain interaction on unmanned aerial vehicles by establishing a wind disturbance compensation vector and a raindrop impact force compensation vector. The introduction of the state sensitivity matrix and the adaptive weight coefficient mechanism enables the compensation to automatically adjust according to the state change of the unmanned aerial vehicle, avoiding the problem of overcompensation or undercompensation in traditional methods.

[0095] In an alternative embodiment, the flight attitude of the UAV is predicted in multiple scales, the attitude in a first prediction interval is predicted based on local linearization, the attitude in a second prediction interval is predicted based on nonlinear processing, the second prediction interval is larger than the first prediction interval; the length of the prediction interval is dynamically adjusted based on the environment perception data; the prediction results in the first prediction interval and the second prediction interval are adaptively fused to obtain a fused prediction result, and the steps include:

[0096] Real-time attitude data and motion state data of the UAV are obtained, the real-time attitude data includes Euler angles and angular velocities, and the motion state data includes accelerations and velocities.

[0097] The real-time attitude data is locally linearized to construct a state space expression, and the motion state data is substituted into the state space expression to perform state recursion calculation to obtain a prediction result in a first prediction interval.

[0098] A nonlinear prediction equation is constructed based on the real-time attitude data and the motion state data, the nonlinear prediction equation includes aerodynamic force terms, gyroscopic force terms and disturbance force terms, a numerical solution method is used to calculate the nonlinear prediction equation to obtain a prediction result in a second prediction interval.

[0099] Environment perception data is obtained to construct an environment type index, and the length of the prediction interval is adjusted according to the environment type index and a state error evaluation index.

[0100] The attitude change rate and the prediction error change rate of the UAV are calculated, a dynamic reliability evaluation function is constructed, and the reliability indexes of the first prediction interval result and the second prediction interval result are calculated based on the dynamic reliability evaluation function; the adaptive fusion weight coefficient is determined according to the reliability indexes, the prediction results in the first prediction interval and the second prediction interval are fused to obtain a fused prediction result.

[0101] For example, real-time attitude data and motion state data of the UAV are obtained, the real-time attitude data includes three Euler angles of pitch angle, roll angle and yaw angle and corresponding angular velocities, and the motion state data includes three-axis accelerations and three-axis velocities.

[0102] When performing local linearization on the obtained real-time attitude data, a small-angle approximation is used to process the Euler angle change relationship, the nonlinear term is Taylor expanded and the first-order term is retained, and the high-order term is ignored. In specific implementation, the current attitude is taken as the equilibrium point, and a local linear state space expression is established. The state vector contains 6 components of Euler angles and angular velocities, and the control input vector contains 6 components of acceleration and velocity. The state space expression is composed of a state equation and an output equation, the state equation describes the change law of the state vector with time, and the output equation describes the relationship between the observation and the state vector. With a time step of 5ms, the state space expression is recursively calculated to predict the attitude change in the future 0-100ms, i.e. the prediction result in the first prediction interval. For example, if the current attitude is a pitch angle of 5 degrees, a roll angle of 2 degrees, and a yaw angle of 10 degrees, and the angular velocities are 1 degree / s, 0.5 degree / s, and 2 degree / s respectively, the predicted attitude after 50ms can be obtained by local linearization recursive calculation as a pitch angle of 5.05 degrees, a roll angle of 2.025 degrees, and a yaw angle of 10.1 degrees.

[0103] For nonlinear prediction in the second prediction interval, a nonlinear prediction equation is constructed, which includes aerodynamic force term, gyroscopic force term and disturbance force term. The aerodynamic force term takes into account the aerodynamic effect of the UAV at different speeds and attitudes, such as when the flight speed reaches 8m / s, about 0.2N·m of aerodynamic moment will be generated in the pitch direction; the gyroscopic force term describes the gyroscopic effect due to the rotation of the UAV itself, for example, when the yaw angle velocity is 30 degrees / s, about 0.05N·m of gyroscopic moment will be generated in the roll direction; the disturbance force term includes external moments caused by wind disturbance, asymmetric mass distribution and other factors, which are dynamically estimated according to environmental conditions, such as in 5-grade wind, the lateral wind disturbance moment can reach 0.3N·m.

[0104] The fourth-order Runge-Kutta method is used to solve the nonlinear prediction equation, and the time step is set to 10ms to predict the attitude change in the future 0-500ms, i.e. the prediction result in the second prediction interval. This method can better handle the nonlinear characteristics in the process of large-angle attitude change. For example, when the UAV performs rapid lateral maneuver, the predicted attitude change after 500ms by the nonlinear equation is more accurate than the linear prediction.

[0105] The prediction interval length is dynamically adjusted according to environmental perception data. The environmental perception data is obtained through visual sensors, laser radars and the like, and includes information such as obstacle distribution, wind speed and wind direction. When constructing the environmental type index, the environmental complexity is quantified as a score of 0-10, and the greater the value, the more complex the environment. For example, the environmental complexity of an open site is 1-2, and the environmental complexity of a city building area is 7-8. At the same time, the root mean square error of the historical prediction and the actual value is calculated as a state error evaluation index. When the environmental complexity is higher than 7 or the state error evaluation index continuously increases, the first prediction interval length is shortened to 50 ms, and the second prediction interval length is shortened to 300 ms; and in an open environment, it can be correspondingly extended to 150 ms and 800 ms.

[0106] In the adaptive weight fusion process, the attitude change rate of the unmanned aerial vehicle, that is, the change amount of the Euler angle in a unit of time, and the prediction error change rate, that is, the change percentage of the prediction error relative to the last time, are calculated. A dynamic reliability evaluation function is constructed based on the two indexes. When the attitude change rate is small (such as the Euler angle change rate being less than 5 degrees per second) and the prediction error change rate is stable in the first prediction interval, the reliability index of the linear prediction result is increased; when the attitude change rate is large (such as the Euler angle change rate being greater than 20 degrees per second) or the prediction error change rate fluctuates greatly, the reliability index of the nonlinear prediction result is increased.

[0107] The fusion weight coefficients are determined according to the reliability indexes, a soft maximum value function is used to convert the reliability indexes into weight coefficients, and it is ensured that the sum of the weight coefficients is 1. For example, when the linear prediction reliability index is 0.7 and the nonlinear prediction reliability index is 0.4, the corresponding fusion weight coefficients are about 0.65 and 0.35 respectively. The prediction results of the first prediction interval and the second prediction interval are weighted and averaged according to the weight coefficients to obtain the final fusion prediction result.

[0108] The application adopts a multi-scale prediction method combining local linearization and nonlinear processing, can simultaneously consider the attitude characteristics of high-frequency rapid change and low-frequency slow change, and overcomes the defects that a single prediction method has a limited applicable range. The fusion weights of the two prediction results are adaptively adjusted through the dynamic reliability evaluation function, and accurate responses to disturbances of different time scales are realized.

[0109] In an optional implementation, the steps of acquiring environmental perception data to construct an environmental type index, and adjusting the prediction interval length according to the environmental type index and a state error evaluation index include:

[0110] The environmental perception data of the unmanned aerial vehicle is obtained, and the environmental perception data includes distances from obstacles, wind speed, wind direction and weather conditions; the flight environment is classified based on the environmental perception data to obtain an environmental type index, and the environmental type index includes a space openness index, a wind field complexity index and a weather condition index;

[0111] constructing an adaptive prediction interval optimization function, the adaptive prediction interval optimization function comprising a prediction accuracy term, an environment adaptation term and a resource efficiency term, the prediction accuracy term being calculated based on a probability distribution feature of state error, the environment adaptation term being calculated based on time-varying characteristics of an environment type index, and the resource efficiency term being calculated based on dynamic balance characteristics of a calculation load;

[0112] determining weight coefficients of each term in the adaptive prediction interval optimization function according to the environment type index;

[0113] calculating an Euler angle deviation vector and an angular velocity deviation vector of the UAV, and constructing a state error evaluation index; substituting the state error evaluation index into the adaptive prediction interval optimization function, and solving the adaptive prediction interval optimization function to obtain a first prediction interval length and a second prediction interval length.

[0114] For example, the sensors carried on the UAV obtain environment perception data, including a laser radar, an ultrasonic sensor, a wind speed and direction sensor, and a meteorological sensor. The laser radar scans the surrounding environment at a frequency of 10 Hz, with a detection range of 0-100 meters and an accuracy of ±0.05 meters, to obtain obstacle distance information. The ultrasonic sensor detects close-range obstacles, with a detection range of 0-10 meters and an accuracy of ±0.02 meters. The wind speed and direction sensor measures the current wind speed in a range of 0-30 meters per second with an accuracy of ±0.5 meters per second and a wind direction resolution of 5 degrees. The meteorological sensor detects temperature in a range of -40°C to 85°C, humidity in a range of 0-100%, and air pressure in a range of 300-1100 hPa.

[0115] The environmental classification module receives the above-mentioned perception data and calculates the environmental type indicators. The space openness indicator is obtained by processing the lidar and ultrasonic data. Specifically, 12 azimuth sectors are divided around the UAV, and the distance to the nearest obstacle in each sector is calculated. If the distance to the obstacle in more than 8 of the 12 sectors is greater than 50 meters, the space openness indicator is set to 0.9; if the distance to the obstacle in 5-7 sectors is greater than 50 meters, it is set to 0.6; if the distance to the obstacle in less than 5 sectors is greater than 50 meters, it is set to 0.3. The wind field complexity indicator is calculated based on wind speed and wind direction change rate. When the wind speed is less than 3 meters / second and the wind direction change rate is less than 10 degrees / second, the wind field complexity indicator is set to 0.2; when the wind speed is between 3-10 meters / second or the wind direction change rate is between 10-30 degrees / second, it is set to 0.5; when the wind speed is greater than 10 meters / second or the wind direction change rate is greater than 30 degrees / second, it is set to 0.8. The meteorological condition indicator is a comprehensive evaluation of temperature, humidity and air pressure data. When the standard atmospheric pressure (1013.25 hPa), temperature 15-25°C, humidity 30-60% range, meteorological condition indicator is set to 0.1; beyond the above range but within acceptable flight conditions, set to 0.4; close to the limit of flight conditions, set to 0.7.

[0116] The adaptive prediction interval optimization function is constructed according to the above-mentioned environmental type indicators. The prediction accuracy term is calculated based on the probability distribution characteristics of the UAV's last 100 flight state errors. The deviation between each prediction and the actual state is recorded, and the mean and standard deviation of the deviation are obtained through statistical analysis. When the standard deviation is less than 1 degree, the prediction accuracy factor is set to 0.3; when the standard deviation is between 1-3 degrees, it is set to 0.5; when the standard deviation is greater than 3 degrees, it is set to 0.8. The environmental adaptation term is calculated according to the change rate of the environmental type indicators. The environmental indicators are sampled every second, and the difference between adjacent two samples is calculated. When the space openness indicator change rate is less than 0.1 / second, the wind field complexity indicator change rate is less than 0.05 / second, and the meteorological condition indicator change rate is less than 0.02 / second, the environmental adaptation factor is set to 0.2; when any of the indicator change rates exceeds the above threshold but is less than twice the threshold, it is set to 0.5; when any of the indicator change rates exceeds twice the threshold, it is set to 0.9. The resource efficiency term is calculated based on the current computing load state. Monitor CPU usage, memory usage and battery remaining power. When the CPU usage is less than 40%, the memory usage is less than 50%, and the battery power is greater than 70%, the resource efficiency factor is set to 0.1; when the CPU usage is between 40-70%, the memory usage is between 50-80%, or the battery power is between 30-70%, it is set to 0.4; when the CPU usage is greater than 70%, the memory usage is greater than 80%, or the battery power is less than 30%, it is set to 0.7.

[0117] The weights of each item in the optimization function are dynamically adjusted according to the environmental type index. In the case of high spatial openness (greater than 0.7), low wind field complexity (less than 0.3), and good meteorological conditions (less than 0.2), the weight of the prediction accuracy item is set to 0.5, the weight of the environmental adaptation item is set to 0.3, and the weight of the resource efficiency item is set to 0.2. In the case of medium spatial openness (0.4-0.7), medium wind field complexity (0.3-0.6), or general meteorological conditions (0.2-0.5), the weight of the prediction accuracy item is set to 0.4, the weight of the environmental adaptation item is set to 0.4, and the weight of the resource efficiency item is set to 0.2. In the case of low spatial openness (less than 0.4), high wind field complexity (greater than 0.6), or poor meteorological conditions (greater than 0.5), the weight of the prediction accuracy item is set to 0.3, the weight of the environmental adaptation item is set to 0.5, and the weight of the resource efficiency item is set to 0.2.

[0118] Real-time Euler angles (roll angle, pitch angle, and yaw angle) and angular velocity data are obtained and compared with the predicted values. The Euler angle deviation is calculated as the predicted value minus the actual value, with units of degrees; the angular velocity deviation is also calculated as the predicted value minus the actual value, with units of degrees / second. The state error evaluation index considers both the absolute value of the Euler angle deviation and the absolute value of the angular velocity deviation. When the average of the Euler angle deviation is less than 1 degree and the average of the angular velocity deviation is less than 2 degrees / second, the state error evaluation index is set to 0.2; when the average of the Euler angle deviation is between 1-3 degrees or the average of the angular velocity deviation is between 2-5 degrees / second, it is set to 0.5; when the average of the Euler angle deviation is greater than 3 degrees or the average of the angular velocity deviation is greater than 5 degrees / second, it is set to 0.8.

[0119] The state error evaluation index is substituted into the adaptive prediction interval optimization function, and the optimal prediction interval length is obtained through iterative calculation. For example, when the spatial openness index is 0.8, the wind field complexity index is 0.3, the meteorological condition index is 0.2, the average of the Euler angle deviation is 0.8 degrees, and the average of the angular velocity deviation is 1.5 degrees / second, the first prediction interval length is calculated to be 0.5 seconds and the second prediction interval length is calculated to be 1.2 seconds. When the spatial openness decreases to 0.3, the wind field complexity rises to 0.7, the meteorological condition index rises to 0.5, the average of the Euler angle deviation rises to 2.5 degrees, and the average of the angular velocity deviation rises to 4.2 degrees / second, the first prediction interval length is automatically adjusted to 0.2 seconds and the second prediction interval length is automatically adjusted to 0.5 seconds to adapt to more complex environmental conditions.

[0120] The state error evaluation index is substituted into the adaptive prediction interval optimization function, and the optimal prediction interval length is solved by the gradient descent method. The optimization function is in the form of: F(T1, T2) = w1 x E(T1, T2) + w2 x A(T1, T2) + w3 x R(T1, T2), wherein T1 and T2 are the first and second prediction interval lengths respectively, w1, w2 and w3 are the weights of each term, and E, A and R are the prediction accuracy term, the environmental adaptability term and the resource efficiency term respectively. The search range is set as T1 ∈ [0.1, 1.0] seconds, T2 ∈ [0.3, 3.0] seconds, the initial step is 0.1 second, and the convergence threshold is 0.01. For example, when the space is open (index 0.8), the wind field complexity is low (index 0.3), the weather condition is good (index 0.2), and the state error is small (evaluation index 0.2), the weights of each term are 0.5, 0.3 and 0.2 respectively, and the optimal solution T1 = 0.5 second and T2 = 1.2 second are obtained after about 5 iterations. When the environment is complex (each index is 0.3, 0.7 and 0.5 respectively) and the state error is large (index 0.8), the weights are adjusted to 0.3, 0.5 and 0.2, and the optimal solution becomes T1 = 0.2 second and T2 = 0.5 second, so that the environmental adaptability of the prediction interval is realized.

[0121] The present application constructs an environment classification based on multi-dimensional indexes, so that the prediction interval length can be intelligently adjusted according to the environmental characteristics. The adaptive prediction interval optimization function comprehensively considers the prediction accuracy, environmental adaptability and computing resource efficiency, and realizes the optimal allocation of prediction resources. The method breaks through the limitations of the traditional fixed prediction interval, can timely adjust the prediction strategy according to the environmental changes in the complex and changeable flight environment, significantly improves the prediction accuracy and computing efficiency, and reduces the risk of control failure under the condition of environmental mutation.

[0122] In an alternative embodiment, the step of establishing a prediction control relationship based on the prediction compensation amount and the fusion prediction result includes:

[0123] Obtaining a state variable vector and a reference trajectory input of the unmanned aerial vehicle, the state variable vector including an Euler angle vector and an angular velocity vector;

[0124] Calculating a state error matrix according to the state variable vector, constructing a state weight coefficient based on the state error matrix, and multiplying the state weight coefficient with the state variable vector to obtain a state variable control term;

[0125] Calculating a rate of change of attitude of the unmanned aerial vehicle, constructing a dynamic response function based on the rate of change of attitude, the dynamic response function increasing with the increase of the rate of change of attitude, and multiplying the dynamic response function with the reference trajectory input to obtain a reference input control term;

[0126] a deviation vector between the fusion prediction result and an actual attitude is calculated, an adaptive gain matrix is constructed based on the deviation vector, the adaptive gain matrix dynamically adjusts with a norm of the deviation vector; a disturbance compensation control item is obtained by multiplying the adaptive gain matrix and the prediction compensation quantity;

[0127] the state variable control item, the reference input control item and the disturbance compensation control item are respectively multiplied by corresponding weighting coefficients and superimposed to obtain a control input vector, the weighting coefficients are ratios of response amplitudes of corresponding control items to a total response amplitude; a flight attitude of the unmanned aerial vehicle is adjusted based on the control input vector.

[0128] For example, a state variable vector of the unmanned aerial vehicle is obtained, including an Euler angle vector and an angular velocity vector. The Euler angle vector is composed of a pitch angle, a roll angle and a yaw angle, and can be represented as (φ, θ, ψ). The angular velocity vector is composed of three axial angular velocities, and can be represented as (p, q, r). Therefore, the complete state variable vector can be represented as (φ, θ, ψ, p, q, r). At the same time, a reference trajectory input of the unmanned aerial vehicle is obtained, which contains expected attitude angle and angular velocity information.

[0129] A current Euler angle vector is subtracted from a target Euler angle vector to obtain an attitude angle error; a current angular velocity vector is subtracted from a target angular velocity vector to obtain an angular velocity error. For example, if the current Euler angle is (0.1, 0.05, 0.2) radian and the target Euler angle is (0, 0, 0) radian, the attitude angle error is (0.1, 0.05, 0.2) radian. A state weight coefficient is constructed based on a state error matrix. The coefficient increases with the increase of the absolute value of the error, specifically, when a certain attitude angle error is greater than a threshold value (such as 0.1 radian), the corresponding weight coefficient will increase (such as from 1 to 1.5). The constructed state weight coefficient is multiplied by the state variable vector to obtain a state variable control item.

[0130] The rate of change of the attitude of the unmanned aerial vehicle, i.e. the change of the Euler angle vector in unit time, is calculated. The current Euler angle vector is subtracted from the previous Euler angle vector, and then divided by the sampling time interval (e.g. 0.02 seconds) to obtain the rate of change of the attitude. For example, if the current Euler angle is (0.1, 0.05, 0.2) radians, the previous Euler angle is (0.08, 0.03, 0.18) radians, and the sampling time is 0.02 seconds, then the rate of change of the attitude is (1, 1, 1) rad / s. A dynamic response function is constructed based on the rate of change of the attitude, which increases with the increase of the rate of change of the attitude, but the growth rate gradually decreases, forming a characteristic similar to a saturation curve. For example, when the rate of change of the attitude is 1 rad / s, the dynamic response function value is 0.8; when the rate of change of the attitude increases to 2 rad / s, the dynamic response function value increases to 1.2; when the rate of change of the attitude continues to increase to 3 rad / s, the dynamic response function value only increases to 1.4. The dynamic response function is multiplied by the reference trajectory input to obtain the reference input control term.

[0131] A deviation vector is calculated by fusing the prediction result and the actual attitude. The deviation between the actual measured attitude and the predicted attitude is calculated to obtain the deviation vector. For example, if the predicted attitude is (0.08, 0.04, 0.19) radians, and the actual attitude is (0.1, 0.05, 0.2) radians, then the deviation vector is (0.02, 0.01, 0.01) radians. An adaptive gain matrix is constructed based on the deviation vector, which dynamically adjusts with the norm of the deviation vector. The norm of the deviation vector is calculated as the square root of the sum of the squares of the components, which is 0.0245 radians in the above example. When the norm of the deviation is less than a threshold value (e.g. 0.05 radians), the diagonal elements of the gain matrix take a smaller value (e.g. 0.5); when the norm of the deviation is greater than the threshold value, the diagonal elements of the gain matrix take a larger value (e.g. 1.2). The adaptive gain matrix is multiplied by the prediction compensation to obtain the disturbance compensation control term.

[0132] The state variable control term, the reference input control term, and the disturbance compensation control term are multiplied by the corresponding weighting coefficients and superimposed to obtain the control input vector. The calculation of the weighting coefficients is based on the ratio of the response amplitude of each control term to the total response amplitude. Specifically, the amplitude of each control term (the square root of the sum of the squares of the components) is calculated, and the sum of the amplitudes of all control terms is calculated as the total response amplitude. For example, if the amplitude of the state variable control term is 2.5, the amplitude of the reference input control term is 1.5, and the amplitude of the disturbance compensation control term is 1.0, then the total response amplitude is 5.0, and the corresponding weighting coefficients are 0.5, 0.3, and 0.2, respectively. The three weighted control terms are added to obtain the final control input vector.

[0133] The flight attitude of the unmanned aerial vehicle is adjusted based on a control input vector. The control input vector includes three components corresponding to the control amounts of pitch, roll and yaw respectively. The control amounts are converted into rotation speed adjustment instructions of the motors. For example, the quadrotor unmanned aerial vehicle has four motors, and the rotation speed difference of each motor is adjusted to realize the attitude adjustment in three directions. If the control input vector is (0.5, 0.3, 0.2), the possible motor rotation speed adjustment is: motor 1 increases by 500 revolutions per minute, motor 2 increases by 300 revolutions per minute, motor 3 decreases by 500 revolutions per minute, and motor 4 decreases by 300 revolutions per minute, so as to realize the desired attitude change.

[0134] The prediction control relationship of the application integrates three core elements of state variables, reference inputs and disturbance compensation, and constructs a comprehensive control framework. The dynamic weight distribution mechanism driven by the state error matrix realizes the accurate adjustment of the control strength. The attitude change rate response function and the adaptive gain matrix enable the control to automatically adjust the response sensitivity according to the dynamic characteristics of the unmanned aerial vehicle. The adaptive weighting superposition strategy of the three control inputs can automatically balance the requirements of stability and maneuverability in different flight stages, and significantly improves the flight quality and task execution ability of the unmanned aerial vehicle under complex weather conditions.

[0135] In an optional embodiment, the state change rate of the unmanned aerial vehicle is calculated, the importance level of the control parameters in the prediction control relationship is determined according to the state change rate, the corresponding parameter update threshold is set for the control parameters of different importance levels, and the parameter update threshold is adaptively adjusted according to the attitude change trend of the unmanned aerial vehicle; when the state change rate exceeds the parameter update threshold of the corresponding control parameter, the step of triggering the update of the control parameter includes:

[0136] The Euler angle and angular velocity data of the unmanned aerial vehicle are obtained, and a state change rate vector is calculated, the state change rate vector including Euler angle change rate components and angular velocity change rate components;

[0137] The components of the state change rate vector are normalized to obtain a state change rate index; the standard deviation of the state quantity is calculated based on a sliding time window to obtain a state volatility index, and the influence degree of each state quantity on the prediction error is calculated based on the deviation between the state prediction value and the actual value to obtain a prediction error contribution degree; an importance evaluation function is constructed based on the state change rate index, the state volatility index and the prediction error contribution degree, and the control parameters in the prediction control relationship are divided into multiple importance levels according to the value of the importance evaluation function;

[0138] The corresponding reference threshold is set for the control parameters of different importance levels, and an adaptive adjustment factor is constructed based on the state change rate vector and the state acceleration, and the product of the reference threshold and the adaptive adjustment factor is taken as the parameter update threshold;

[0139] The sliding time window method is used to integrate the state data, and an exponential decay weight is given to the state data at each sampling time to construct a weighted state data matrix.

[0140] When the components of the state change rate vector exceed the parameter update threshold of the corresponding control parameter, the prediction error is calculated based on the weighted state data matrix, the covariance matrix of the prediction error is constructed, the recursive least squares method is used to update the control parameter that triggers the update, and the control parameter that does not trigger the update remains unchanged.

[0141] For example, the current flight state data is collected, including Euler angle data (roll angle, pitch angle, yaw angle) and angular velocity data (x-axis, y-axis, z-axis angular velocity). The Euler angle data at the current time t is differentiated with the data at the previous time t-1, and the sampling time interval (usually 0.02 seconds) is divided to obtain the Euler angle change rate component. Similarly, the angular velocity change rate component is calculated to form a complete state change rate vector. For example, if the current Euler angle is [0.05, 0.02, 0.01] radian, the previous time is [0.04, 0.01, 0.01] radian, and the sampling interval is 0.02 seconds, then the Euler angle change rate component is calculated as [0.5, 0.5, 0] radian / second.

[0142] The state change rate vector is normalized to scale the component values to the [0, 1] interval for subsequent processing. The normalization uses the maximum-minimum value method. For example, if the maximum value in the historical data is 2 radian / second, the minimum value is -2 radian / second, and the current calculation value is 0.5 radian / second, then the normalized result is 0.625. The standard deviation of the state quantity is calculated based on the sliding time window technique, and the window size is set to 20 sampling points (corresponding to 0.4 seconds of data). The standard deviation of the Euler angle and angular velocity data in the sliding window is calculated to obtain the state volatility index. The greater the volatility, the higher the standard deviation value, indicating that the instability of the state quantity is stronger. The calculation of the prediction error contribution degree is based on the deviation analysis of the predicted value and the actual measured value. The state value at the next time is predicted using the current predictive control relationship, compared with the actual measured value, and the deviation is calculated. Through sensitivity analysis method, the influence degree of each state quantity on the prediction error is evaluated. For example, if it is found that a small change in the pitch angle leads to a significant increase in the prediction deviation, then the prediction error contribution degree of the pitch angle is higher.

[0143] The importance evaluation function comprehensively considers the above three indicators (state change rate indicator, state volatility indicator and prediction error contribution degree) and is constructed by weighted summation. The weight proportion is set to 3:2:5, and the prediction error contribution degree is given a higher weight. According to the calculation results of the evaluation function, the control parameters are divided into three importance levels: high importance (evaluation value ≥ 0.7), medium importance (0.3 ≤ evaluation value < 0.7) and low importance (evaluation value < 0.3).

[0144] Different reference thresholds are set for different importance levels: the reference threshold for high importance parameters is 0.15, the reference threshold for medium importance parameters is 0.25, and the reference threshold for low importance parameters is 0.4. These reference thresholds are dynamically adjusted by an adaptive adjustment factor. The adaptive adjustment factor is constructed based on the state change rate vector and the state acceleration. The state acceleration is obtained by calculating the first-order difference of the state change rate. The adjustment factor changes with the state change trend, and when the UAV is in rapid maneuvering or the attitude changes dramatically, the adjustment factor increases, which reduces the update threshold and increases the parameter update frequency; when the UAV is in a stable flight state, the adjustment factor decreases, which increases the update threshold and reduces unnecessary parameter updates. For example, when the pitch angle change rate is continuously increasing, the adjustment factor may increase from 1.0 to 1.5, which reduces the update threshold of the corresponding parameter from 0.25 to 0.167.

[0145] The sliding time window method is used to integrate the state data of the last 40 sampling points. Different weights are assigned to each sampling point, and an exponential decay method is used to give higher weights to the most recent data. If the decay factor is set to 0.95, the weight of the i-th historical data point is 0.95 i . The weighted state data matrix constructed in this way can better reflect the recent dynamic characteristics of the UAV.

[0146] When a certain state change rate component exceeds the parameter update threshold of the corresponding control parameter, the update process of the parameter is triggered. The historical 40 sampling point data in the weighted state data matrix is called, and the current control parameter value is substituted into the predictive control relationship to calculate the predicted state value of each sampling point. The predicted state values are subtracted from the actual measured state values stored in the matrix to obtain a prediction error sequence. Based on the prediction error sequence, a 6x6-dimensional prediction error covariance matrix is calculated, which represents the variance of the prediction error of each state component on the diagonal elements, and the covariance between different state components on the non-diagonal elements. The prediction error covariance matrix is used as the input of the recursive least squares method, and the weighted state data is used to construct the objective function, and the optimal parameter update amount is calculated iteratively. For example, when the roll angle change rate is 0.35 and exceeds the threshold of 0.3, only the control parameters related to roll are updated, and the remaining parameters remain unchanged.

[0147] The application establishes a multi-dimensional importance evaluation function based on a state change rate index, a state volatility index and a prediction error contribution degree, and realizes accurate grading of control parameters. Differentiated update threshold values are set for parameters of different importance levels, and calculation resource allocation is optimized.

[0148] In an optional embodiment, the step of constructing an adaptive adjustment factor based on the state change rate vector and the state acceleration comprises:

[0149] The state change rate vector is decomposed at different time scales, short-term change characteristics are extracted using short-time Fourier transform, and long-term change characteristics are extracted using wavelet transform; a correlation coefficient of the short-term change characteristics and the long-term change characteristics is calculated, and a complement of the correlation coefficient is taken as a trend difference index;

[0150] The state change rate vector is subjected to time difference operation to obtain a state acceleration vector, principal component analysis is performed on the state acceleration vector to obtain eigenvalues, and an acceleration response function is constructed based on the eigenvalues; the acceleration response function adopts asymmetric gain for positive acceleration and negative acceleration, and the gain corresponding to the positive acceleration is greater than the gain corresponding to the negative acceleration;

[0151] The norm of the state change rate vector is calculated, and a segmented response function is constructed; the segmented response function presents linear growth when the norm of the state change rate is less than a first preset threshold, presents exponential growth when the norm of the state change rate is greater than the first preset threshold and less than a second preset threshold, and adopts saturation characteristics when the norm of the state change rate is greater than the second preset threshold;

[0152] The fusion weight of the acceleration response function and the segmented response function is determined based on the trend difference index; a hyperbolic tangent mapping is performed on the fused result to obtain a basic adjustment factor, the value range of the adjustment factor is set based on a state error boundedness criterion, a smoothing process is adopted to eliminate threshold jumps, and a final adaptive adjustment factor is obtained.

[0153] For example, the state change rate vector of the unmanned aerial vehicle is obtained, the vector is subjected to multi-scale time decomposition, and short-term change characteristics are extracted using short-time Fourier transform. Specifically, 20 sampling points (corresponding to 0.4 seconds of data) are selected as an analysis window, the window overlap rate is set to 50%, a Hanning window function is applied to reduce frequency spectrum leakage, and a time-frequency spectrum diagram is calculated. The main frequency component and its amplitude change are extracted from the time-frequency spectrum diagram as short-term change characteristics. For example, when the unmanned aerial vehicle performs a rapid turning operation, the short-time Fourier transform result of the pitch angle change rate shows that there is obvious energy concentration in the 2-5 Hz frequency band, and the amplitude is about 0.8 rad / s. These characteristics reflect the short-term attitude change mode.

[0154] Meanwhile, the long-term variation characteristics of the state rate of change vector are extracted using wavelet transform. The db4 wavelet basis function is selected, and the wavelet coefficients of the 4th and 5th levels are extracted as the long-term variation characteristics after 5-level decomposition. These low-frequency coefficients can effectively capture the long-term trend of the rate of change. For example, during the sustained climb, the wavelet transform of the pitch rate of change shows that the mean value of the 5th-level coefficient remains at about 0.3 rad / s, indicating a stable long-term trend.

[0155] The correlation coefficient of the short-term variation characteristics and the long-term variation characteristics is calculated. First, the main frequency energy characteristics of the short-time Fourier transform are converted to the time domain to obtain a time series, and then the Pearson correlation calculation is performed with the low-frequency coefficients of the wavelet transform. When the short-term and long-term characteristics are highly correlated (the correlation coefficient is close to 1), it indicates that the unmanned aerial vehicle state change presents a consistent trend; when the correlation is low (the correlation coefficient is close to 0), it indicates that there is a significant difference between the short-term fluctuations and the long-term trend. The complement of the correlation coefficient (i.e., 1 minus the absolute value of the correlation coefficient) is taken as the trend difference index. For example, if the correlation coefficient is calculated to be 0.75, the trend difference index is 0.25, indicating that the short-term change is basically consistent with the long-term trend; if the correlation coefficient is 0.1, the trend difference index is 0.9, indicating that there is a significant difference between the short-term change and the long-term trend.

[0156] The state acceleration vector is obtained by performing time difference operation on the state rate of change vector. The specific method is to calculate the difference between the state rates of change of two adjacent sampling points and divide by the sampling time interval (such as 0.02 seconds). For example, if the pitch rates of change of two adjacent sampling points are 0.5 rad / s and 0.7 rad / s, respectively, the corresponding pitch acceleration is 10 rad / s 2 The characteristic values and characteristic vectors are extracted by performing principal component analysis on the complete state acceleration vector. The principal components whose cumulative contribution rate exceeds 95% are retained, usually the first 2-3 characteristic values. For example, the characteristic values obtained in a calculation are [5.2, 2.8, 0.9, 0.5, 0.3, 0.1], and the first three characteristic values are selected, corresponding to a cumulative contribution rate of 96.4%.

[0157] An acceleration response function is constructed based on the eigenvalues obtained from principal component analysis. The function adopts an asymmetric gain strategy for positive and negative accelerations. When the acceleration is positive (indicating that the state change rate is increasing), the gain coefficient is set to 1.2; when the acceleration is negative (indicating that the state change rate is decreasing), the gain coefficient is set to 0.8. This asymmetric design makes the system more sensitive to the situation where the state change rate is increasing, and responds in advance. The specific form of the acceleration response function is the product of the eigenvalue weighted sum and the asymmetric gain. If the principal component eigenvalues are [5.2, 2.8, 0.9], the corresponding weight coefficients are [0.5, 0.3, 0.2], and the acceleration direction is positive, then the acceleration response function value is calculated as (5.2×0.5+2.8×0.3+0.9×0.2)×1.2=3.72.

[0158] The norm of the state change rate vector is calculated as a measure of the overall change intensity. The Euclidean norm (L2 norm) is used, which is the square root of the sum of the squares of each component. For example, if the state change rate vector is [0.5, 0.3, 0.1, 1.2, 0.8, 0.4] radians / second, its norm is approximately 1.65. Based on this norm value, a piecewise response function is constructed to achieve adaptive response to different change intensities. The specific design is as follows: when the norm is less than the first preset threshold (0.5 rad / s), the function value is equal to the norm value multiplied by 0.8, showing linear growth; when the norm is greater than 0.5 rad / s and less than the second preset threshold (2.0 rad / s), the function value is equal to 0.4 plus the square of (norm value-0.5) multiplied by 0.3, showing exponential growth; when the norm is greater than 2.0 rad / s, the function value is fixed at 0.85, showing saturation characteristics. For example, when the norm is 0.3 rad / s, the piecewise response function value is 0.24; when the norm is 1.0 rad / s, the function value is 0.55; when the norm is 2.5 rad / s, the function value is 0.85.

[0159] Based on the trend difference index calculated earlier, the fusion weights of the acceleration response function and the piecewise response function are determined. When the trend difference index is large (indicating that the short-term change and the long-term trend difference are significant), the weight of the acceleration response function is increased; when the trend difference index is small, the weight of the piecewise response function is increased. Specifically, the weight of the acceleration response function is set to the trend difference index, and the weight of the piecewise response function is set to 1 minus the trend difference index. For example, when the trend difference index is 0.7, the acceleration response function weight is 0.7 and the piecewise response function weight is 0.3; when the two function values are 3.72 and 0.55 respectively, the fusion result is 3.72×0.7+0.55×0.3=2.77.

[0160] The fused result is mapped by hyperbolic tangent to limit the value range in the interval [-1, 1]. Specifically, the fused result is divided by 5 (a normalization factor), and then the hyperbolic tangent function is applied to obtain the basic adjustment factor. For example, when the fused result is 2.77, the normalized result is 0.554, and the basic adjustment factor obtained by applying the hyperbolic tangent function is about 0.503. The effective value range of the adjustment factor is set based on the state error boundedness criterion to ensure control stability. The adjustment factor is limited in the interval [0.2, 2.0], and when the calculation result is less than 0.2, 0.2 is taken, and when the calculation result is greater than 2.0, 2.0 is taken. To avoid control discontinuity caused by threshold jumping, the adjustment factor is smoothed by applying a moving average filter with a window size of 5 sampling points. For example, if the basic adjustment factors of the last 5 sampling points are [0.48, 0.50, 0.51, 0.53, 0.53], the final adaptive adjustment factor after smoothing is 0.51.

[0161] The adaptive adjustment factor is multiplied by the reference threshold to obtain the final parameter update threshold. For example, if the reference threshold of an importance parameter is 0.25, and the currently calculated adaptive adjustment factor is 0.51, then the final parameter update threshold is 0.25 x 0.51 = 0.1275. When the corresponding state change rate exceeds the threshold, the update operation of the parameter is triggered.

[0162] Figure 2 The performance comparison chart of different methods in four different flight scenes, the white column, the diagonal line filled column and the grid filled column respectively represent the efficiency data of the three technical solutions of the traditional fixed threshold, the single factor adjustment and the method of the application. From the figure, it can be clearly seen that the method of the application performs best in all test scenes, which embodies the significant advantages of the trend difference index and the adaptive adjustment strategy of the application, especially in the face of highly unstable flight environment, the method of the application shows stronger adaptability and robustness.

[0163] The introduction of the trend difference index of the application enables the adjustment factor to distinguish between short-term fluctuations and long-term trends, avoiding excessive response to temporary disturbances. The strategy of using asymmetric gain to process positive and negative accelerations improves the prediction ability of sudden state changes. The segmented response function and the hyperbolic tangent mapping realize the nonlinear optimization of the adjustment factor, ensuring smooth transition and stable convergence of parameter update, effectively preventing control parameter oscillation, and significantly improving the robustness of the flight control.

[0164] In a second aspect of the embodiment of the application, an unmanned aerial vehicle flight attitude adaptive prediction and control system is provided, comprising:

[0165] The first unit is configured to acquire wind speed, wind direction and precipitation density data, construct wind disturbance compensation and raindrop impact force compensation, and combine the wind disturbance compensation and the raindrop impact force compensation to form a prediction compensation.

[0166] The second unit is configured to perform multi-scale prediction on the flight attitude of the UAV, perform attitude prediction in a first prediction interval based on local linearization, and perform attitude prediction in a second prediction interval based on nonlinear processing; the length of the prediction interval is dynamically adjusted based on environmental perception data; the prediction result of the first prediction interval and the prediction result of the second prediction interval are adaptively fused to obtain a fused prediction result;

[0167] The third unit is configured to establish a predictive control relationship based on the prediction compensation amount and the fused prediction result, wherein the predictive control relationship includes a state variable term, a reference input term, and a disturbance compensation term; calculate the state change rate of the UAV, determine the importance level of the control parameters in the predictive control relationship according to the state change rate, set the corresponding parameter update threshold for the control parameters with different importance levels, and the parameter update threshold is adaptively adjusted according to the attitude change trend of the UAV; when the state change rate exceeds the parameter update threshold of the corresponding control parameter, the update of the control parameter is triggered;

[0168] The fourth unit is configured to generate an instruction according to the updated predictive control relationship and adjust the flight attitude of the UAV, and feed back the adjusted attitude information for optimization of the extreme scenario dynamics prediction compensation amount.

[0169] In a third aspect, an electronic device is provided, including: a processor;

[0170] a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the method described above. In a fourth aspect, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above. The present application can be a method, device, system and / or computer program product. The computer program product can include a computer readable storage medium on which is loaded computer readable program instructions for implementing aspects of the present application.

[0171] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An unmanned aerial vehicle flight attitude adaptive prediction and control method, characterized in that, The method comprises the following steps: obtaining wind speed, wind direction and precipitation density data, constructing a wind disturbance compensation amount and a raindrop impact force compensation amount to form a prediction compensation amount, specifically including: performing Kalman filter preprocessing on the wind speed and wind direction data, calculating the wind attack angle and the sideslip angle, and constructing a nonlinear wind disturbance compensation vector based on the wind attack angle and the sideslip angle; performing smoothing processing on the precipitation density data, calculating the relative speed of the unmanned aerial vehicle and the raindrop, and calculating the raindrop impact force compensation vector based on the relative speed and the raindrop area of the unmanned aerial vehicle; calculating the coupling force of the nonlinear wind disturbance compensation vector and the raindrop impact force compensation vector, wherein the coupling force comprises a wind-rain interaction coefficient; calculating the angular velocity change rate, the linear acceleration change rate and the attitude angle change rate of the unmanned aerial vehicle, and constructing a state sensitivity matrix; calculating a disturbance compensation weight index according to the state sensitivity matrix, and determining adaptive weight coefficients of the nonlinear wind disturbance compensation vector, the raindrop impact force compensation vector and the coupling force based on the disturbance compensation weight index; multiplying the nonlinear wind disturbance compensation vector, the raindrop impact force compensation vector and the coupling force by the corresponding adaptive weight coefficients respectively and superimposing them to obtain a comprehensive prediction compensation amount; performing multi-scale prediction on the flight attitude of the unmanned aerial vehicle, performing attitude prediction in a first prediction interval based on local linearization, and performing attitude prediction in a second prediction interval based on nonlinear processing; the length of the prediction interval is dynamically adjusted based on environmental perception data, specifically including: obtaining environmental perception data of the unmanned aerial vehicle, wherein the environmental perception data comprises distance to obstacles, wind speed, wind direction and weather conditions; classifying the flight environment based on the environmental perception data to obtain an environmental type index, wherein the environmental type index comprises a space openness index, a wind field complexity index and a weather condition index; constructing an adaptive prediction interval optimization function, wherein the adaptive prediction interval optimization function comprises a prediction accuracy term, an environmental adaptation term and a resource efficiency term, the prediction accuracy term is calculated based on the probability distribution characteristics of the state error, the environmental adaptation term is calculated based on the time-varying characteristics of the environmental type index, and the resource efficiency term is calculated based on the dynamic balance characteristics of the calculation load; determining the weight coefficients of each term in the adaptive prediction interval optimization function according to the environmental type index; calculating the Euler angle deviation vector and the angular velocity deviation vector of the unmanned aerial vehicle, and constructing a state error evaluation index; substituting the state error evaluation index into the adaptive prediction interval optimization function to obtain the first prediction interval length and the second prediction interval length by solving the adaptive prediction interval optimization function; adaptively fusing the prediction results of the first prediction interval and the second prediction interval to obtain a fused prediction result; The prediction control relationship is established based on the predicted compensation amount and the fusion prediction result, and the prediction control relationship includes a state variable term, a reference input term, and a disturbance compensation term; a state change rate of the unmanned aerial vehicle is calculated, the importance level of a control parameter in the prediction control relationship is determined according to the state change rate, a corresponding parameter update threshold is set for the control parameter of different importance levels, and the parameter update threshold is adaptively adjusted according to the attitude change trend of the unmanned aerial vehicle, specifically including: obtaining Euler angles and angular velocity data of the unmanned aerial vehicle, calculating a state change rate vector, the state change rate vector including an Euler angle change rate component and an angular velocity change rate component; the components of the state change rate vector are normalized to obtain a state change rate index; the influence degree of each state variable on the prediction error is obtained based on the deviation of the state prediction value from the actual value to obtain a prediction error contribution degree; an importance evaluation function is constructed based on the state change rate index, the state fluctuation index, and the prediction error contribution degree, and the control parameters in the prediction control relationship are divided into multiple importance levels according to the value of the importance evaluation function; a corresponding reference threshold is set for the control parameters of different importance levels, an adaptive adjustment factor is constructed based on the state change rate vector and the state acceleration, and the product of the reference threshold and the adaptive adjustment factor is taken as the parameter update threshold; when the state change rate exceeds the parameter update threshold of the corresponding control parameter, the update of the control parameter is triggered. Instructions are generated according to the updated prediction control relationship, and the flight attitude of the unmanned aerial vehicle is adjusted.

2. The method of claim 1, wherein, The flight attitude of the unmanned aerial vehicle is predicted in multiple scales, the attitude in a first prediction interval is predicted based on local linearization, and the attitude in a second prediction interval is predicted based on nonlinear processing; the length of the prediction interval is dynamically adjusted based on environmental perception data; the prediction results of the first prediction interval and the second prediction interval are adaptively weighted and fused to obtain a fusion prediction result, including the following steps: Real-time attitude data and motion state data of the unmanned aerial vehicle are obtained; The real-time attitude data are locally linearized, a state space expression is constructed, the motion state data are substituted into the state space expression for state recursion calculation, and a prediction result of a first prediction interval is obtained; A nonlinear prediction equation is constructed based on the real-time attitude data and the motion state data, the nonlinear prediction equation includes an aerodynamic force term, a gyroscopic force term, and a disturbance force term, a numerical solution method is used to calculate the nonlinear prediction equation, and a prediction result of a second prediction interval is obtained; Environmental perception data are obtained to construct an environmental type index, and the prediction interval length is adjusted according to the environmental type index and a state error evaluation index; The attitude change rate and the prediction error change rate of the unmanned aerial vehicle are calculated, a dynamic reliability evaluation function is constructed, the reliability indexes of the first prediction interval result and the second prediction interval result are calculated based on the dynamic reliability evaluation function, and the adaptive fusion weight coefficient is determined according to the reliability indexes; the prediction results of the first prediction interval and the second prediction interval are fused to obtain a fusion prediction result.

3. The method of claim 1, wherein, The step of establishing a predictive control relationship based on the predicted compensation and the fusion prediction result, the predictive control relationship including a state variable term, a reference input term, and a disturbance compensation term, comprises: Obtaining a state variable vector and a reference trajectory input of the UAV; Calculating a state error matrix according to the state variable vector, constructing a state weight coefficient based on the state error matrix, and multiplying the state weight coefficient with the state variable vector to obtain a state variable control term; Calculating a rate of change of attitude of the UAV, constructing a dynamic response function based on the rate of change of attitude, the dynamic response function increasing with the increase of the rate of change of attitude, and multiplying the dynamic response function with the reference trajectory input to obtain a reference input control term; Calculating a deviation vector of the fusion prediction result and an actual attitude, constructing an adaptive gain matrix based on the deviation vector, the adaptive gain matrix dynamically adjusting with the norm of the deviation vector, and multiplying the adaptive gain matrix with the predicted compensation to obtain a disturbance compensation control term; Multiplying the state variable control term, the reference input control term, and the disturbance compensation control term with corresponding weight coefficients respectively and superimposing to obtain a control input vector, the weight coefficients being ratios of response amplitudes of corresponding control terms to a total response amplitude, and adjusting the flight attitude of the UAV based on the control input vector.

4. The method of claim 1, wherein, When the rate of change of attitude exceeds a parameter update threshold of a corresponding control parameter, the step of triggering update of the control parameter comprises: Integrating state data by using a sliding time window method, assigning an exponential decay weight to state data at each sampling time, and constructing a weighted state data matrix; When a component of the rate of change of attitude vector exceeds a parameter update threshold of a corresponding control parameter, calculating a prediction error based on the weighted state data matrix, constructing a covariance matrix of the prediction error, and updating the control parameter triggered for update by using a recursive least square method, the control parameter not triggered for update remaining unchanged.

5. The method of claim 4, wherein, The step of constructing an adaptive adjustment factor based on the rate of change of attitude vector and state acceleration comprises: Decomposing the rate of change of attitude vector at different time scales, extracting short-term variation characteristics by using a short-time Fourier transform, extracting long-term variation characteristics by using a wavelet transform, calculating a correlation coefficient of the short-term variation characteristics and the long-term variation characteristics, and taking a complement of the correlation coefficient as a trend difference index; Performing a time difference operation on the rate of change of attitude vector to obtain a state acceleration vector, performing principal component analysis on the state acceleration vector to obtain eigenvalues, constructing an acceleration response function based on the eigenvalues, the acceleration response function adopting an asymmetric gain for positive acceleration and negative acceleration, and the gain corresponding to the positive acceleration being greater than the gain corresponding to the negative acceleration; Calculating a norm of the rate of change of attitude vector, constructing a segmented response function, the segmented response function linearly increasing when the norm of the rate of change of attitude is less than a first preset threshold, exponentially increasing when the norm of the rate of change of attitude is greater than the first preset threshold and less than a second preset threshold, and adopting a saturation characteristic when the norm of the rate of change of attitude is greater than the second preset threshold. Determine the fusion weight of the acceleration response function and the segmented response function based on the trend difference index; Perform hyperbolic tangent mapping on the fused result to obtain a basic adjustment factor, set the value range of the adjustment factor based on the state error boundedness criterion, and obtain the final adaptive adjustment factor.

6. An adaptive prediction and control system for the flight attitude of a drone for implementing the method according to any one of the preceding claims 1-5, characterized by, Comprise: The first unit is used for acquiring wind speed, wind direction and precipitation density data, constructing wind disturbance compensation and raindrop impact force compensation, and combining the wind disturbance compensation and the raindrop impact force compensation to form a prediction compensation; The second unit is used for multi-scale prediction of the flight attitude of the unmanned aerial vehicle, attitude prediction in a first prediction interval based on local linearization, and attitude prediction in a second prediction interval based on nonlinear processing; The length of the prediction interval is dynamically adjusted based on the environmental perception data; The prediction results of the first prediction interval and the second prediction interval are adaptively weighted and fused to obtain a fused prediction result; The third unit is used for establishing a prediction control relationship based on the prediction compensation and the fused prediction result, the prediction control relationship containing a state variable term, a reference input term and a disturbance compensation term; Calculate the state change rate of the unmanned aerial vehicle, determine the importance level of the control parameters in the prediction control relationship according to the state change rate, set the corresponding parameter update threshold for the control parameters of different importance levels, and the parameter update threshold is adaptively adjusted according to the attitude change trend of the unmanned aerial vehicle; When the state change rate exceeds the parameter update threshold of the corresponding control parameter, the update of the control parameter is triggered; The fourth unit is used for generating instructions and adjusting the flight attitude of the unmanned aerial vehicle according to the updated prediction control relationship, and feeding back the adjusted attitude information for optimization of the prediction compensation.

7. An electronic device, comprising: Comprise: A processor; A memory for storing processor-executable instructions; Wherein the processor is configured to call the instructions stored in the memory to execute the method of any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions are executed by the processor to realize the method of any one of claims 1 to 5. The computer program instructions are executed by the processor to realize the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Four-rotor unmanned aerial vehicle path tracking control method based on online safety learning

    CN107563044A

  • Wind speed calculation method and unmanned aerial vehicle

    CN110244753A