Unmanned aerial vehicle wind-resistant adaptive control method based on real-time environmental perception

By synchronously sensing the expected rotational speed and actual quadrature-axis current of the UAV, the wind speed vector and control parameters are dynamically corrected, solving the problem of real-time wind resistance control of the UAV in complex wind fields and achieving efficient wind resistance stability and attitude control.

CN122151925APending Publication Date: 2026-06-05SICHUAN YANYUAN HUADIAN NEW ENERGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN YANYUAN HUADIAN NEW ENERGY CO LTD
Filing Date
2026-05-08
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing drones rely on physical sensors for wind field perception in complex wind field environments, which leads to increased costs, payload space occupation, and data delays. Furthermore, fixed parameters cannot adapt to equipment wear and tear, resulting in disturbance observation deviations and attitude control lags.

Method used

By acquiring the expected rotational speed command and actual quadrature-axis current of the UAV, and combining them with absolute timestamps to construct a time-domain reference sequence, the three-dimensional wind speed vector is inverted and a confidence attenuation coefficient is generated. The aerodynamic drag and motor viscous friction coefficient are dynamically corrected, and the feedforward and feedback control vectors are fused to perform wind-resistant adaptive control.

Benefits of technology

It enables real-time wind field perception for UAVs in complex wind conditions, reduces hardware costs and weight, improves wind resistance stability and attitude control accuracy, and avoids calculation deviations caused by mechanical wear and environmental changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122151925A_ABST
    Figure CN122151925A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of unmanned aerial vehicle flight control, and relates to an unmanned aerial vehicle wind resistance adaptive control method based on real-time environment sensing, which comprises issuing a desired rotating speed instruction to an electronic speed regulator according to an attitude control loop, synchronously acquiring actual quadrature axis current and absolute physical acquisition time; extracting a quadrature axis current sequence to identify and update rotor aerodynamic drag coefficients and motor viscous friction coefficients; combining the identified coefficients to calculate a desired quadrature axis current and construct a time domain reference sequence, deducing a synchronous desired quadrature axis current and subtracting the actual quadrature axis current, mapping actuating current residuals into single-rotor disturbance torque residuals; inverting a three-dimensional wind speed vector of the machine body and using a confidence decay coefficient to correct and generate an effective wind field vector; calculating a dynamic weighted feedforward control vector and fusing it with a feedback control vector to solve a desired angular velocity instruction and execute wind resistance control. The present method does not require a physical anemometer, and can realize environment wind field sensing and adaptive feedforward compensation only by online identification of underlying electrical data and parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) flight control technology, and more specifically, to wind-resistant adaptive control of UAVs based on real-time environmental perception. Background Technology

[0002] When multi-rotor drones perform missions outdoors, they often face interference from complex wind fields. Maintaining a stable flight attitude is crucial for the design of the flight control system. Currently, drones need to be equipped with additional physical sensors such as pitot tubes or ultrasonic anemometers to acquire external wind field data for wind-resistant control. The introduction of such external hardware not only increases the overall manufacturing cost but also occupies the drone's payload space and increases takeoff weight. Furthermore, the communication link between the external sensor data acquisition and the main control chip has latency, making it difficult to meet the high real-time requirements of the underlying flight control system for environmental data.

[0003] To reduce reliance on physical anemometers, some control schemes attempt to use the UAV's own dynamic model to observe wind field disturbances. However, these systems typically use factory-preset fixed aerodynamic drag coefficients and motor mechanical friction coefficients for calculations. During the actual operation of the UAV, as the motor bearings wear down, the propellers age, and the external temperature and humidity environment changes, the fixed preset parameters will gradually deviate from the actual physical state of the equipment. This parameter solidification causes a large deviation in the system's deduction of the expected current and calculation of the disturbance torque, directly affecting the accuracy of external wind speed inversion.

[0004] After acquiring wind disturbance data, existing wind-resistant control relies on a basic closed-loop feedback control loop. This control method is a passive response, meaning that it only generates a reverse adjustment command after the aircraft's attitude has been altered by the wind, resulting in significant lag and difficulty in effectively dealing with sudden gusts. A few schemes that introduce feedforward control can output compensation commands in advance, but they directly and indiscriminately convert the observed wind speed data into control inputs without considering the errors in the observed data under severe disturbances. When there is a deviation in the fitting of environmental data, fixed feedforward compensation can actually cause overshooting and oscillations in the attitude control loop. Current technology lacks a mechanism to dynamically adjust the intensity of feedforward compensation based on the confidence level of the observed data, thus limiting the overall wind resistance stability of the UAV under complex disturbances. Summary of the Invention

[0005] The purpose of this invention is to provide a wind-resistant adaptive control method for UAVs based on real-time environmental perception, which solves the problems of existing UAVs relying on physical sensors for external wind field perception, leading to increased overall cost and reduced payload, and fixed dynamic parameters being unable to adapt to equipment wear, resulting in large deviations in disturbance observation.

[0006] This invention is achieved through the following technical solution: A wind-resistant adaptive control method for UAVs based on real-time environmental perception includes: Obtain the desired rotational speed command of the current UAV, send the desired rotational speed command to the electronic speed controller and record the absolute timestamp, and simultaneously obtain the actual quadrature axis current and the corresponding absolute physical acquisition time; Based on the actual cross-axis current, an actual cross-axis current sequence is constructed, and the actual cross-axis current sequence is extracted to identify and update the rotor aerodynamic drag coefficient and the motor viscous friction coefficient. The desired cross-axis current is obtained based on the rotor aerodynamic drag coefficient and the motor viscous friction coefficient, and a time-domain reference sequence is constructed based on the absolute timestamp and the desired cross-axis current. Based on the absolute physical acquisition time, the synchronous expected cross-axis current is derived in the time-domain reference sequence. The actuation current residual is calculated by subtracting the synchronous expected cross-axis current from the actual cross-axis current, and then mapped to the single rotor disturbance torque residual. The confidence attenuation coefficient is generated by inverting the three-dimensional wind speed vector in the body coordinate system using the residual inversion of the single rotor disturbance torque. Based on the confidence attenuation coefficient, the amplitude of the three-dimensional wind speed vector is corrected to generate an effective wind field vector. Based on the effective wind field vector, a dynamic weighted feedforward control vector is calculated. The dynamic weighted feedforward control vector is then fused with the feedback control vector output by the attitude control loop to generate a composite control vector, which is then calculated into a desired angular velocity command. Based on the desired angular velocity command, wind-resistant adaptive control is completed.

[0007] Preferably, obtaining the actual quadrature-axis current and the corresponding absolute physical acquisition time includes: Obtain the desired rotational speed command for each rotor node and construct a downlink communication data frame containing the desired rotational speed command. Use a hardware timer to monitor the status latch count value of the communication sending peripheral port register as an absolute timestamp. The external interrupt service routine is triggered by capturing the start bit level edge of the downlink communication data frame to mark the arrival of the instruction. The local hardware timer count value is extracted at the moment when the actual quadrature axis current is collected, and the difference between the count value and the moment when the instruction arrives is calculated to obtain the relative time offset. The relative time offset is converted into a uniform unit of absolute time span and added to the absolute timestamp to reconstruct the absolute physical acquisition time.

[0008] Preferably, it also includes a step of determining whether to enter a steady-state hovering condition, including: The sensor's historical data is cached by constructing a data sliding window, and the magnitude sequences of the three-axis angular velocity vectors and the magnitude sequences of the three-axis linear acceleration vectors within the data sliding window are extracted to obtain the variance of the attitude angle change rate and the variance of the linear acceleration. When the variance of the attitude angle change rate is less than the angular velocity variance threshold and the variance of the linear acceleration is less than the linear acceleration variance threshold, it is determined that the steady-state hovering condition has been entered and the online parameter identification and update process is allowed to be triggered.

[0009] Preferably, the updated rotor aerodynamic drag coefficient and motor viscous friction coefficient include: The mean value of the expected angular velocity of the rotor and the mean value of the actual cross-axis current within the sliding window of the data are calculated. A steady-state dynamic balance model is constructed, which consists of the electromagnetic torque generated by the motor, the aerodynamic drag torque of the rotor, and the mechanical friction torque of the motor rotor shaft system. The steady-state dynamic balance model is transformed into a standard linear regression form to encapsulate the system output variables and data observation vectors. The recursive least squares algorithm module with forgetting factor is then called to iteratively update the rotor aerodynamic drag coefficient and the motor viscous friction coefficient.

[0010] Preferably, the construction of the time-domain reference sequence based on the absolute timestamp and the desired cross-axis current includes: Calculate the desired angular acceleration, and then calculate the desired quadrature-axis current based on the desired angular acceleration, the motor torque constant, and the equivalent moment of inertia of the rotor system. A circular buffer is initialized by allocating a contiguous address space, and the total number of data nodes in the circular buffer is determined based on the maximum round-trip delay of the communication link and the discrete sampling period of the control loop. The absolute timestamp and the desired cross-axis current are written to the circular buffer in pairs using a memory write pointer to construct a time-domain reference sequence.

[0011] Preferably, the step of deriving the synchronous desired quadrature-axis current based on the absolute physical acquisition time in the time-domain reference sequence includes: Using the absolute physical acquisition time as the search keyword, a reverse traversal is performed within the time domain reference sequence to find two adjacent historical absolute timestamps and their corresponding expected cross-axis currents that are immediately before and after the absolute physical acquisition time in the time dimension. The synchronous desired quadrature-axis current is calculated by linear interpolation using two adjacent points before and after the current. The mapping to the single-rotor disturbance torque residual includes: The motor torque constant is extracted as a proportional gain for linear transformation. The actuation current residual is mapped to the single rotor disturbance torque residual. The single rotor disturbance torque residual is then input into a digital low-pass filter for smoothing and noise reduction.

