Stability control method and system for water conservancy monitoring unmanned aerial vehicles
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]为了解决现有技术的环境扰动适应性不足、飞行趋势利用不充分、控制规则匹配滞后以及控制指令易高频振荡的问题,本发明提出一种水利监控无人飞行器稳定性控制方法及系统
[0007]本发明通过构建状态控制映射空间并进行密度聚类,将控制规则划分为多个规则子簇;结合连续多个时刻的姿态数据计算飞行趋势预测向量,以匹配与当前飞行状态变化更接近的目标规则子簇。根据向量差异度确定目标规则子簇的激活权重,并结合基于环境扰动强度调整的偏离阈值,对偏离平均中心的异常初步控制指令进行筛除,再对保留指令加权融合生成初始飞行控制指令。通过符号反转频率监测控制指令振荡情况,并在指令变化超出稳定裕度时进行边界投影处理,从而减少高频抖动和指令突变,提升无人飞行器在水利巡检环境中的飞行平稳性和控制稳定性。
Smart Images

Figure CN122569449A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of control, and in particular relates to a stability control method and system for a water conservancy monitoring unmanned aerial vehicle. Background Technology
[0002] In actual operation, unmanned aerial vehicles (UAVs) are typically located in low-altitude atmospheric environments, making them susceptible to external disturbances such as gusts, shear airflow, and complex terrain airflow, which can lead to attitude deviations, trajectory fluctuations, or changes in spatial position. Most existing UAVs rely primarily on pre-set static control rule bases or conventional feedback control algorithms for attitude adjustment. Their control strategies are usually based on the current instantaneous state, lacking sufficient awareness of the dynamic mapping relationship between environmental characteristics and flight status. When UAVs face sudden disturbances, rapid changes in wind fields, or switching between inspection modes, traditional control systems struggle to adaptively reorganize and match control rules based on real-time environmental conditions, resulting in lag and insufficient adaptability in control response.
[0003] Furthermore, the spatial attitude evolution of unmanned aerial vehicles (UAVs) exhibits significant temporal correlation and trends. Relying solely on feedback adjustments based on the current state makes it difficult to fully utilize the flight change trends reflected in continuous historical attitude data. Under conditions of multiple disturbances or abrupt changes in flight conditions, without mechanisms for filtering, fusing, and smoothing constraints on underlying control commands, the generated control commands are prone to abnormal jumps, even frequently outputting adjustment signals of opposite polarity within a short period, causing high-frequency oscillations in the actuators. Continuous oscillations not only increase energy consumption and mechanical wear but may also reduce the stability margin of the closed-loop control system, affecting the stable flight of the UAV. Therefore, how to construct a UAV stability control method capable of sensing flight trends, matching appropriate control rules, and suppressing high-frequency oscillations in control commands has become an urgent technical problem to be solved. Summary of the Invention
[0004] To address the problems of insufficient adaptability to environmental disturbances, inadequate utilization of flight trends, lagging control rule matching, and high-frequency oscillation of control commands in existing technologies, this invention proposes a stability control method and system for water conservancy monitoring unmanned aerial vehicles.
[0005] In a first aspect, the present invention proposes a stability control method for a water conservancy monitoring unmanned aerial vehicle, comprising: Acquire the flight attitude data, position data, and airborne environmental sensor data of the unmanned aerial vehicle at the current moment; based on the control output results of the preset control rule base and the environmental state features extracted from the airborne environmental sensor data, construct a state control mapping space and perform density clustering to divide it into several rule sub-clusters; Based on flight attitude data from current and past consecutive moments, a predicted attitude vector for the next short period is calculated, and a flight trend prediction vector is generated based on the predicted attitude vector and the expected attitude vector. The two target rule subclusters that are closest to the flight trend prediction vector are matched, and their respective activation weights are determined based on the vector difference. For the target rule sub-cluster, the dispersion between the initial control commands of each rule is calculated, and initial control commands that deviate from the average center by more than a deviation threshold are excluded. The deviation threshold is adjusted based on the intensity of environmental disturbance. The control commands of the target rule sub-cluster after excluding deviation commands are fused according to the activation weight to generate an initial flight control command. The sign inversion frequency of the initial flight control command is calculated by combining the historical control command time series. When the sign inversion frequency is higher than the set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, the difference vector is projected onto the stability margin boundary to generate a control command.
[0006] On the other hand, the present invention also proposes a stability control system for a water conservancy monitoring unmanned aerial vehicle, comprising: The partitioning module is used to acquire the flight attitude data, position data, and airborne environmental sensor data of the unmanned aerial vehicle at the current moment; based on the control output results of the preset control rule base and the environmental state features extracted from the airborne environmental sensor data, a state control mapping space is constructed and density clustering is performed to divide it into several rule sub-clusters; The determination module is used to calculate the predicted attitude vector for a short period of time in the future based on the flight attitude data of the current and multiple consecutive moments in the past, and to generate a flight trend prediction vector based on the predicted attitude vector and the expected attitude vector; and to match the two target rule subclusters that are closest to the flight trend prediction vector and determine their respective activation weights based on the vector difference. The control module is used to calculate the dispersion between the initial control commands of each rule for the target rule sub-cluster, exclude initial control commands that deviate from the average center by more than a deviation threshold, the deviation threshold being adjusted based on the intensity of environmental disturbance; fuse the control commands of the target rule sub-cluster after excluding deviation commands according to the activation weight to generate an initial flight control command; calculate the sign inversion frequency of the initial flight control command by combining the historical control command time series; when the sign inversion frequency is higher than a set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, project the difference vector onto the stability margin boundary to generate a control command.
[0007] This invention constructs a state control mapping space and performs density clustering to divide control rules into multiple rule subclusters. It then calculates flight trend prediction vectors using attitude data from multiple consecutive time points to match target rule subclusters that more closely resemble the current flight state changes. The activation weights of the target rule subclusters are determined based on vector dissimilarity, and an abnormal initial control command deviating from the mean center is filtered out using a deviation threshold adjusted based on environmental disturbance intensity. The remaining commands are then weighted and fused to generate initial flight control commands. The invention monitors control command oscillations by using sign inversion frequency and performs boundary projection processing when command changes exceed the stability margin, thereby reducing high-frequency jitter and command abrupt changes and improving the flight stability and control stability of the unmanned aerial vehicle in a water conservancy inspection environment. Attached Figure Description
[0008] Figure 1 A flowchart of the first embodiment; Figure 2 A schematic diagram of the DBSCAN density clustering distribution in the state control mapping space; Figure 3 This is a schematic diagram of flight trend prediction over a very short time period based on weighted least squares method and Taylor expansion; Figure 4 This is a schematic diagram of the deviation threshold removal mechanism based on wind speed disturbance variance. Detailed Implementation
[0009] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0010] In the first embodiment, the present invention proposes a stability control method for a water conservancy monitoring unmanned aerial vehicle, such as... Figure 1 As shown, it includes: S1 acquires the current flight attitude data, position data, and onboard environmental sensor data of the unmanned aerial vehicle.
[0011] The unmanned aerial vehicle (UAV) is used for low-altitude inspection and monitoring of reservoirs, rivers, dams, sluice gates, pumping stations, or water conveyance channels. Euler angles and angular velocities are acquired via inertial measurement unit (IMU) sensors to provide current flight attitude data. Latitude, longitude, and altitude are acquired via a GPS receiver and barometer to provide location data, which is used to determine the current inspection segment, altitude range, or low-altitude flight condition near water. Wind speed, wind direction, and obstacle distance are acquired via anemometers and lidar to provide onboard environmental sensor data, with obstacle distance used to characterize obstacle avoidance disturbances in the inspection environment. The data acquisition process is completed by calling the sensor message data packet interface in the Robot Operating System (ROS).
[0012] S2, based on the control output results of the preset control rule base and the environmental state features extracted from the airborne environmental sensor data, construct a state control mapping space and perform density clustering to divide it into several rule sub-clusters.
[0013] The principal component analysis (PCA) algorithm is called to extract environmental state features by dimensionality reduction of wind speed and wind direction. The three-dimensional control adjustment quantity output by the preset fuzzy logic control rule library and the extracted environmental state features are then dimensionless and concatenated into a multi-dimensional feature vector to form a state control mapping space.
[0014] The DBSCAN density-based spatial clustering algorithm with noise is invoked. The neighborhood radius and minimum number of contained points are set. The Euclidean distance between each dimensionless feature vector is calculated to perform density clustering, dividing the high-density region into several independent regular sub-clusters.
[0015] In an optional embodiment, the control output results based on the preset control rule base and the environmental state features extracted from the airborne environmental sensor data are used to construct a state control mapping space for density clustering, dividing it into several rule sub-clusters, including: The three-dimensional wind speed component in the airborne environmental sensor data is extracted as an environmental state feature. Based on preset wind speed scale benchmarks and preset control adjustment scale benchmarks, the three-dimensional control adjustment vectors corresponding to each rule in the environmental state characteristics and preset control rule base are processed to be dimensionless. The dimensionless environmental state features are concatenated with the dimensionless three-dimensional control adjustment vector to generate feature data points in the mapping space. A density-based spatial clustering algorithm is used to calculate the local density of each feature data point with a preset Euclidean distance as the search radius. Data points with local density greater than the density threshold are taken as core points, and connected core points and their neighboring points are grouped into the same rule sub-cluster, and the central feature vector of each rule sub-cluster is updated.
[0016] The three-dimensional wind speed components in the X, Y, and Z axes are extracted using an airborne pitot tube and a multi-directional anemometer at a sampling frequency of 50 Hz. ,in The preferred measurement range is -15m / s to 15m / s.
[0017] This environmental state characteristic The three-dimensional control adjustment vector obtained by mapping with a single rule in the preset control rule base Dimensionless processing was performed separately to obtain dimensionless wind speed characteristics. and dimensionless control adjustment vector Wherein, the three-dimensional control adjustment vector represents the equivalent control torque adjustment of the roll, pitch, and yaw channels. The parameter corresponds to the adjustment of the control torque of the roll channel, and its preferred range is -2.0 N·m to 2.0 N·m. and By concatenating and splicing the data, feature data points in a six-dimensional state control mapping space are generated.
[0018] The DBSCAN algorithm is used, with the search radius ε preferably set to 0.85. The number of points in the ε-neighborhood of each feature data point is calculated in the dimensionless six-dimensional space, which is used as the local density. When local density When the density threshold MinPts is greater than or equal to the density threshold, preferably 8, the data point is marked as a core point.
[0019] By utilizing the density reachability between core points, interconnected core points and all non-core points located in their ε-neighborhoods are merged and classified into the same rule sub-cluster.
[0020] After performing clustering every 200ms, the arithmetic mean of all feature data points belonging to the k-th regular sub-cluster is calculated in six dimensions to generate a new six-dimensional central feature vector, thus updating the cluster centers and the control rule mapping space. After reducing the six-dimensional mapping space to a two-dimensional plane using principal component analysis for visualization, the partitioning effect of the density clustering is as follows: Figure 2 As shown.
[0021] S3. Based on the flight attitude data of the current and past consecutive moments, calculate the predicted attitude vector for the next short period of time, and generate a flight trend prediction vector based on the predicted attitude vector and the expected attitude vector.
[0022] The pitch, roll, and yaw angle time series of the past ten consecutive sampling periods are extracted, and the time series are processed by a Long Short-Term Memory (LSTM) network model. The flight attitude data for the next moment is predicted and output. The predicted flight attitude data is used as the predicted attitude vector, and the predicted attitude deviation vector is calculated based on the expected attitude vector.
[0023] In an optional embodiment, the step of calculating a predicted attitude vector for a short future period based on flight attitude data from the current and multiple consecutive past moments, and generating a flight trend prediction vector based on the predicted attitude vector and the desired attitude vector, includes: Extract the roll angle, pitch angle, and yaw angle data for the current moment and the past M consecutive sampling periods to construct a historical attitude time series; The attitude angle data at adjacent sampling times in the historical attitude time series are subtracted and divided by the corresponding sampling period to obtain the angular velocity vector between each sampling period. The angular velocity vector is fitted using the weighted least squares method to obtain the first and second derivatives of the attitude change. Based on the second-order Taylor expansion formula, the predicted attitude vector for the next short period of time is generated. The desired attitude vector is determined based on the inspection route or attitude control target, and the predicted attitude deviation vector is generated from the difference between the desired attitude vector and the predicted attitude vector. The predicted attitude deviation vector is used as the flight trend prediction vector.
[0024] Extract the current time from the airborne inertial measurement unit (IMU). And the three-dimensional attitude angle data and roll angle from the past M=10 consecutive sampling periods. Pitch angle θ, yaw angle ψ, sampling period The preferred value is 0.01s, thus constructing a historical attitude time series containing 11 time points. ,in .
[0025] Perform a first-order backward difference operation on the attitude angle data of adjacent nodes in the time series, and divide the attitude angle difference by the sampling period. A discrete angular velocity vector sequence containing 10 elements is generated. The weighted least squares method is used to fit this angular velocity vector sequence using a quadratic polynomial, where the weights of time nodes closer to the current moment are increased. A weight reduction factor of 0.8 is preferably set to be used to calculate the first derivative of the attitude change at the current moment, the instantaneous angular velocity, ranging from approximately -3.14 to 3.14 rad / s, and the second derivative, the instantaneous angular acceleration, ranging from approximately -10.0 to 10.0 rad / s².
[0026] The preset prediction time Δt is set to 0.1s, and calculations are performed using the second-order Taylor expansion formula. The basic angle values of roll, pitch, and yaw are fused and superimposed with linear and nonlinear variation components to output a comprehensive vector containing the three-dimensional predicted angles at the final state 0.1s in the future. This serves as the predicted attitude vector; the desired attitude vector is determined based on the inspection route or attitude control target. And calculate the predicted attitude deviation vector. The predicted attitude deviation vector is used to subsequently generate the predictive control demand vector. Taking a single channel for pitch angle as an example, the flight attitude prediction effect over a very short time period based on weighted least squares fitting and Taylor expansion is as follows: Figure 3 As shown.
[0027] S4, match the two target rule subclusters that are closest to the flight trend prediction vector, and determine their respective activation weights based on the vector difference.
[0028] A predictive control demand vector is generated based on the predicted attitude deviation vector, and the predictive control demand vector is made dimensionless. The cosine similarity between the dimensionless predictive control demand vector and the dimensionless control adjustment component in the center vector of all rule subclusters is calculated. A comprehensive evaluation index is constructed by combining the absolute error of the modulus, and the two target rule subclusters with the highest comprehensive evaluation index scores are selected.
[0029] The Euclidean distance between the dimensionless predictive control demand vector and the dimensionless control adjustment component in the center vectors of the two target rule subclusters is calculated as the vector difference degree. The inverse of the distance is converted into a normalized activation weight, so that the target rule subclusters with smaller differences obtain larger activation weights.
[0030] In an optional embodiment, the matching of the two target rule subclusters closest to the flight trend prediction vector, and the determination of their respective activation weights based on vector dissimilarity, includes: The predicted attitude deviation vector, which serves as the flight trend prediction vector, is multiplied by a preset control gain matrix to obtain the corresponding predicted control demand vector. The predictive control demand vector is dimensionless based on the preset control adjustment scale benchmark to obtain a dimensionless predictive control demand vector. Calculate the cosine similarity and absolute magnitude error between the dimensionless predictive control demand vector and the dimensionless three-dimensional control adjustment components in the feature vectors of all regular subclusters; A comprehensive evaluation index is constructed based on the cosine similarity and the absolute error of the modulus. Each rule sub-cluster is ranked, and the two rule sub-clusters with the highest scores are selected as the target rule sub-clusters. Calculate the Euclidean distance between the dimensionless predictive control demand vector and the dimensionless three-dimensional control adjustment components in the central feature vectors of the two target rule subclusters; The reciprocal of the Euclidean distance is normalized, and the normalized value is used as the activation weight of each of the two target rule subclusters.
[0031] The predicted attitude deviation vector calculated by S3 With a preset control gain matrix of dimension 3×3 Perform matrix multiplication to obtain a three-dimensional predictive control demand vector. .in The preferred main diagonal elements are roll gain. =2.5, Pitch Gain =2.5, yaw gain =1.8, all off-diagonal elements are 0, because Defined as the desired attitude vector minus the predicted attitude vector, the diagonal gain matrix can be used to form a feedback adjustment direction towards the desired attitude. This mapping generates a three-dimensional predictive control demand vector. .
[0032] Based on the preset control adjustment scale benchmark, the predicted control demand vector Dimensionless processing is performed to obtain the dimensionless predictive control demand vector. For all N updated rule subclusters, extract the three-dimensional components of the central feature vector of each subcluster to form a dimensionless central control vector. Calculate its relationship with The cosine similarity is calculated, with a value range of [-1, 1]. The absolute error of the magnitude of the two vectors, ΔL, is also calculated.
[0033] By constructing comprehensive evaluation indicators The weight parameters The preferred value is 0.7. The optimal value is 0.3. All subclusters are sorted in descending order of their index scores, and the two highest-scoring rule subclusters are selected as target rule subclusters. If there are at least two valid rule subclusters, the two highest-scoring rule subclusters are selected as target rule subclusters. If there is only one valid rule subcluster, that subcluster is used as the sole target rule subcluster and its activation weight is set to 1. If no valid rule subcluster is formed, one or more control rules from the preset control rule library that are closest to the dimensionless predictive control demand vector are used to form a temporary target rule subcluster or candidate control instructions are directly generated.
[0034] For the two selected target rule subclusters, calculate the three-dimensional Euclidean distance between the dimensionless predictive control demand vector and the dimensionless central control vector of each subcluster. Add each Euclidean distance to a preset minimum positive constant and take the reciprocal to obtain the reciprocal distance values for the two target rule subclusters. Normalize these two reciprocal distance values to obtain the first and second activation weights, ensuring the sum of the two activation weights is 1, and assigning a larger activation weight to the target rule subcluster with the smaller distance. When only one target rule subcluster exists, set its activation weight to 1 and skip the normalization weight allocation process between the two subclusters.
[0035] S5, for the target rule sub-cluster, calculate the dispersion between the initial control commands of each rule, and exclude the initial control commands that deviate from the average center by more than the deviation threshold, the deviation threshold being adjusted based on the intensity of environmental disturbance.
[0036] For the selected target rule sub-cluster, the average center of the preliminary control commands within the cluster is calculated, and the deviation distance of each preliminary control command relative to the average center is calculated. The deviation distance is used as the dispersion of the corresponding preliminary control command. The environmental disturbance intensity is calculated based on the wind speed fluctuation variance collected by the anemometer. After converting the wind speed fluctuation variance into a dimensionless environmental disturbance intensity coefficient, a preset basic deviation threshold is multiplied by a gain coefficient based on the environmental disturbance intensity to obtain the deviation threshold.
[0037] Calculate the deviation distance of each preliminary control command from the average center of the sub-cluster, compare the deviation distance with the deviation threshold, and remove the corresponding preliminary control command from the rule sub-cluster if the deviation distance is greater than the deviation threshold.
[0038] In an optional embodiment, for the target rule sub-cluster, the dispersion between the initial control commands of each rule is calculated, and initial control commands that deviate from the average center by more than a deviation threshold are excluded. The deviation threshold is adjusted based on the intensity of environmental disturbance, including: Calculate the vector sum of the initial control instructions of all rules within the target rule sub-cluster, and divide by the total number of rules to obtain the initial average center vector; Calculate the root mean square error between the initial control command of each rule and the initial average center vector, and use it as the dispersion. The wind speed variance is extracted from the airborne environmental sensor data, and the wind speed variance is dimensionless based on a preset wind speed variance benchmark to obtain the environmental disturbance intensity coefficient. Multiply the base threshold by the sum of the environmental disturbance intensity coefficient and the preset positive constant to obtain the deviation threshold consistent with the discrete metric. The dispersion of each rule is compared with the deviation threshold, and preliminary control instructions with dispersion greater than the deviation threshold are removed.
[0039] For the selected target rule sub-cluster, for example, containing P=15 activation rules, generate a three-dimensional preliminary control command vector for each rule within the sub-cluster, dimension by dimension. Perform vector summation, then multiply by the coefficient 1 / P to obtain the preliminary average center vector. .
[0040] For the i-th preliminary control command, calculate the square root of the arithmetic mean of the sum of the squares of the differences between the command and the center vector on the three components, and then calculate the root mean square error. Therefore As a scalar parameter representing the dispersion of a single instruction distribution, its value typically ranges from 0.01 to 0.5.
[0041] Extract the wind speed sequence sampled continuously at 50Hz within the most recent 2-second time window, and calculate the statistical variance of the total wind speed modulus. The intensity of external environmental disturbances is expressed quantitatively. A preset wind speed variance benchmark is set. Wind speed variance Divide by The dimensionless environmental disturbance intensity coefficient was obtained. Set a fixed baseline deviation threshold. The preferred value is 0.15, and the preset positive constant λ is preferably taken as 1.0, according to the formula. Real-time calculation of deviation thresholds. For example, when encountering moderate gusts of wind... =0.5(m / s) 2 and =1.0(m / s) 2 hour, =0.5, the deviation threshold is adjusted to 0.225 to adapt to control command fluctuations under large external disturbances.
[0042] Iterate through the 15 rules in the target sub-cluster, and if the discreteness of a certain rule is... Exceeding real-time calculations If the deviation is due to a sudden strong external disturbance, it is identified as a stray spurious control variable and removed, while control commands with internal consensus are retained. On the two-dimensional plane formed by the roll and pitch control moments, the effect of removing stray commands based on the deviation threshold using wind speed disturbance variance is as follows: Figure 4 As shown.
[0043] S6, the control commands of the target rule sub-cluster after excluding deviation commands are fused according to the activation weight to generate initial flight control commands.
[0044] The arithmetic mean of the remaining preliminary control commands within each target rule sub-cluster is calculated to obtain the representative control command for each target rule sub-cluster. Two representative control commands are then multiplied by their corresponding activation weights using scalar multiplication. The products are summed to complete a weighted fusion operation, generating initial flight control commands that include roll, pitch, and yaw channel control torque components. Before being issued to the motor actuators, these initial flight control commands can be further converted by the inner loop controller into the desired rotor speed increments.
[0045] In an optional embodiment, the step of fusing the control commands of the target rule subcluster after excluding deviation commands according to the activation weights to generate initial flight control commands includes: For each target rule subcluster, calculate the arithmetic mean vector of the retained preliminary control commands, which serves as the subcluster-level control command; Extract the sub-cluster level control instructions corresponding to the two target rule sub-clusters, and perform scalar multiplication operations with the corresponding activation weights respectively; Add the results of the two multiplication operations to obtain the weighted and fused three-dimensional control torque vector; The amplitude of the three-dimensional control torque vector is saturated and limited, and the limited vector is used as the initial flight control command.
[0046] The remaining target rule subclusters after dispersion filtering Assuming to retain Rules, and Assuming to retain This rule will Internally reserved Each initial control command is summed and divided by three independent dimensions. Output the first sub-cluster level three-dimensional control command vector Similarly, for The reserved instructions within perform an arithmetic average operation, outputting a second sub-cluster level three-dimensional control command vector. When only one target rule subcluster exists, the subcluster-level 3D control commands of that target rule subcluster are directly used as the weighted fusion result.
[0047] instruction vector With the pre-calculated first activation weight For example, multiplying by 0.65 results in an instruction vector. With the second activation weight For example, multiplying by 0.35. After performing this scalar scaling multiplication, the two resulting scaled vectors are added together to synthesize a weighted fused three-dimensional control torque vector representing the desired driving force of the system. This approach utilizes a hard threshold limiting mechanism to reduce the risk of excessive instantaneous commands exceeding the output limits of the UAV's rotor motors, thereby preventing actuator saturation and attitude instability.
[0048] The maximum allowable control torques for the UAV's roll, pitch, and yaw channels are set as follows: (N·m), minimum allowable control torque is (N·m). For The three components are truncated independently based on conditional statements: if a component of a certain dimension is greater than the corresponding component of the other dimension... Then cut off to If less than Then cut off to .
[0049] The output is a correction vector after multidimensional amplitude saturation limiting, and it is used as the initial flight control command.
[0050] S7. Calculate the sign inversion frequency of the initial flight control command by combining the historical control command time series.
[0051] A sliding window containing a preset number of control cycles is established, representing a historical time series of actual control commands. The generated initial flight control commands are pushed to the end of this sliding window to form a test sequence. The sign changes of two adjacent control commands in each dimension of the test sequence are obtained, and the cumulative number of occurrences of positive to negative and negative to positive is counted. The cumulative number of occurrences is divided by the time span corresponding to the sliding window to obtain the sign reversal frequency, which represents the intensity of the control command oscillation.
[0052] S8, when the sign reversal frequency is higher than the set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, the difference vector is projected onto the stability margin boundary to generate a control command.
[0053] Set an oscillation frequency threshold, for example, 5.0 Hz. When the sign reversal frequency is greater than this threshold, calculate the L2 norm amplitude of the difference vector between the initial flight control command and the actual control command at the previous moment.
[0054] The stability margin radius is calculated based on the dimensionless result of the sign inversion frequency after being processed by a preset frequency reference, and then corrected by incorporating the current rate of change of the unmanned aerial vehicle's attitude angular velocity. When the magnitude of the L2 norm of the difference vector is greater than the stability margin radius, the difference vector is divided by its own L2 norm magnitude and multiplied by the stability margin radius to achieve boundary projection. The projected and scaled difference vector is added to the most recent actual control command to generate a control command, which is then sent to the flight controller.
[0055] In an optional embodiment, when the sign inversion frequency is higher than a set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, projecting the difference vector onto the stability margin boundary to generate control commands includes: Obtain the actual control commands from the past N control cycles, and combine the actual control commands with the initial flight control commands in chronological order to form a test sequence; The sign inversion frequency is obtained by counting the total number of times the positive and negative signs of two adjacent instructions in the test sequence change in each dimension component and dividing by the time span. The symbol inversion frequency is dimensionless based on a preset frequency reference, and the stability margin is calculated using the dimensionless symbol inversion frequency and a preset margin reference value with control command dimensions. The higher the dimensionless symbol inversion frequency, the smaller the stability margin. Calculate the magnitude of the difference vector between the initial flight control command and the most recent actual control command; If the magnitude is greater than the stability margin, the difference vector is scaled proportionally until the magnitude reaches the stability margin, and the most recent actual control command is added to generate a control command.
[0056] Recall the control steps from the past M=20 consecutive control cycles from the flight controller's memory buffer. The preferred value is 0.02s, which corresponds to the actual control command sequence with a total time span of 0.4s. The currently generated initial flight control command is then spliced to the end of the sequence to form a complete test sequence containing 21 discrete time nodes.
[0057] The sign function (Sign()) is executed to extract the command components of the roll, pitch, and yaw channels in the test sequence along the time axis. The cumulative number of positive-to-negative or negative-to-positive transitions between adjacent commands is counted. and according to the formula Calculate the sign inversion frequency under high-frequency oscillation characteristics.
[0058] When the inversion frequency is detected When the oscillation frequency exceeds the set threshold (preferred parameter is 5.0Hz), it indicates that the actuator may be in a state of potential control chatter. In this case, a smoothing reduction mechanism is triggered, and a preset frequency reference is set. Calculate the dimensionless oscillation intensity And utilize a preset margin reference value with control command dimensions. Calculate stability margin , where γ is the dimensionless smoothing coefficient. Preferably 5.0Hz, Preferably, it is 2.5 N·m, and γ is preferably 1.0, which compresses the allowable single-step instruction jump amplitude accordingly when the sign inversion frequency increases.
[0059] Extract the currently calculated initial flight control commands The most recent actual control command recorded at the previous time (t-1) In the three-dimensional control command space, vector subtraction is performed to obtain the incremental difference vector ΔU, and the second norm of the vector |ΔU| is calculated to measure the degree of jump in a single-step command.
[0060] Perform geometric boundary checks and constraints: If the calculated modulus |ΔU| exceeds the stability margin calculated in real time... Extract the unit vector ΔU / |ΔU| that retains the original control intention direction, and then compare it with the scalar. Multiplication performs boundary spherical projection scaling and executes state compensation operations. .
[0061] This truncation method based on spherical projection can reduce the step amplitude of single-step control torque while preserving the desired orientation of the three-dimensional adjustment space, thereby reducing the risk of high-frequency flutter in UAV rotors.
[0062] In the second embodiment, the present invention also proposes a stability control system for a water conservancy monitoring unmanned aerial vehicle, comprising: The partitioning module is used to acquire the flight attitude data, position data, and airborne environmental sensor data of the unmanned aerial vehicle at the current moment; based on the control output results of the preset control rule base and the environmental state features extracted from the airborne environmental sensor data, a state control mapping space is constructed and density clustering is performed to divide it into several rule sub-clusters; The determination module is used to calculate the predicted attitude vector for a short period of time in the future based on the flight attitude data of the current and multiple consecutive moments in the past, and to generate a flight trend prediction vector based on the predicted attitude vector and the expected attitude vector; and to match the two target rule subclusters that are closest to the flight trend prediction vector and determine their respective activation weights based on the vector difference. The control module is used to calculate the dispersion between the initial control commands of each rule for the target rule sub-cluster, exclude initial control commands that deviate from the average center by more than a deviation threshold, the deviation threshold being adjusted based on the intensity of environmental disturbance; fuse the control commands of the target rule sub-cluster after excluding deviation commands according to the activation weight to generate an initial flight control command; calculate the sign inversion frequency of the initial flight control command by combining the historical control command time series; when the sign inversion frequency is higher than a set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, project the difference vector onto the stability margin boundary to generate a control command.
[0063] In an optional embodiment, the control output results based on the preset control rule base and the environmental state features extracted from the airborne environmental sensor data are used to construct a state control mapping space for density clustering, dividing it into several rule sub-clusters, including: The three-dimensional wind speed component in the airborne environmental sensor data is extracted as an environmental state feature. Based on preset wind speed scale benchmarks and preset control adjustment scale benchmarks, the three-dimensional control adjustment vectors corresponding to each rule in the environmental state characteristics and preset control rule base are processed to be dimensionless. The dimensionless environmental state features are concatenated with the dimensionless three-dimensional control adjustment vector to generate feature data points in the mapping space. A density-based spatial clustering algorithm is used to calculate the local density of each feature data point with a preset Euclidean distance as the search radius. Data points with local density greater than the density threshold are taken as core points, and connected core points and their neighboring points are grouped into the same rule sub-cluster, and the central feature vector of each rule sub-cluster is updated.
[0064] In an optional embodiment, the step of calculating a predicted attitude vector for a short future period based on flight attitude data from the current and multiple consecutive past moments, and generating a flight trend prediction vector based on the predicted attitude vector and the desired attitude vector, includes: Extract the roll angle, pitch angle, and yaw angle data for the current moment and the past M consecutive sampling periods to construct a historical attitude time series; The attitude angle data at adjacent sampling times in the historical attitude time series are subtracted and divided by the corresponding sampling period to obtain the angular velocity vector between each sampling period. The angular velocity vector is fitted using the weighted least squares method to obtain the first and second derivatives of the attitude change. Based on the second-order Taylor expansion formula, the predicted attitude vector for the next short period of time is generated. The desired attitude vector is determined based on the inspection route or attitude control target, and the predicted attitude deviation vector is generated from the difference between the desired attitude vector and the predicted attitude vector. The predicted attitude deviation vector is used as the flight trend prediction vector.
[0065] In an optional embodiment, the matching of the two target rule subclusters closest to the flight trend prediction vector, and the determination of their respective activation weights based on vector dissimilarity, includes: The predicted attitude deviation vector, which serves as the flight trend prediction vector, is multiplied by a preset control gain matrix to obtain the corresponding predicted control demand vector. The predictive control demand vector is dimensionless based on the preset control adjustment scale benchmark to obtain a dimensionless predictive control demand vector. Calculate the cosine similarity and absolute magnitude error between the dimensionless predictive control demand vector and the dimensionless three-dimensional control adjustment components in the feature vectors of all regular subclusters; A comprehensive evaluation index is constructed based on the cosine similarity and the absolute error of the modulus. Each rule sub-cluster is ranked, and the two rule sub-clusters with the highest scores are selected as the target rule sub-clusters. Calculate the Euclidean distance between the dimensionless predictive control demand vector and the dimensionless three-dimensional control adjustment components in the central feature vectors of the two target rule subclusters; The reciprocal of the Euclidean distance is normalized, and the normalized value is used as the activation weight of each of the two target rule subclusters.
[0066] In an optional embodiment, for the target rule sub-cluster, the dispersion between the initial control commands of each rule is calculated, and initial control commands that deviate from the average center by more than a deviation threshold are excluded. The deviation threshold is adjusted based on the intensity of environmental disturbance, including: Calculate the vector sum of the initial control instructions of all rules within the target rule sub-cluster, and divide by the total number of rules to obtain the initial average center vector; Calculate the root mean square error between the initial control command of each rule and the initial average center vector, and use it as the dispersion. The wind speed variance is extracted from the airborne environmental sensor data, and the wind speed variance is dimensionless based on a preset wind speed variance benchmark to obtain the environmental disturbance intensity coefficient. Multiply the base threshold by the sum of the environmental disturbance intensity coefficient and the preset positive constant to obtain the deviation threshold consistent with the discrete metric. The dispersion of each rule is compared with the deviation threshold, and preliminary control instructions with dispersion greater than the deviation threshold are removed.
[0067] In an optional embodiment, the step of fusing the control commands of the target rule subcluster after excluding deviation commands according to the activation weights to generate initial flight control commands includes: For each target rule subcluster, calculate the arithmetic mean vector of the retained preliminary control commands, which serves as the subcluster-level control command; Extract the sub-cluster level control instructions corresponding to the two target rule sub-clusters, and perform scalar multiplication operations with the corresponding activation weights respectively; Add the results of the two multiplication operations to obtain the weighted and fused three-dimensional control torque vector; The amplitude of the three-dimensional control torque vector is saturated and limited, and the limited vector is used as the initial flight control command.
[0068] In an optional embodiment, when the sign inversion frequency is higher than a set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, projecting the difference vector onto the stability margin boundary to generate control commands includes: Obtain the actual control commands from the past N control cycles, and combine the actual control commands with the initial flight control commands in chronological order to form a test sequence; The sign inversion frequency is obtained by counting the total number of times the positive and negative signs of two adjacent instructions in the test sequence change in each dimension component and dividing by the time span. The symbol inversion frequency is dimensionless based on a preset frequency reference, and the stability margin is calculated using the dimensionless symbol inversion frequency and a preset margin reference value with control command dimensions. The higher the dimensionless symbol inversion frequency, the smaller the stability margin. Calculate the magnitude of the difference vector between the initial flight control command and the most recent actual control command; If the magnitude is greater than the stability margin, the difference vector is scaled proportionally until the magnitude reaches the stability margin, and the most recent actual control command is added to generate a control command.
[0069] The above description represents the preferred embodiments of the present invention. It should be noted that, for those skilled in the art, various improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A stability control method for a water conservancy monitoring unmanned aerial vehicle, characterized in that, include: Acquire the current flight attitude data, position data, and airborne environmental sensor data of the unmanned aerial vehicle; Based on the control output results of the preset control rule base and the environmental state features extracted from the airborne environmental sensor data, a state control mapping space is constructed and density clustering is performed to divide it into several rule sub-clusters. Based on flight attitude data from current and past consecutive moments, a predicted attitude vector for a short future period is calculated, and a flight trend prediction vector is generated based on the predicted attitude vector and the expected attitude vector. The two target rule subclusters that are closest to the flight trend prediction vector are matched, and their respective activation weights are determined based on the vector difference. For the target rule sub-cluster, the dispersion between the initial control commands of each rule is calculated, and initial control commands that deviate from the average center by more than a deviation threshold are excluded. The deviation threshold is adjusted based on the intensity of environmental disturbance. The control commands of the target rule sub-cluster after excluding deviation commands are fused according to the activation weight to generate an initial flight control command. The sign inversion frequency of the initial flight control command is calculated by combining the historical control command time series. When the sign inversion frequency is higher than the set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, the difference vector is projected onto the stability margin boundary to generate a control command.
2. The method according to claim 1, characterized in that, The control output results based on the preset control rule base and the environmental state features extracted from the airborne environmental sensor data are used to construct a state control mapping space for density clustering, dividing it into several rule sub-clusters, including: The three-dimensional wind speed component in the airborne environmental sensor data is extracted as an environmental state feature. Based on preset wind speed scale benchmarks and preset control adjustment scale benchmarks, the three-dimensional control adjustment vectors corresponding to each rule in the environmental state characteristics and preset control rule base are processed to be dimensionless. The dimensionless environmental state features are concatenated with the dimensionless three-dimensional control adjustment vector to generate feature data points in the mapping space. A density-based spatial clustering algorithm is used to calculate the local density of each feature data point with a preset Euclidean distance as the search radius. Data points with local density greater than the density threshold are taken as core points, and connected core points and their neighboring points are grouped into the same rule sub-cluster, and the central feature vector of each rule sub-cluster is updated.
3. The method according to claim 1, characterized in that, The step of calculating a predicted attitude vector for a short future period based on flight attitude data from multiple consecutive moments in the past and present, and generating a flight trend prediction vector based on the predicted attitude vector and the desired attitude vector, includes: Extract the roll angle, pitch angle, and yaw angle data for the current moment and the past M consecutive sampling periods to construct a historical attitude time series; The attitude angle data at adjacent sampling times in the historical attitude time series are subtracted and divided by the corresponding sampling period to obtain the angular velocity vector between each sampling period. The angular velocity vector is fitted using the weighted least squares method to obtain the first and second derivatives of the attitude change. Based on the second-order Taylor expansion formula, the predicted attitude vector for the next short period of time is generated. The desired attitude vector is determined based on the inspection route or attitude control target, and the predicted attitude deviation vector is generated from the difference between the desired attitude vector and the predicted attitude vector. The predicted attitude deviation vector is used as the flight trend prediction vector.
4. The method according to claim 2, characterized in that, The matching process involves identifying the two target rule subclusters that are closest to the flight trend prediction vector, and determining their respective activation weights based on vector dissimilarity, including: The predicted attitude deviation vector, which serves as the flight trend prediction vector, is multiplied by a preset control gain matrix to obtain the corresponding predicted control demand vector. The predictive control demand vector is dimensionless based on the preset control adjustment scale benchmark to obtain a dimensionless predictive control demand vector. Calculate the cosine similarity and absolute magnitude error between the dimensionless predictive control demand vector and the dimensionless three-dimensional control adjustment components in the feature vectors of all regular subclusters; A comprehensive evaluation index is constructed based on the cosine similarity and the absolute error of the modulus. Each rule sub-cluster is ranked, and the two rule sub-clusters with the highest scores are selected as the target rule sub-clusters. Calculate the Euclidean distance between the dimensionless predictive control demand vector and the dimensionless three-dimensional control adjustment components in the central feature vectors of the two target rule subclusters; The reciprocal of the Euclidean distance is normalized, and the normalized value is used as the activation weight of each of the two target rule subclusters.
5. The method according to claim 1, characterized in that, For the target rule sub-cluster, the dispersion between the initial control commands of each rule is calculated, and initial control commands that deviate from the average center by more than a deviation threshold are excluded. The deviation threshold is adjusted based on the intensity of environmental disturbances, including: Calculate the vector sum of the initial control instructions of all rules within the target rule sub-cluster, and divide by the total number of rules to obtain the initial average center vector; Calculate the root mean square error between the initial control command of each rule and the initial average center vector, and use it as the dispersion. The wind speed variance is extracted from the airborne environmental sensor data, and the wind speed variance is dimensionless based on a preset wind speed variance benchmark to obtain the environmental disturbance intensity coefficient. Multiply the base threshold by the sum of the environmental disturbance intensity coefficient and the preset positive constant to obtain the deviation threshold consistent with the discrete metric. The dispersion of each rule is compared with the deviation threshold, and preliminary control instructions with dispersion greater than the deviation threshold are removed.
6. The method according to claim 1, characterized in that, The process of fusing the control commands of the target rule subcluster after excluding deviation commands according to the activation weight to generate initial flight control commands includes: For each target rule subcluster, calculate the arithmetic mean vector of the retained preliminary control commands, which serves as the subcluster-level control command; Extract the sub-cluster level control instructions corresponding to the two target rule sub-clusters, and perform scalar multiplication operations with the corresponding activation weights respectively; Add the results of the two multiplication operations to obtain the weighted and fused three-dimensional control torque vector; The amplitude of the three-dimensional control torque vector is saturated and limited, and the limited vector is used as the initial flight control command.
7. The method according to claim 5, characterized in that, When the sign inversion frequency is higher than a set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, the difference vector is projected onto the stability margin boundary to generate a control command, including: Obtain the actual control commands from the past N control cycles, and combine the actual control commands with the initial flight control commands in chronological order to form a test sequence; The sign inversion frequency is obtained by counting the total number of times the positive and negative signs of two adjacent instructions in the test sequence change in each dimension component and dividing by the time span. The symbol inversion frequency is dimensionless based on a preset frequency reference, and the stability margin is calculated using the dimensionless symbol inversion frequency and a preset margin reference value with control command dimensions. The higher the dimensionless symbol inversion frequency, the smaller the stability margin. Calculate the magnitude of the difference vector between the initial flight control command and the most recent actual control command; If the magnitude is greater than the stability margin, the difference vector is scaled proportionally until the magnitude reaches the stability margin, and the most recent actual control command is added to generate a control command.
8. A stability control system for a water conservancy monitoring unmanned aerial vehicle, characterized in that, include: The module is used to acquire the flight attitude data, position data, and airborne environmental sensor data of the unmanned aerial vehicle at the current moment; Based on the control output results of the preset control rule base and the environmental state features extracted from the airborne environmental sensor data, a state control mapping space is constructed and density clustering is performed to divide it into several rule sub-clusters. The determination module is used to calculate the predicted attitude vector for a short period of time in the future based on the flight attitude data of the current and multiple consecutive moments in the past, and to generate a flight trend prediction vector based on the predicted attitude vector and the expected attitude vector; and to match the two target rule subclusters that are closest to the flight trend prediction vector and determine their respective activation weights based on the vector difference. The control module is used to calculate the dispersion between the initial control commands of each rule for the target rule sub-cluster, exclude initial control commands that deviate from the average center by more than a deviation threshold, the deviation threshold being adjusted based on the intensity of environmental disturbance; fuse the control commands of the target rule sub-cluster after excluding deviation commands according to the activation weight to generate an initial flight control command; calculate the sign inversion frequency of the initial flight control command by combining the historical control command time series; when the sign inversion frequency is higher than a set oscillation frequency threshold, if the difference vector between the initial flight control command and the most recent actual control command exceeds the stability margin, project the difference vector onto the stability margin boundary to generate a control command.
9. The system according to claim 8, characterized in that, The control output results based on the preset control rule base and the environmental state features extracted from the airborne environmental sensor data are used to construct a state control mapping space for density clustering, dividing it into several rule sub-clusters, including: The three-dimensional wind speed component in the airborne environmental sensor data is extracted as an environmental state feature. Based on preset wind speed scale benchmarks and preset control adjustment scale benchmarks, the three-dimensional control adjustment vectors corresponding to each rule in the environmental state characteristics and preset control rule base are processed to be dimensionless. The dimensionless environmental state features are concatenated with the dimensionless three-dimensional control adjustment vector to generate feature data points in the mapping space. A density-based spatial clustering algorithm is used to calculate the local density of each feature data point with a preset Euclidean distance as the search radius. Data points with local density greater than the density threshold are taken as core points, and connected core points and their neighboring points are grouped into the same rule sub-cluster, and the central feature vector of each rule sub-cluster is updated.
10. The system according to claim 8, characterized in that, The step of calculating a predicted attitude vector for a short future period based on flight attitude data from multiple consecutive moments in the past and present, and generating a flight trend prediction vector based on the predicted attitude vector and the desired attitude vector, includes: Extract the roll angle, pitch angle, and yaw angle data for the current moment and the past M consecutive sampling periods to construct a historical attitude time series; The attitude angle data at adjacent sampling times in the historical attitude time series are subtracted and divided by the corresponding sampling period to obtain the angular velocity vector between each sampling period. The angular velocity vector is fitted using the weighted least squares method to obtain the first and second derivatives of the attitude change. Based on the second-order Taylor expansion formula, the predicted attitude vector for the next short period of time is generated. The desired attitude vector is determined based on the inspection route or attitude control target, and the predicted attitude deviation vector is generated from the difference between the desired attitude vector and the predicted attitude vector. The predicted attitude deviation vector is used as the flight trend prediction vector.