[0012] Preferably, the three-dimensional wind speed vector in the inverted machine coordinate system includes: Traverse the single rotor disturbance torque residuals arranged in order of rotor physical space numbering to construct the disturbance torque residual vector; The sensitivity of the additional drag torque generated by the three-dimensional spatial wind field in the body coordinate system to the independent rotor is loaded, the aerodynamic load difference matrix is ​​mapped, and an overdetermined linear equation system characterizing the mapping relationship between endogenous and exogenous loads is established. The overdetermined linear equations were solved using the Moore-Penrose pseudo-inverse algorithm, and the three-dimensional wind speed vector in the body coordinate system was obtained by inverse calculation.

[0013] Preferably, the confidence decay coefficient includes: The three-dimensional wind speed vector and the aerodynamic load difference matrix are multiplied in the forward direction to reconstruct the expected reconstructed disturbance moment vector. The actual measured disturbance moment residual vector is subtracted from the reconstructed disturbance moment vector to calculate the sum of squared fitting residuals. When the sum of squared fitted residuals does not exceed the residual tolerance threshold, the confidence decay coefficient is set to the maximum value. When the sum of squared fitted residuals exceeds the residual tolerance threshold, the confidence adaptive decay mechanism is triggered to dynamically reduce the confidence decay coefficient value through an exponential decay function.

[0014] Preferably, the calculation of the dynamically weighted feedforward control vector includes: Obtain the aerodynamic drag mapping matrix of the whole machine, and perform a linear transformation on the effective wind field vector based on the aerodynamic drag mapping matrix of the whole machine to generate the basic feedforward control vector; The dynamic weighted feedforward control vector is calculated by multiplying the feedforward scheduling gain matrix based on the basic feedforward control vector.

[0015] Preferably, the solution is a desired angular velocity command, and the wind-resistant adaptive control is performed based on the desired angular velocity command, including: Obtain the preset control allocation inverse matrix, perform actuation allocation calculation for the square vector of the desired angular velocity of each rotor through matrix multiplication, and extract the square root operation result; The square root result is compared with the idle speed threshold and the maximum safe speed threshold to limit the amplitude, and the desired angular velocity command is generated. The desired angular velocity command is sent to the electronic speed controller to execute the underlying drive and complete the wind-resistant adaptive control.

[0016] The technical solution of the present invention has at least the following advantages and beneficial effects: 1. This invention synchronously acquires the actual quadrature-axis current of the underlying motor and calculates the actuation current residual by combining it with the deduced expected quadrature-axis current. Then, it maps the residual to the single rotor disturbance torque residual to invert the three-dimensional wind speed vector in the body coordinate system. The real-time perception of the external wind field can be achieved using existing motor drive electrical data without the need for an additional physical anemometer. This reduces the overall hardware cost and takeoff weight of the UAV while ensuring the real-time acquisition of environmental data.

[0017] 2. After determining that the UAV has entered a steady-state hovering condition, this invention extracts historical data within a sliding window to construct a steady-state dynamic balance model, and calls a recursive least squares algorithm with a forgetting factor to iteratively update the rotor aerodynamic drag coefficient and motor viscous friction coefficient online. This allows the system dynamic model to be dynamically corrected according to the actual physical state of the equipment, avoiding calculation deviations caused by mechanical wear or environmental changes due to fixed preset parameters, and improving the accuracy of expected current derivation and disturbance torque calculation.

[0018] 3. This invention utilizes the reconstructed disturbance moment to calculate the sum of squared residuals to generate a confidence attenuation coefficient, corrects the amplitude of the inverted wind speed vector, and calculates a dynamically weighted feedforward control vector accordingly. This vector is then fused with the feedback control vector of the original attitude control loop. This control strategy transforms the perceived environmental disturbances into feedforward compensation commands for early intervention and can adaptively adjust the feedforward compensation intensity based on the reliability of the measurement data. This effectively suppresses the interference of complex wind fields on the aircraft's attitude and improves the wind-resistant flight stability of the UAV. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is an overall flowchart of the wind-resistant adaptive control method for UAVs based on real-time environmental perception according to the present invention. Figure 2 This is the process of reverse traversal matching interpolation and actuation current residual stripping in this invention; Figure 3 This is a flowchart of the three-dimensional spatial wind field vector reconstruction and inversion in the body coordinate system of this invention; Figure 4 The figures show a comparison of wind speed inversion and attitude error under gust interference according to the present invention. Sub-figure (a) is the external three-dimensional wind speed vector inversion tracking curve of the present invention, and sub-figure (b) is the roll angle error comparison curve of the present invention under gust interference. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0022] See attached document Figure 1 This invention provides a wind-resistant adaptive control method for unmanned aerial vehicles (UAVs) based on real-time environmental perception. This method is implemented using a hardware topology that includes a flight controller, a communication bus, and electronic speed controllers distributed at various rotor nodes on the fuselage. The electronic speed controllers receive commands to drive the rotors and transmit underlying electrical parameters back to the flight controller. The control method may include the following steps: S1: Establish a high-precision time synchronization mechanism and telemetry data parsing to obtain the absolute physical acquisition time: Obtain the desired rotational speed command of the current UAV, send the desired rotational speed command to the electronic speed controller and record the absolute timestamp, and simultaneously obtain the actual quadrature axis current and the corresponding absolute physical acquisition time; When the flight controller sends a desired speed command to the electronic speed controller, it triggers an internal hardware timer to record the absolute timestamp of the command. At the same time, the electronic speed controller captures the communication bus level edge to mark the command arrival event and records the relative time offset relative to the command arrival event when acquiring the actual quadrature-axis current. Then, the actual quadrature-axis current and the relative time offset are packaged and sent back to the flight controller. The flight controller then uses the absolute timestamp to reconstruct and calculate the absolute physical acquisition time corresponding to the actual quadrature-axis current.

[0023] S2: Perform boundary determination for steady-state hovering conditions and adaptive calibration of steady-state dynamic balance model parameters. Based on the actual cross-axis current, an actual cross-axis current sequence is constructed, and the actual cross-axis current sequence is extracted to identify and update the rotor aerodynamic drag coefficient and the motor viscous friction coefficient. The flight controller extracts attitude and acceleration data output from the inertial measurement unit. When the variance of the rate of change of attitude angle and the variance of linear acceleration are both below a preset threshold within a set sliding window, the system is determined to have entered a steady-state hovering condition. Then, based on the mean of the expected angular velocity and the mean of the actual quadrature-axis current within the window, a steady-state dynamic balance model is constructed, and the recursive least squares method is used to identify and update the rotor aerodynamic drag coefficient and the motor viscous friction coefficient online.

[0024] S3: Construct an actuator current observer to perform forward calculations and store the data in a circular buffer to construct a time-domain reference sequence.

[0025] The desired cross-axis current is obtained based on the rotor aerodynamic drag coefficient and the motor viscous friction coefficient, and a time-domain reference sequence is constructed based on the absolute timestamp and the desired cross-axis current. The flight controller constructs an actuation current observer based on rigid body dynamics and the electromagnetic balance principle of motors. It reads the desired angular velocity command output by the control loop, and calculates the desired quadrature-axis current in the forward direction by combining the updated aerodynamic drag coefficient and viscous friction coefficient. Then, it sequentially pushes the continuously generated desired quadrature-axis current and its absolute timestamp into a circular buffer in local memory to construct a time-domain reference sequence.

[0026] S4: Synchronize the desired quadrature-axis current by reverse traversal matching interpolation and perform actuation current residual stripping.

[0027] Based on the absolute physical acquisition time, the synchronous expected cross-axis current is derived in the time-domain reference sequence. The actuation current residual is calculated by subtracting the synchronous expected cross-axis current from the actual cross-axis current, and then mapped to the single rotor disturbance torque residual. The flight controller uses the reconstructed absolute physical acquisition time as the retrieval keyword, performs reverse traversal and interpolation matching within the circular buffer, derives the synchronous expected quadrature-axis current with strict time alignment, subtracts it from the actual quadrature-axis current returned by the electronic speed controller to remove the actuation current residual, and then linearly maps the actuation current residual to the single rotor disturbance torque residual of each rotor channel.

[0028] S5: Decouple the endogenous and exogenous loads of a single rotor, reconstruct the three-dimensional spatial wind field vector in the inverted airframe coordinate system, and perform confidence level evaluation: The confidence attenuation coefficient is generated by inverting the three-dimensional wind speed vector in the body coordinate system using the residual inversion of the single rotor disturbance torque. Based on the confidence attenuation coefficient, the amplitude of the three-dimensional wind speed vector is corrected to generate an effective wind field vector. The flight controller combines the aerodynamic load difference matrix describing the three-dimensional spatial wind field sensitivity mapping relationship with the single rotor disturbance torque residual of each channel to construct an overdetermined linear equation system. The equation system is solved by least squares through pseudo-inverse matrix calculation to obtain the three-dimensional wind speed vector in the body coordinate system. At the same time, the sum of squares of the fitting residuals reconstructed in the solution process is extracted and compared with the tolerance threshold to calculate the confidence attenuation coefficient used to characterize the confidence level of the wind field.

[0029] S6: Generate a dynamically weighted feedforward control vector, fuse it with the attitude feedback control vector, and then calculate and send out the underlying commands: Based on the effective wind field vector, a dynamic weighted feedforward control vector is calculated. The dynamic weighted feedforward control vector is then fused with the feedback control vector output by the attitude control loop to generate a composite control vector, which is then calculated into a desired angular velocity command. Based on the desired angular velocity command, wind-resistant adaptive control is completed.

[0030] The flight controller uses the confidence attenuation coefficient to correct the amplitude of the three-dimensional wind speed vector to generate an effective wind field vector. It then combines this vector with the overall aerodynamic drag mapping matrix to transform it into a basic feedforward control vector. The feedforward scheduling gain matrix is ​​then introduced to calculate a dynamic weighted feedforward control vector. Finally, this vector is added to and fused with the feedback control vector output from the attitude control loop to generate a composite control vector. The control allocation inverse matrix is ​​extracted and solved to obtain the desired angular velocity command to be executed by each rotor at the bottom layer.

[0031] In implementing a wind-resistant adaptive control method for UAVs based on real-time environmental perception, the high-frequency data exchange between the flight controller and the electronic speed controller is affected by factors such as communication bus arbitration waiting, protocol encapsulation, and software processing queues, resulting in uncertain time jitter. To ensure the temporal matching accuracy of command data and sampled data in subsequent observation models, this method establishes a high-precision timing synchronization mechanism based on the characteristics of hardware peripherals.

[0032] In one exemplary embodiment of the present invention, obtaining the actual quadrature-axis current and the corresponding absolute physical acquisition time includes: The system acquires the desired rotational speed command for each rotor node and constructs a downlink communication data frame containing the desired rotational speed command. It uses a hardware timer to monitor the status latch count value of the communication sending peripheral port register as an absolute timestamp. It captures the start bit level edge of the downlink communication data frame to trigger an external interrupt service routine to mark the command arrival event. At the moment the actual cross-axis current acquisition is completed, it extracts the local hardware timer count value and calculates the difference between this count and the command arrival event to obtain the relative time offset. The relative time offset is converted into a uniform unit absolute time span and added to the absolute timestamp to reconstruct and calculate the absolute physical acquisition time.

[0033] Specifically, S101: The flight controller calculates the desired rotational speed of each rotor node based on the attitude control loop and constructs a downlink communication data frame containing the desired rotational speed command. The communication bus connecting the flight controller and the electronic speed controller can use a controller area network bus, a universal asynchronous transceiver bus, or a digital speed control protocol bus, etc., as the lower-level communication medium.

[0034] The flight controller utilizes an internally configured high-precision hardware timer to monitor the port register status of the communication transmitting peripheral. When the start bit level edge of a downlink communication data frame is detected and output to the physical transmit pin, the hardware timer synchronously latches the current count value. The flight controller extracts this count value as the absolute timestamp for command issuance. To meet the timing requirements of high-frequency motor control, the counting resolution of this hardware timer is configured to be at the microsecond level, and its clock period is set to a range of 1. Up to 5 To provide sufficient measurement granularity.

[0035] S102: The electronic speed controller utilizes the external interrupt function of the microcontroller's configuration receive pin to capture physical transitions in the bus level independently of the main loop program. When the start bit level edge of the downlink communication data frame arrives at the electronic speed controller's receive pin, the hardware-level level change directly triggers the external interrupt service routine. The electronic speed controller marks this external interrupt triggering action as an instruction arrival event and reads the current count value of the electronic speed controller's local hardware timer within the interrupt service routine, using it as the local reference time. By directly capturing the physical level edge using a hardware-level external interrupt, the time consumption deviation caused by the communication protocol stack performing data unpacking at the software level is avoided.

[0036] S103: When the electronic speed controller performs the motor drive task, it triggers the analog-to-digital converter to perform high-frequency sampling of the phase current of the motor stator winding according to the preset pulse width modulation period. The specific calculation process for converting the sampled phase current into the actual quadrature-axis current can be implemented by those skilled in the art using standard field-oriented control algorithms. The calculation logic included in these algorithms, such as the Clarke transform and Park transform, is well-known in the field and will not be elaborated upon here.

[0037] At the moment the analog-to-digital converter completes the conversion operation and outputs the current actual quadrature-axis current, the electronic speed controller extracts the count value of the local hardware timer at that moment. The electronic speed controller obtains the relative time offset by calculating the difference between the count value at that moment and the aforementioned local reference time. This relative time offset is used to characterize the physical time span elapsed from the occurrence of the command arrival event to the completion of the underlying current sampling.

[0038] S104: After acquiring the above data, the electronic speed controller encapsulates the calculated relative time offset and the actual quadrature-axis current acquired in this sampling within the same payload, constructing an uplink telemetry data frame. The electronic speed controller then writes this uplink telemetry data frame into the transmit peripheral register of the communication bus for transmission back to the flight controller.

[0039] The aforementioned mechanism maintains the absolute time base at the flight controller while simultaneously recording the relative runtime, independent of bus transmission time, at the electronic speed controller. By combining absolute timestamps and relative time offsets, this method provides timing markers for underlying electrical parameters without adding additional dedicated synchronization hardware wiring.

[0040] After acquiring the telemetry data transmitted back from the electronic speed controller, the flight controller performs data parsing and timestamp reconstruction locally to eliminate the uncertain delays introduced by the bus transmission link. The specific implementation process includes the following sub-steps: S105, the flight controller reads uplink telemetry data frames from the electronic speed controller via the receiving peripheral of the communication bus. The flight controller unpacks these data frames at the software level and extracts the actual quadrature-axis current encapsulated within the payload. and the corresponding relative time offset .

[0041] When a communication receiving peripheral completes the reception of a data frame, the underlying operating system typically records the local system time at the moment of reception completion. Considering bus arbitration waiting, physical cable transmission time, and congestion in the microcontroller's internal software receive queue, there is an indeterminate delay difference between this local system time and the actual sampling time at the underlying level. To ensure the rigor of subsequent calculations, this method does not use the local system time at the moment of reception completion as the time-domain reference for data alignment.

[0042] S106, the flight controller receives the relative time offset. A unified clock domain conversion is performed. Because the flight controller and electronic speed controller use microcontrollers with different core architectures and clock frequencies, there is an objective difference in the counting period of the hardware timers at both ends.

[0043] The flight controller, based on the pre-configured operating frequency of the electronic speed controller's hardware timer, calculates the relative time offset based on the count value. This is converted to an absolute time span in microseconds. For the calculation method of normalizing timer count values ​​at different operating frequencies to standard physical time, those skilled in the art can use conventional clock cycle multiplication and frequency division logic to implement it. The numerical conversion process is well-known in the field and will not be elaborated upon here. After conversion, the system obtains a relative time offset in a unified unit. .

[0044] The flight controller retrieves the absolute timestamp corresponding to the telemetry data from local memory. This absolute timestamp It is a value latched by the flight controller hardware timer when the desired speed command is issued.

[0045] Based on the extracted parameters, the flight controller calculates the absolute timestamp. Relative time offset after conversion The sum of these two values ​​reconstructs the actual quadrature-axis current. Absolute physical acquisition time when the sampling action actually occurs The operational logic satisfies the following formula: ; Calculated absolute physical acquisition time Actual quadrature axis current It assigns accurate timing attributes to the global control loop. The above-mentioned reconstruction mechanism avoids unpredictable timing jitter in the uplink and downlink communication links through underlying hardware marking and local computation compensation, ensuring that the sampling time error is controlled at the microsecond level when data is compared in the observation model.

[0046] Before performing online identification and calibration of the underlying parameters, it is necessary to eliminate the interference of high-frequency attitude maneuvers of the UAV on the dynamic model. The flight controller analyzes the frequency domain characteristics of the fuselage motion state to find a suitable low-frequency stable time window for parameter calibration.

[0047] In one exemplary embodiment of the present invention, before performing online identification and calibration of the underlying parameters, it is necessary to eliminate the interference of high-frequency attitude maneuvers of the UAV on the dynamic model. The flight controller analyzes the frequency domain characteristics of the fuselage motion state to find a suitable low-frequency stable time window for parameter calibration.

[0048] The steps for determining whether to enter a steady-state hovering condition include: constructing a data sliding window cache of historical sensor data; extracting the three-axis angular velocity vector magnitude sequence and the three-axis linear acceleration vector magnitude sequence within the data sliding window to obtain the variance of attitude angle change rate and the variance of linear acceleration; when the variance of attitude angle change rate is less than the angular velocity variance threshold and the variance of linear acceleration is less than the linear acceleration variance threshold, the steady-state hovering condition is determined and the online parameter identification and update process is allowed to be triggered.

[0049] Specifically, S201: The flight controller reads the three-axis angular velocity data and three-axis acceleration data output by the inertial measurement unit at high frequency through the internal communication bus. For the preprocessing of the inertial measurement unit data, such as low-pass filtering and temperature compensation, those skilled in the art can use conventional digital filtering algorithms. The specific processing logic is well-known in the field and will not be elaborated here.

[0050] To extract and evaluate the frequency domain features of the UAV's dynamic flight process, the flight controller constructs a fixed-length data sliding window in its internal memory. This sliding window is used to cache historical sensor data within a recent period. The window length is typically configured to be between 0.5 s and 2.0 s, corresponding to N consecutive discrete sampling points. As the control cycle progresses, new sampling points are continuously pushed into the sliding window, while the oldest sampling points are removed to maintain a constant window length.

[0051] S202: In each control cycle, the flight controller extracts the magnitude sequences of the three-axis angular velocity vectors and the three-axis acceleration vectors based on historical data within the sliding window. Using these magnitude sequences, the algorithm calculates the variance of the attitude angle change rate within the current sliding window. and linear acceleration .

[0052] Variance of attitude angle change rate Taking the calculation process as an example, the operational logic satisfies the following formula:

[0053] In the formula, This represents the total number of discrete sampling points contained within the sliding window. Let be the triaxial angular velocity magnitude corresponding to the k-th discrete sampling point within the sliding window. All within this sliding window The arithmetic mean of the angular velocity magnitudes corresponding to each discrete sampling point. Linear acceleration variance. The calculation logic is consistent with the principle of this formula. The above variance-based evaluation index filters out the influence of static constant gravitational acceleration and fixed zero bias of the sensor, reflecting the degree of maneuvering of the fuselage within the time window.

[0054] The flight controller will calculate the variance of the attitude angle change rate in real time. and the variance of linear acceleration Each value is compared with a pre-set state boundary threshold. The angular velocity variance threshold is set to... The linear acceleration variance threshold is .

[0055] The aforementioned state boundary thresholds are determined based on the overall rotational inertia of the UAV and the background noise level of the onboard inertial measurement unit, and are pre-calibrated. In the standard configuration of multi-rotor aircraft, the angular velocity variance threshold... The value range is set to 0.01 (rad / s). 2 Up to 0.05 (rad / s) 5 linear acceleration variance threshold The value range is set to 0.1 (m / s). 2 ) 2 up to 0.5 (m / s) 2 ) 2 .

[0056] When the flight controller detects and When both conditions are met, it is determined that the UAV is not currently in an attitude maneuver or acceleration / deceleration phase, and its fuselage motion is stable, thus indicating that the system has entered a steady-state hovering condition. After confirming entry into steady-state hovering, the flight controller sets its internal calibration enable flag to a valid state, allowing the subsequent online parameter identification process to be triggered. When the variance of any of the above parameters exceeds the corresponding threshold, the flag is reset, and the flight controller suspends parameter updates to prevent the introduction of dynamic calculation errors during maneuvers.

[0057] After the steady-state hovering condition boundary determination is completed and the calibration enable flag is in a valid state, the flight controller initiates adaptive calibration of key parameters in the underlying power transmission model. Because prolonged operation of the UAV can cause wear on motor bearings and changes in rotor aerodynamic shape due to attachments, using fixed theoretical parameters would introduce observation errors. The specific implementation process includes the following sub-steps: S204: The flight controller extracts the desired angular velocity sequence and the actual quadrature-axis current sequence corresponding to the current sliding window from the communication receive buffer. To eliminate the influence of high-frequency noise from the sensor and data jumps at discrete sampling points, the flight controller performs an arithmetic average on the above sequences to calculate the average value of the rotor's desired angular velocity within the sliding window. and the average value of actual quadrature axis current .

[0058] When the UAV is in steady-state hovering, the rotor's angular acceleration is approximately zero, and the system is in torque balance. The electromagnetic torque generated by the motor is equivalent to the sum of the rotor's aerodynamic drag torque and the mechanical friction torque of the motor rotor shaft system. Based on this physical relationship, a steady-state dynamic balance model is constructed internally by the flight controller. The operational logic of this model satisfies the following formula:

[0059] in, This is the motor torque constant, which is determined by the motor's electromagnetic structure and is considered a fixed, known constant during operation. The rotor aerodynamic drag coefficient to be identified. The coefficient of viscous friction of the motor to be identified is denoted as .

[0060] S205, the flight controller transforms the aforementioned steady-state dynamic balance model into a standard linear regression form suitable for parameter estimation. The flight controller constructs the system output variables. and data observation vectors And the rotor aerodynamic drag coefficient to be updated coefficient of viscous friction with motor Encapsulated as an unknown parameter vector .

[0061] Within each cycle that determines the entry into steady-state hovering and triggers calibration, the specific matrix representation of the above variables is as follows:

[0062]

[0063]

[0064] Where T represents the matrix transpose operation.

[0065] For the unknown parameter vector to be identified The flight controller loads default initial values ​​during the system initialization phase. These initial values ​​are obtained through calibration tests on a dynamometer bench before the drone leaves the factory. Under the physical configuration of a conventional multi-rotor aircraft, the rotor aerodynamic drag coefficient... The value range is usually 1.0 × 10. -8 N·m / (rad / s) 2 Up to 1.0×10 - 6 N·m / (rad / s) 2 Between orders of magnitude; motor viscous friction coefficient The value range is usually 1.0 × 10. -6 N·m / (rad / s) to 1.0×10 -4 The range is on the order of N·m / (rad / s). This range is used to limit anomalous divergence during the identification process.

[0066] S206, the flight controller calls the internally embedded recursive least squares algorithm module with a forgetting factor to calculate the system output variable y and the data observation vector obtained in the current period. For unknown parameter vectors Iterative updates will be performed.

[0067] To balance the tracking speed of the parameter calibration process with the time-varying environment and the steady-state convergence accuracy, the algorithm module is equipped with a forgetting factor. The forgetting factor To reduce the weight of outdated historical data in the current parameter estimation, its value is set between 0.95 and 0.99. If the working environment has high dust levels or conditions that cause rapid changes in blade condition, the forgetting factor will be adjusted. The value is biased towards 0.95; when flying in a normal clean environment, the forgetting factor will be... The value is set to 0.99 to ensure the smoothness of the identification results. For the initialization of the covariance matrix and the specific matrix iteration update logic in the recursive least squares algorithm, those skilled in the art can implement it using conventional parameter estimation theory. The calculation process is well-known in the field and will not be elaborated upon here.

[0068] After processing by the recursive algorithm module, the flight controller extracts the updated unknown parameter vector. Unpack it and restore it to the latest rotor aerodynamic drag coefficient. coefficient of viscous friction with motor The flight controller writes these two latest parameters to its internal non-volatile memory. This mechanism, by extracting low-frequency data features under steady-state conditions, enables online calibration of aerodynamic and friction parameters, providing benchmark parameters for the subsequent construction of an accurate actuation current observation model.

[0069] In one exemplary embodiment of the present invention, after completing the online identification of the reference parameters, the flight controller constructs an actuation current observer based on the updated parameters. This observer is used to forward deduce in the time domain the theoretically expected quadrature-axis current that the underlying motor should generate when the flight controller issues a desired speed command. The specific implementation process includes the following sub-steps: S301: The flight controller receives the latest rotor desired angular velocity command output from the attitude control loop in each control cycle. The rotor desired angular velocity command for the current control cycle is set to... The flight controller retrieves the rotor's desired angular velocity command from the previous control cycle, stored in its internal registers. .

[0070] To obtain the dynamic rate of change corresponding to this command, the flight controller uses a discrete difference algorithm to calculate the desired angular acceleration. The operational logic satisfies the formula. ,in, To control the discrete sampling period of the loop. To match the requirements of high-frequency electrically tunable communication, the discrete sampling period... The value range is typically set to 1ms to 4ms. To suppress differential noise introduced by high-frequency command step inputs, a first-order low-pass filter is connected in series at the differential output. The differential equation transformation and specific code implementation of the first-order low-pass filter can be achieved using conventional digital signal processing techniques by those skilled in the art; its filter design is a well-known technique in this field and will not be elaborated upon here.

[0071] S302: The flight controller retrieves the rotor aerodynamic drag coefficient, which was successfully identified and verified in the previous stage, from the non-volatile memory. coefficient of viscous friction with motor Simultaneously, the flight controller loads a pre-calibrated motor torque constant. Equivalent moment of inertia of the rotor system .

[0072] Equivalent moment of inertia of rotor system This includes the total mechanical inertia of the motor rotor and propeller. This value is extracted through a three-dimensional computer-aided design model or obtained through pre-shipment testing using the pendulum method. For conventional multi-rotor aircraft, the equivalent rotational inertia of the rotor system is... The value range is usually 1.0 × 10. -5 kg·m 2Up to 1.0×10 -3 kg·m 2 The inertia parameter does not change significantly during the normal service life of the UAV and is used as a constant parameter in calculations.

[0073] S303: The flight controller substitutes the extracted kinematic state variables and physical parameters into the forward algorithm of the actuation current observer. The actuation current observer, based on rigid body dynamics and the electromagnetic balance principle of motors, calculates the ideal current input required to overcome mechanical inertia, aerodynamic drag, and viscous frictional resistance. This forward algorithm satisfies the following formula:

[0074] in, This is the expected quadrature-axis current derived from the forward derivation of the observer.

[0075] Calculated expected quadrature axis current This represents the reference actuation current required to execute the current speed command under ideal operating conditions without external wind interference. This forward-derived value eliminates non-command load disturbances caused by the external environment, providing an accurate reference for subsequent evaluation of aerodynamic load changes caused by external wind.

[0076] After completing the forward calculation of the expected quadrature-axis current for the current time step, considering the objective time consumption of data round-trip transmission in the communication link, directly comparing the calculated expected quadrature-axis current with the received actual quadrature-axis current will result in a time-domain misalignment. To preserve the data trajectory for subsequent queries, the flight controller constructs a circular buffer for the discrete-time series in local memory. The specific implementation process includes the following sub-steps: S304: The flight controller allocates a contiguous address space in its internal random access memory to initialize a circular buffer. This circular buffer consists of multiple sequentially arranged data nodes, each configured as a data structure containing time-domain and frequency-domain information.

[0077] Specifically, the flight controller encapsulates two core variables within this structure: one is the absolute timestamp of the command issued, which is latched by the aforementioned hardware timer. The other is the expected quadrature-axis current, calculated by the actuation current observer, which corresponds strictly to this timestamp. These two variables are bound to each other in physical memory addresses and together represent the ideal actuation state that the UAV propulsion system should output at a specific historical moment.

[0078] S305: The flight controller establishes the data depth of the circular buffer during the initialization phase. The data depth here refers to the total number of data nodes contained within the circular buffer. The total number is determined based on the maximum physical delay of the communication link between the flight controller and the electronic speed controller, as well as the execution frequency of the control loop. The calculation logic for the total number of data nodes satisfies the following formula:

[0079] in, The maximum round-trip delay of the uplink and downlink communication links is pre-calibrated using an oscilloscope. To control the discrete sampling period of the loop, Redundant node margin is set to prevent queue overflow caused by occasional bus congestion or data retransmission.

[0080] Under the bus configuration of a conventional multirotor aircraft, the maximum round-trip delay of the communication link is limited. Typically between 10ms and 30ms; Redundant node margin The value range is set to 5 to 10 nodes. The total number of data nodes M, calculated by the flight controller based on this formula, is typically configured as an integer between 16 and 64. This depth setting ensures coverage of maximum communication latency while avoiding excessive consumption of the microcontroller's limited memory resources.

[0081] S306: After the flight controller completes the calculation of the desired cross-axis current in each control cycle, it performs a push operation on the buffer. The flight controller maintains a memory write pointer, and writes the absolute timestamp of the current cycle and the desired cross-axis current in pairs into the current physical node pointed to by the write pointer.

[0082] After the write operation is complete, the flight controller increments the address of the write pointer. When the write pointer reaches the end boundary of the continuous address space of the circular buffer, the flight controller redirects it back to the beginning address of the buffer, thereby automatically overwriting and updating the oldest historical data. The circular shifting of the read and write pointers and the memory out-of-bounds protection mechanism in the circular buffer can be implemented using conventional modulo arithmetic algorithms by those skilled in the art; its pointer space management is a well-known technique in the field and will not be elaborated upon here.

[0083] Through the above construction mechanism, the circular buffer dynamically maintains a historical expected current trajectory of fixed length that slides forward continuously in physical memory, providing a discrete data source for subsequent matching and retrieval using actual reconstructed timestamps.

[0084] An exemplary embodiment of the present invention is described with reference to the appendix. Figure 2After obtaining the reconstructed absolute physical acquisition time and constructing the annular buffer for the historical expected quadrature-axis current, the flight controller needs to calculate the underlying aerodynamic disturbance residuals. Because the control loop discrete period of the flight controller is asynchronous with the current sampling period of the electronic speed controller, and the uplink and downlink communication link times are not fixed, the actual current acquisition time usually cannot perfectly coincide with the command issuance time. To achieve strict data alignment, the flight controller performs a reverse matching interpolation operation based on the absolute physical timestamp. The specific implementation process includes the following sub-steps: Extract the reconstructed absolute physical acquisition time and use it as the target physical timestamp for reverse matching; perform reverse traversal in the constructed circular buffer to find two adjacent data nodes that temporally enclose the target physical timestamp; use the adjacent data nodes to perform linear interpolation in the time dimension to deduce the theoretically synchronized expected quadrature-axis current that is strictly aligned with the actual physical acquisition time; perform subtraction and stripping between the actual quadrature-axis current transmitted from the telemetry data and the deduced theoretically synchronized expected quadrature-axis current to calculate the pure actuation current residual.

[0085] S401: After receiving an uplink telemetry data frame containing the actual quadrature axis current and completing the reconstruction calculation of the absolute physical acquisition time, the flight controller triggers the data synchronization matching mechanism. The flight controller uses this absolute physical acquisition time as the search keyword to initiate a query request to the circular buffer in local memory.

[0086] S402: The flight controller traverses historical data nodes in reverse within the circular buffer, searching for two control cycle data points that are immediately adjacent to the absolute physical acquisition time in the time dimension. The system locates the most recent historical absolute timestamp within the buffer that is prior to the absolute physical acquisition time, denoted as the left boundary timestamp. And extract the desired cross-axis current bound to that node. .

[0087] The system extracts the timestamp from the left boundary. The data of the next node adjacent to the physical address is obtained by retrieving the most recent historical absolute timestamp after the absolute physical acquisition time, denoted as the right boundary timestamp. Simultaneously extract the desired quadrature-axis current bound to it. .

[0088] The above data satisfy the following relationship in the time domain: The specific addressing process for timestamp comparison and data node detection in a circular historical queue can be implemented by those skilled in the art using conventional binary search algorithms or reverse traversal algorithms. The memory search logic is a well-known technology in this field and will not be elaborated here.

[0089] S403: After extracting the above four boundary parameters, the flight controller performs a linear expansion between two points. Since the control loop of the flight controller typically operates at frequencies above several hundred hertz, the physical time interval between two adjacent control cycles is short. Within this microsecond to millisecond time span, the dynamic change of the motor's desired quadrature-axis current is approximately linear.

[0090] The flight controller uses the aforementioned parameters to perform linear interpolation calculations, deriving the theoretically desired synchronous quadrature-axis current that the power system should output at the precise moment of absolute physical acquisition time. The interpolation logic satisfies the following formula:

[0091] S404, after completing the interpolation calculation, the flight controller performs a difference calculation between the actual quadrature-axis current and the synchronous desired quadrature-axis current at the same physical moment to isolate current fluctuations solely caused by changes in the external aerodynamic environment. The flight controller then calculates the actuation current residual. The operational logic satisfies the following formula:

[0092] The actuation current residual eliminates the influence of command variations and internal mechanical damping, numerically mapping purely the external gust interference and unmodeled aerodynamic loads encountered by the UAV's wings during operation. This interpolation and decoupling mechanism effectively solves the time-domain misalignment problem caused by bus communication delays, laying a precise data foundation for subsequently mapping the current residual to physical wind speed or three-dimensional aerodynamic drag. After obtaining the actuation current residual, the flight controller needs to further convert this electrical dimension residual into physical parameters in the mechanical dimension, i.e., perform endogenous and exogenous load difference and disturbance torque residual mapping. The specific implementation process includes the following sub-steps: In S405, the flight controller decouples and defines the physical properties of the load sources that cause fluctuations in the power system output within its algorithm logic. The flight controller defines the mechanical rotational inertia of the UAV rotor itself, the viscous frictional drag of the motor shaft system, and the baseline aerodynamic drag in a windless, static atmospheric environment as endogenous loads; and defines the additional aerodynamic drag caused by the external wind field, sudden gusts, and airflow changes caused by near-ground effects as exogenous loads.

[0093] Since the aforementioned actuation current observer has fully incorporated the dynamic characteristics of the endogenous load into the baseline model when calculating the synchronous desired quadrature-axis current, the actuation current residual extracted by the system through subtraction has essentially achieved the differentiation between the endogenous and endogenous loads in physical terms. This actuation current residual characterizes the electrical impact of exogenous load fluctuations caused by the external environment on the underlying motor control loop.

[0094] S406: The flight controller extracts the motor torque constant pre-stored in non-volatile memory, mapping the actuation current residual in the electrical dimension to the single-rotor disturbance torque residual in the mechanical dimension. This mapping process is based on the underlying electromagnetic torque generation principle of a brushless DC motor, using the torque constant as the proportional gain for linear transformation. The operational logic satisfies the following formula:

[0095] The calculated residual disturbance torque of a single rotor has a clear physical meaning, representing the additional physical torque required for the rotor to overcome the current external wind field interference.

[0096] S407: Considering that the electronic speed controller inevitably introduces high-frequency switching noise from the inverter when sampling the quadrature-axis current, and that the frequency of exogenous load disturbances at the aerodynamic level is usually concentrated in the low-frequency band, the flight controller inputs the mapped preliminary single-rotor disturbance torque residual into a digital low-pass filter for smoothing and noise reduction. The cutoff frequency of the digital low-pass filter is preset based on the mechanical resonant frequency of the UAV structure and the frequency band of the natural wind field changes in the environment, with a value range of 5Hz to 20Hz. This value range effectively filters out high-frequency electromagnetic interference while preserving the true aerodynamic response characteristics brought about by external gusts. For the differential equation transformation and memory state variable update of the discrete digital low-pass filter, those skilled in the art can use conventional digital signal processing theory to implement it. The specific filter algorithm code design is a well-known technology in this field and will not be elaborated here.

[0097] S408, after smoothing, accurately reflects the magnitude of the exogenous aerodynamic load borne by a single power node at the current flight moment. The flight controller traverses all rotor channels, summarizing the mechanical parameters mapped from each channel and storing them in its internal shared memory area. This mapping operation establishes a computational channel between the electrical parameters of the underlying electronic speed controller and the dynamic parameters of the top-level aircraft, providing fundamental raw input parameters for the subsequent synthesis of the three-dimensional spatial wind field vector or total aerodynamic disturbance spindle in the UAV body coordinate system.

[0098] An exemplary embodiment of the present invention is described with reference to the appendix. Figure 3 After obtaining the residual disturbance torques of each power node, the flight controller fuses these dispersed underlying mechanical parameters and reconstructs the external wind field state in the UAV's body coordinate system through inverse dynamics calculation. The specific implementation process includes the following sub-steps: The single-rotor disturbance torque residuals of each independent rotor power node are traversed and summarized, and the whole-aircraft disturbance torque residual vector is constructed according to the spatial position sequence. The aerodynamic load difference matrix reflecting the multi-rotor configuration and aerodynamic characteristics of the fuselage is retrieved from the system. The whole-aircraft disturbance torque residual vector and the retrieved aerodynamic load difference matrix are combined to establish an overdetermined linear equation system characterizing the mapping relationship between endogenous and exogenous loads. The pseudo-inverse matrix operation algorithm is used to solve the overdetermined linear equation system by least squares, and the three-dimensional spatial wind field vector in the body coordinate system is reconstructed and inverted.

[0099] S501: The flight controller extracts the single-rotor disturbance torque residuals for each rotor channel within the current control cycle from the shared memory area. Assuming the total number of UAV rotors is n, the flight controller arranges these n single-rotor disturbance torque residuals according to the rotor's physical spatial numbering, constructing a column vector, i.e., the disturbance torque residual vector. The specific form of this vector is:

[0100] In the formula, Let n be the residual disturbance torque of the single rotor in the i-th rotor channel, where i ranges from 1 to n. For a conventional quadcopter, n is 4; for a hexacopter, n is 6.

[0101] The flight controller applies an aerodynamic load difference matrix based on the UAV's physical structure and rotor aerodynamic characteristics. This matrix describes the sensitivity mapping relationship between the three-dimensional spatial wind field in the airframe coordinate system and the additional drag torque generated by each independent rotor.

[0102] In real-world physical scenarios, when a drone encounters an external wind field, the rotors on the windward and leeward sides will experience different induced drags due to the difference in relative airflow speed. The elements of the aerodynamic load difference matrix depend on the rotor's installation position, the blade lift line slope, and the current reference hovering speed. To ensure the accuracy of the matrix elements, the system pre-loads a multidimensional interpolation table generated through factory wind tunnel calibration into non-volatile memory. The flight controller reads the current average expected angular velocity of each rotor and, through table lookup and linear interpolation calculations, updates and extracts the n x 3 aerodynamic load difference matrix in real time.

[0103] S503: The flight controller establishes a linear disturbance observation model based on aerodynamic principles. This model assumes that the distribution of multi-rotor disturbance torque caused by the external wind field is a linear result of mapping the three-dimensional wind speed vector of the airframe through the aerodynamic load difference matrix. The operational logic of the above physical relationship satisfies the following formula:

[0104] in, The three-dimensional wind speed vector to be inverted is... Expressed as ,in, , , These represent the wind speed components along the roll, pitch, and yaw axes in the UAV's body coordinate system, respectively, with units of m / s.

[0105] S504: The flight controller solves the above linear observation equations through matrix operations to separate the three-dimensional wind speed vector. Since the total number of rotors (n) of a multi-rotor UAV is usually greater than or equal to 4, and there are only 3 unknown three-dimensional wind speed components, the above equations constitute an overdetermined system of linear equations. Direct inversion is not feasible; the flight controller uses the Moore-Penrose pseudo-inverse algorithm to obtain the optimal solution of this system of equations in the least squares sense. The operational logic of wind field inversion satisfies the following formula:

[0106] For the specific code implementation methods of matrix transpose, matrix multiplication, and low-dimensional matrix inversion in microcontrollers, those skilled in the art can use conventional numerical linear algebra libraries. The underlying computational logic is well-known in the field and will not be elaborated upon here. After the aforementioned pseudo-inverse calculation, the flight controller successfully converts the electrical disturbance residuals distributed at each rotor node into three-dimensional spatial wind speed values ​​with intuitive physical meaning. In typical wind-resistant control scenarios, the calculated single-axis wind speed components typically range from -20 m / s to 20 m / s. Calculation results exceeding this range are considered singular values ​​and discarded to prevent attitude control loop divergence.

[0107] After solving for the three-dimensional wind speed vector in the least-squares sense using the pseudo-inverse matrix, the flight controller needs to evaluate the reliability of the solution. Multirotor aircraft encounter non-uniform flow fields in complex environments, such as a single rotor entering a vortex, or uneven stress due to blade damage on one side. In such cases, forcibly equating it to a uniform three-dimensional wind field would introduce serious observation bias. To prevent the flight controller from making incorrect feedforward compensation actions based on erroneous observed wind speeds, the system introduces a fitting residual sum of squares and an adaptive confidence decay mechanism. The specific implementation process includes the following sub-steps: S505: The flight controller extracts the three-dimensional wind speed vector obtained from the aforementioned steps and performs a forward multiplication operation with the aerodynamic load difference matrix to reconstruct the expected reconstructed disturbance moment vector of the system under the action of the theoretical uniform wind field. .

[0108] The flight controller calculates the sum of squared fitting residuals of the entire system by subtracting the actual measured residual vector from the reconstructed residual vector. The operational logic satisfies the following formula:

[0109] The sum of squared residuals, as a scalar, quantifies the severity of the deviation of the current physical stress state from the theoretical model of a uniform wind field.

[0110] S506: The flight controller compares the calculated sum of squared fitted residuals with a pre-set residual tolerance threshold. A comparison is performed. This threshold is determined based on the drone's maximum takeoff weight and single-axis electric... The maximum output torque of the aircraft is calibrated. For a standard-sized multirotor aircraft, the residual tolerance threshold is set to a range of 0.05 (N). m) 2 Up to 0.5 (N) m) 2 between.

[0111] When the sum of squared residuals is less than or equal to the residual tolerance threshold, it indicates that the actual stress condition highly conforms to the uniform wind field model, and the confidence level of the derived three-dimensional wind speed is at a high level. At this point, the flight controller will reduce the confidence level by a certain factor. Set the full scale value to 1.0.

[0112] S507: When the flight controller detects that the sum of squared fitted residuals exceeds the residual tolerance threshold, it indicates the presence of unmodeled non-uniform aerodynamic disturbances or potential mechanical anomalies in the system. At this time, the flight controller triggers a confidence adaptive decay mechanism, dynamically reducing the confidence decay coefficient using an exponential decay function. The decay calculation logic for this lower-level feature satisfies the following formula:

[0113] in, This is the confidence decay factor, whose physical range is truncated to between 0 and 1.0, where e is a constant. The preset decay rate coefficient is used to adjust the sensitivity of confidence level decrease, and its value is usually set between 5 and 20. For the natural exponential function calculation implemented in the underlying code based on Taylor expansion or lookup table method, those skilled in the art can use conventional mathematical library functions to implement it. The numerical approximation calculation process is a well-known technique in the field and will not be elaborated upon here.

[0114] The S508 flight controller uses the calculated confidence attenuation coefficient to correct the amplitude of the original inverted three-dimensional wind speed vector, generating an effective wind field vector. The operational logic is as follows: .

[0115] Through the above mechanism, when the UAV is in a chaotic wind field environment, the confidence decay coefficient γ will rapidly approach 0, and the effective wind field vector will decay to zero. This allows the attitude control loop to automatically and smoothly exit the wind-based wind-resistant feedforward compensation and degrade to a conventional feedback control mode that relies on its own stiffness. This effectively avoids system divergence and flight accidents caused by distortion of the observation model. The corrected effective wind field vector will be used as the final disturbance observation data and output to the top-level wind-resistant controller.

[0116] In one exemplary embodiment of the present invention, after obtaining the effective wind field vector corrected for confidence level, the flight controller needs to convert the disturbance parameters of this environmental dimension into control commands that directly act on the underlying actuators. The core of feedforward control lies in generating a counteracting torque in advance, without waiting for the wind field to cause actual attitude deflection errors in the UAV. The specific implementation process includes the following sub-steps: S601: The flight controller retrieves the effective wind field vector for the current cycle from its processing memory. To achieve comprehensive compensation for the aircraft's spatial motion, the flight controller establishes the target physical quantity for feedforward compensation, i.e., the additional control commands required in the aircraft coordinate system. The system encapsulates these commands into a basic feedforward control vector. This vector contains four components: roll feedforward moment, pitch feedforward moment, yaw feedforward moment, and vertical feedforward thrust.

[0117] S602: The flight controller loads a pre-stored whole-aircraft aerodynamic drag mapping matrix. In real flight environments, the disturbance forces generated by wind on UAVs not only originate from the aerodynamic changes of the rotor system, but the main fuselage shell also generates wind resistance. The overall aerodynamic drag mapping matrix comprehensively describes the linear coupling relationship between three-dimensional wind speed in the airframe coordinate system and the torques of the three rotational degrees of freedom and the thrust of one translational degree of freedom of the entire aircraft.

[0118] The values ​​of the elements in this matrix are obtained through computational fluid dynamics simulations and wind tunnel testing before the UAV leaves the factory, and are used as constants during operation. The flight controller uses this matrix to perform a linear transformation on the effective wind field vector, and the calculation logic satisfies the following formula:

[0119] Since the effective wind field vector has already incorporated the confidence attenuation coefficient in the preceding steps, the basic feedforward control vector calculated here already includes the confidence dynamic weighting characteristic based on the fitting residual. When the stress environment is chaotic and the confidence approaches zero, each component of this basic feedforward control vector will automatically attenuate to near zero, avoiding the output of erroneous compensation torque.

[0120] S603: Considering the unavoidable static error between the theoretical aerodynamic model and the actual physical environment, and that directly injecting the full feedforward command into the control system would cause high-frequency oscillations, the flight controller introduces a feedforward scheduling gain matrix on top of the basic feedforward control vector. This is to adjust the compensation intensity of the feedforward channel.

[0121] Feedforward scheduling gain matrix It is a 4th-order diagonal matrix, with its main diagonal elements corresponding to the feedforward proportional coefficients for the roll, pitch, yaw, and vertical channels, respectively. To provide sufficient adjustment margin for conventional closed-loop feedback control while maintaining the system's stability boundary, the values ​​of the main diagonal elements are typically set between 0.4 and 0.8. If the UAV is currently in high-speed forward flight, due to the increased dynamic pressure caused by its own airspeed, the system will bias the feedforward proportional coefficients for the roll and pitch channels towards 0.4 to prevent overcompensation; in low-speed hovering and wind-resistant conditions, it will bias towards 0.8 to improve disturbance rejection sensitivity.

[0122] S604, the flight controller multiplies the feedforward scheduling gain matrix with the basic feedforward control vector to calculate the final dynamic weighted feedforward control vector. The operational logic is as follows:

[0123] The dynamically weighted feedforward control vector, after matrix scheduling and weighting processing, exhibits smoothness and safety in its numerical curve. This mechanism accurately translates the external wind field vector into the required compensation torque and thrust for the aircraft. Through dual constraints of confidence level and scheduling gain, it maximizes the wind resistance potential of the feedforward channel while ensuring absolute system stability. For the fixed-point computation and memory alignment optimization of matrix multiplication instructions in the control system, those skilled in the art can implement it using conventional embedded code optimization techniques. The underlying hardware acceleration logic is well-known in the field and will not be elaborated upon here.

[0124] After generating the dynamically weighted feedforward control vector, the flight controller needs to fuse it with the conventional feedback control channel and distribute the airframe-level control requirements to the various independent underlying actuators to complete the final output of closed-loop control. The specific implementation process includes the following sub-steps: S605, the flight controller extracts the feedback control vector of the current control cycle from the attitude control loop. The feedback control vector is calculated by the proportional-integral-derivative (PID) controller inside the flight controller based on the error between the UAV's current target attitude and the physical attitude measured by the actual sensors. The feedback control vector also includes four components in the body coordinate system: roll feedback torque, pitch feedback torque, yaw feedback torque, and vertical feedback thrust. The specific implementation of the error calculation and integral limiting of the PID controller can be achieved by those skilled in the art using conventional linear control theory; the control law calculation is a well-known technique in the field and will not be elaborated upon here.

[0125] In S606, the flight controller performs signal integration of the feedforward and feedback channels in the main arithmetic unit. The system performs vector addition on the dynamically weighted feedforward control vector and the feedback control vector obtained from the aforementioned calculations to generate a composite control vector acting on the UAV body. The integrated computation logic satisfies the following formula:

[0126] At the physical level, the feedback control vector is responsible for eliminating static attitude errors caused by model errors or internal system drift, while the dynamically weighted feedforward control vector injects the compensation commands needed to counteract disturbances before the external wind field actually changes the aircraft's attitude. The combination of the two gives the system the dual characteristics of rapid disturbance rejection and steady-state convergence.

[0127] S607, the flight controller retrieves the preset control allocation inverse matrix from its internal non-volatile memory. Its elements are determined by the arm length and rotor torque coefficient of the multi-rotor aircraft, and are treated as constant parameters during operation. The composite control vector at the airframe level is transformed into speed commands for each underlying motor. Because the four or more rotors of the UAV are arranged in a specific symmetrical spatial configuration, the total thrust and triaxial torque of the airframe are a linear superposition of the thrust and counter-torque generated by each rotor. The flight controller performs actuation allocation through matrix multiplication, calculating the square vector of the desired angular velocity of each rotor. The operational logic satisfies the following formula:

[0128] In this context, the internal elements of the squared vector of the desired angular velocity of each rotor represent the squared value of the target angular velocity of each rotor; the flight controller assigns the desired angular velocity squared vector to each rotor... Perform square root operations on each element to extract the desired angular velocity command for each rotor physical node. .

[0129] S608: Considering the physical speed limits of the underlying brushless motors and their drive circuits, directly issuing unrestricted angular velocity commands could cause motor step loss or overcurrent damage to the electronic speed controller. Before sending communication commands, the flight controller compares and limits the calculated final desired angular velocity commands for each rotor with safety thresholds. The flight controller sets idle speed thresholds and maximum safe speed thresholds. For multi-rotor aircraft with a typical takeoff weight of 2kg to 5kg, the idle speed threshold is set to 100rad / s to 150rad / s, and the maximum safe speed threshold is set to 800rad / s to 1200rad / s.

[0130] When the calculated desired rotor angular velocity command is lower than the idle speed threshold, the flight controller clamps its value to the idle speed threshold to prevent the rotor from stalling in the air. When the command is higher than the maximum safe speed threshold, the flight controller clamps its value to the maximum safe speed threshold to avoid exceeding the physical boundaries of the underlying power system. After the limiting process is completed, the flight controller encapsulates the final desired rotor angular velocity command for each rotor into a standard protocol data frame and sends it to the corresponding electronic speed controllers via the bus communication interface. Upon receiving the command, the electronic speed controller drives the underlying motors to operate, thereby generating aerodynamic torque in the physical world to resist external wind field interference. The above steps establish a complete data link from the extraction of electrical residuals to obtain the underlying composite control output, realizing closed-loop operation of the wind resistance compensation cycle.

[0131] Specific application examples: The application scenario is set as a quadcopter drone with a takeoff weight of 3kg performing a fixed-point hovering task. At that moment, the drone encountered a sudden gust of wind from the side. The system's preset factory constants include the motor torque constant. and the equivalent rotational inertia of the rotor system Before entering the gust zone, the flight controller determines that the variance meets the hovering condition and identifies the current rotor aerodynamic drag coefficient online using a recursive least squares method with a forgetting factor. Motor viscous friction coefficient = .

[0132] In hovering mode, the desired angular velocity command for a certain rotor is: Desired angular acceleration Based on the actuation current observer formula, the required desired quadrature-axis current is calculated in the forward direction:

[0133] The expected quadrature-axis current is 0.68A and its issued absolute timestamp. (i.e., 2.0s) is pushed into the local memory's circular buffer. Subsequently, the electronic speed controller transmits telemetry data back, which includes the actual quadrature-axis current due to the sudden increase in drag caused by gusts. Relative time offset The flight controller reconstructed the absolute physical acquisition time to be 2001500. .

[0134] After obtaining the absolute physical acquisition time, the flight controller utilizes By reverse traversal and interpolation matching within the circular buffer, the theoretically synchronized expected quadrature-axis current with strict alignment is derived. By performing differential stripping, the residual actuation current was calculated to be... Next, the residual in the electrical dimension is linearly mapped to the single-rotor disturbance force residual in the mechanical dimension using the torque constant, and the results are calculated. .

[0135] Subsequently, the system iterates through and summarizes the disturbance residuals of the four rotors to form the disturbance torque residual vector. Combined with the preset aerodynamic load difference matrix Find the result through pseudo-inverse operation Inversely derive the three-dimensional wind speed vector (This indicates that the lateral wind speed in the axial direction is dominant, approximately 4.8 m / s). At this point, the calculated sum of squared fitted residuals... =0.02, which is less than the set residual limit threshold of 0.1, so the current wind field is determined to be a uniform wind field. The confidence attenuation coefficient is set to 1.0, and an effective wind vector is generated. .

[0136] Finally, the system introduces a feedforward scheduling gain matrix (with diagonal elements set to 0.6) and an aerodynamic drag mapping matrix to generate a dynamically weighted feedforward control vector. The roll compensation torque in this vector is directly added to and fused with the feedback control vector of the attitude control loop, enabling the system to detect wind disturbances through the surge in underlying current before the UAV tilts severely, and to apply counter-torque to the actuators in advance, thus completing the end-to-end wind-resistant adaptive closed-loop control.

[0137] To verify the effectiveness of the wind-resistant adaptive control method for UAVs based on real-time environmental perception proposed in this invention, a wind interference test was conducted in a standard wind tunnel environment. The test subject was a multi-rotor aircraft with a takeoff weight of 3 kg equipped with the control algorithm of this invention, and the initial operating condition was fixed-point hovering in a windless environment. During the test... Instantly, the wind tunnel opened, applying a lateral step gust of approximately 5.0 m / s to the drone.

[0138] See attached document Figure 4(a) During the period 0–2.0 s, the actual physical wind speed and the wind speed retrieved by the algorithm both completely coincide at 0 m / s. At that moment, the actual physical wind speed experienced a step jump, instantly rising and then fluctuating around 5.0 m / s. At this point, the algorithm-derived wind speed did not show an absolute right-angle step jump, but rather... It began to rise rapidly and smoothly. Around... At that time, the algorithm inverted the wind speed value to 5.0 m / s, achieving a high degree of overlap with the actual physical wind speed and maintaining stable tracking.

[0139] exist Previously, in a windless steady state, the actuation current residual was zero, therefore the inverted wind speed was zero. When When a gust of wind first blows in, the drone has not yet made any significant displacement due to inertia, but the aerodynamic drag on the rotor's windward side increases sharply, causing a surge in the actual quadrature-axis current of the motor. The flight controller quickly identifies the current residual through absolute timestamp matching.

[0140] The reason the inversion curve rises smoothly rather than abruptly changes direction is that, when mapping the current residual from the electrical dimension to mechanical parameters, a digital low-pass filter with a cutoff frequency of 5Hz-20Hz is introduced to filter out the high-frequency inverter switching noise of the electronic speed controller. The inherent delay characteristics of this filter cause the inverted wind speed to show a transition period of approximately 0.5s (i.e.,...) The result converges to the actual wind force, ensuring accurate overlap of the final inversion result and avoiding erroneous feedforward compensation induced by sudden high-frequency electrical noise.

[0141] See attached document Figure 4 (b) During the 0–2.0 s period, the roll angle error of both control methods remained stable at 0°. After the gust of wind cut in, the error curve of the conventional feedback control rose rapidly. The deviation peaked at approximately 11° to the left and right, followed by damped oscillations (in... Fall to approximately 6°, at (rebound to about 3°), until It only decays to the 0° coincidence line later.

[0142] In comparison, the adaptive control error curve of this invention is... After that, only a slight increase occurred. It reached a tiny peak of only about 1.5°, then quickly fell back. It had already converged to 0°, aligned with the horizontal axis and remained stable throughout the process, with no obvious oscillations.

[0143] Conventional feedback control relies entirely on the inertial measurement unit (IMU). Only when the wind has blown the drone off course, resulting in a large attitude angle error (e.g., reaching 11°), does the proportional and integral PID controller... Sufficient restoring torque is accumulated only through the accumulation of individual components. The oscillation decay process is due to the inherent hysteresis of the integral term's desaturation. The control method of this invention... When encountering windy conditions, the flight controller can detect external load anomalies through the residual current of the motors without waiting for the aircraft to physically tilt. For example... Figure 4 As shown in (a), as the inverted wind speed increases, the system generates a dynamic weighted feedforward control vector using the whole-aircraft aerodynamic drag mapping matrix and merges it with the feedback channel. This feedforward torque cancels out the fuselage attitude offset before the offset, thus forcibly suppressing the original 11° deviation to within 1.5°. The adaptive error curve returns to zero at any given time, which corresponds to... Figure 4 (a) shows the moment when the inverted wind speed coincides with the actual wind speed, proving that the feedforward compensation torque has offset the exogenous load brought by the gust, demonstrating the anti-disturbance capability of this scheme under complex wind fields.

[0144] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A wind-resistant adaptive control method for unmanned aerial vehicles (UAVs) based on real-time environmental perception, characterized in that, include: Obtain the desired rotational speed command of the current UAV, send the desired rotational speed command to the electronic speed controller and record the absolute timestamp, and simultaneously obtain the actual quadrature axis current and the corresponding absolute physical acquisition time; Based on the actual cross-axis current, an actual cross-axis current sequence is constructed, and the actual cross-axis current sequence is extracted to identify and update the rotor aerodynamic drag coefficient and the motor viscous friction coefficient. The desired cross-axis current is obtained based on the rotor aerodynamic drag coefficient and the motor viscous friction coefficient, and a time-domain reference sequence is constructed based on the absolute timestamp and the desired cross-axis current. Based on the absolute physical acquisition time, the synchronous expected cross-axis current is derived in the time-domain reference sequence. The actuation current residual is calculated by subtracting the synchronous expected cross-axis current from the actual cross-axis current, and then mapped to the single rotor disturbance torque residual. The confidence attenuation coefficient is generated by inverting the three-dimensional wind speed vector in the body coordinate system using the residual inversion of the single rotor disturbance torque. Based on the confidence attenuation coefficient, the amplitude of the three-dimensional wind speed vector is corrected to generate an effective wind field vector. Based on the effective wind field vector, a dynamic weighted feedforward control vector is calculated. The dynamic weighted feedforward control vector is then fused with the feedback control vector output by the attitude control loop to generate a composite control vector, which is then solved into a desired angular velocity command. Based on the desired angular velocity command, wind-resistant adaptive control is completed.

2. The wind-resistant adaptive control method for unmanned aerial vehicles based on real-time environmental perception according to claim 1, characterized in that, The acquisition of the actual quadrature-axis current and the corresponding absolute physical acquisition time includes: Obtain the desired rotational speed command for each rotor node and construct a downlink communication data frame containing the desired rotational speed command. Use a hardware timer to monitor the status latch count value of the communication sending peripheral port register as an absolute timestamp. The external interrupt service routine is triggered by capturing the start bit level edge of the downlink communication data frame to mark the arrival of the instruction. The local hardware timer count value is extracted at the moment when the actual quadrature axis current is collected, and the difference between the count value and the moment when the instruction arrives is calculated to obtain the relative time offset. The relative time offset is converted into a uniform unit of absolute time span and added to the absolute timestamp to reconstruct the absolute physical acquisition time.

3. The wind-resistant adaptive control method for unmanned aerial vehicles based on real-time environmental perception according to claim 1, characterized in that, It also includes steps for determining whether a vehicle has entered a steady-state hovering condition, including: The sensor's historical data is cached by constructing a data sliding window, and the magnitude sequences of the three-axis angular velocity vectors and the magnitude sequences of the three-axis linear acceleration vectors within the data sliding window are extracted to obtain the variance of the attitude angle change rate and the variance of the linear acceleration. When the variance of the attitude angle change rate is less than the angular velocity variance threshold and the variance of the linear acceleration is less than the linear acceleration variance threshold, it is determined that the steady-state hovering condition has been entered and the online parameter identification and update process is allowed to be triggered.

4. The UAV wind-resistant adaptive control method based on real-time environmental perception according to claim 1, characterized in that, The updated rotor aerodynamic drag coefficient and motor viscous friction coefficient include: The mean value of the expected angular velocity of the rotor and the mean value of the actual cross-axis current within the sliding window of the data are calculated. A steady-state dynamic balance model is constructed, which consists of the electromagnetic torque generated by the motor, the aerodynamic drag torque of the rotor, and the mechanical friction torque of the motor rotor shaft system. The steady-state dynamic balance model is transformed into a standard linear regression form to encapsulate the system output variables and data observation vectors. The recursive least squares algorithm module with forgetting factor is then called to iteratively update the rotor aerodynamic drag coefficient and the motor viscous friction coefficient.

5. The wind-resistant adaptive control method for unmanned aerial vehicles based on real-time environmental perception according to claim 1, characterized in that, The time-domain reference sequence constructed based on absolute timestamps and desired quadrature-axis currents includes: Calculate the desired angular acceleration, and then calculate the desired quadrature-axis current based on the desired angular acceleration, the motor torque constant, and the equivalent moment of inertia of the rotor system. A circular buffer is initialized by allocating a contiguous address space, and the total number of data nodes in the circular buffer is determined based on the maximum round-trip delay of the communication link and the discrete sampling period of the control loop. The absolute timestamp and the desired cross-axis current are written to the circular buffer in pairs using a memory write pointer to construct a time-domain reference sequence.

6. The wind-resistant adaptive control method for unmanned aerial vehicles based on real-time environmental perception according to claim 1, characterized in that, The method of deriving the synchronous desired quadrature-axis current based on the absolute physical acquisition time in the time-domain reference sequence includes: Using the absolute physical acquisition time as the search keyword, a reverse traversal is performed within the time domain reference sequence to find two adjacent historical absolute timestamps and their corresponding expected cross-axis currents that are immediately before and after the absolute physical acquisition time in the time dimension. The synchronous desired quadrature-axis current is calculated by linear interpolation using two adjacent points before and after the current. The mapping to the single-rotor disturbance torque residual includes: The motor torque constant is extracted as a proportional gain for linear transformation. The actuation current residual is mapped to the single rotor disturbance torque residual. The single rotor disturbance torque residual is then input into a digital low-pass filter for smoothing and noise reduction.

7. The wind-resistant adaptive control method for unmanned aerial vehicles based on real-time environmental perception according to claim 1, characterized in that, The three-dimensional wind speed vector in the inverted machine coordinate system includes: Traverse the single rotor disturbance torque residuals arranged in order of rotor physical space numbering to construct the disturbance torque residual vector; The sensitivity of the additional drag torque generated by the three-dimensional spatial wind field in the body coordinate system to the independent rotor is loaded, the aerodynamic load difference matrix is ​​mapped, and an overdetermined linear equation system characterizing the mapping relationship between endogenous and exogenous loads is established. The overdetermined linear equations were solved using the Moore-Penrose pseudo-inverse algorithm, and the three-dimensional wind speed vector in the body coordinate system was obtained by inverse calculation.

8. The wind-resistant adaptive control method for unmanned aerial vehicles based on real-time environmental perception according to claim 1, characterized in that, The generated confidence decay coefficient includes: The three-dimensional wind speed vector and the aerodynamic load difference matrix are multiplied in the forward direction to reconstruct the expected reconstructed disturbance moment vector. The actual measured disturbance moment residual vector is subtracted from the reconstructed disturbance moment vector to calculate the sum of squared fitting residuals. When the sum of squared fitted residuals does not exceed the residual tolerance threshold, the confidence decay coefficient is set to the maximum value. When the sum of squared fitted residuals exceeds the residual tolerance threshold, the confidence adaptive decay mechanism is triggered to dynamically reduce the confidence decay coefficient value through an exponential decay function.

9. The wind-resistant adaptive control method for unmanned aerial vehicles based on real-time environmental perception according to claim 1, characterized in that, The calculation of the dynamically weighted feedforward control vector includes: Obtain the aerodynamic drag mapping matrix of the whole machine, and perform a linear transformation on the effective wind field vector based on the aerodynamic drag mapping matrix of the whole machine to generate the basic feedforward control vector; The dynamic weighted feedforward control vector is calculated by multiplying the basic feedforward control vector using the feedforward scheduling gain matrix.

10. The wind-resistant adaptive control method for unmanned aerial vehicles based on real-time environmental perception according to claim 1, characterized in that, The solution is a desired angular velocity command, and the wind-resistant adaptive control is performed based on the desired angular velocity command, including: Obtain the preset control allocation inverse matrix, perform actuation allocation calculation for the square vector of the desired angular velocity of each rotor through matrix multiplication, and extract the square root operation result; The square root result is compared with the idle speed threshold and the maximum safe speed threshold to limit the amplitude, and the desired angular velocity command is generated. The desired angular velocity command is sent to the electronic speed controller to execute the underlying drive and complete the wind-resistant adaptive control.