Flapping wing vehicle cascade control switching method based on disturbance quantification and PID architecture

CN121578619BActive Publication Date: 2026-08-07KUNMING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KUNMING UNIV OF SCI & TECH
Filing Date
2025-10-31
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

然而,其精确控制仍面临三大挑战:一是强非线性与多通道耦合问题,低雷诺数条件下非定常气动力导致姿态和位置控制相互耦合,传统线性控制方法难以适用;二是复杂气动扰动抑制困难,风速变化等时变扰动易引发失稳,现有控制策略抗扰能力有限;三是性能与工程可行性难以兼顾,单一控制策略如PID鲁棒性不足、滑模控制存在抖振、非线性PID参数整定复杂,难以覆盖全扰动工况

Benefits of technology

本发明通过值量化扰动强度,三种子策略覆盖低、中、高扰动区间,解决单一策略的局限。在低扰动下PID-PID保障计算效率,中扰动下PID-NLPID实现精度与平滑性平衡,高扰动下PID-SMC抑制极端扰动;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121578619B_ABST
    Figure CN121578619B_ABST
Patent Text Reader

Abstract

The application discloses a flapping-wing aircraft cascade control switching method based on disturbance quantification and a PID architecture and belongs to the technical field of flapping-wing aircraft control. The application takes a three-section foldable bionic flapping-wing aircraft as a controlled object, takes a classic PID control as an outer ring main loop, takes PID control, nonlinear PID control and sliding mode control as inner ring sub-loops of a cascade control framework, provides a basis for calculation and disturbance compensation through an extended state observer (ESO), designs adaptive switching logic weight coefficients based on the calculation results, generates a total control instruction and completes construction of the method. The application covers low, medium and high disturbance intervals through three sub-strategies, guarantees calculation efficiency under low disturbance through PID-PID, realizes balance between precision and smoothness under medium disturbance through PID-NLPID, suppresses extreme disturbance under high disturbance through PID-SMC, reduces RMSE of trajectory tracking by 5%-8% compared with pure PID under high disturbance, shortens recovery time to less than 5s, reduces control input fluctuation amplitude by more than 60% compared with pure SMC under low disturbance and avoids execution mechanism chattering loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flapping-wing aircraft control technology, specifically to a cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture. Background Technology

[0002] Bionic flapping-wing aircraft, with their low aerodynamic noise, maneuverability, and high energy efficiency, have broad application potential in fields such as military reconnaissance and environmental monitoring. However, their precise control still faces three major challenges: First, strong nonlinearity and multi-channel coupling issues, where unsteady aerodynamic forces under low Reynolds number conditions lead to the coupling of attitude and position control, making traditional linear control methods difficult to apply; second, difficulty in suppressing complex aerodynamic disturbances, where time-varying disturbances such as wind speed changes can easily cause instability, and existing control strategies have limited disturbance immunity; and third, difficulty in balancing performance and engineering feasibility, where single control strategies such as PID lack robustness, sliding mode control suffers from chattering, and nonlinear PID parameter tuning is complex and difficult to cover all disturbance conditions.

[0003] While existing technologies attempt to combine PID control with sliding mode control or introduce ESO disturbance observation, they still suffer from the following bottlenecks: a lack of objective quantitative standards for disturbances, relying heavily on empirical thresholds and failing to achieve accurate disturbance assessment; limited control strategy coverage, making it difficult to adapt to the entire disturbance range from low to high disturbances, easily leading to resource waste or control failure; and the potential for control jumps during strategy switching in engineering implementation, complex parameter tuning, and a lack of clear coordination logic between modules, affecting system real-time performance. Therefore, existing technologies still have significant shortcomings in terms of full disturbance adaptation, disturbance quantification and standardization, module coordination, and engineering feasibility. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture.

[0005] To achieve the above technical solution, the steps include: S1. Select a three-section foldable bionic flapping-wing aircraft as the controlled object.

[0006] S2. Based on the controlled object, construct a cascaded control framework with classical PID control as the outer loop main loop and PID control, nonlinear PID (NLPID) control and sliding mode control as the inner loop secondary loop; The control equation expression for the outer loop PID main loop is as follows: In the formula, Indicates the expected roll angle; Indicates the desired pitch angle; Indicates the desired yaw angle; express The orientation and position error is expressed as: , express The orientation and position error is expressed as: , express The orientation and position error is expressed as: ,in, , and Indicates a reference position. Indicates the actual direction; , and They represent Position loop proportional gain in direction, set ; , and They represent Position loop integral gain in the direction, set ; , and ,set up ; In this invention, for the outer loop control section, for The parameters for the three-way channel are adjusted as follows: , , ; , , ; , , ; The attitude loop control expression for the inner-loop PID control is as follows: In the formula, Indicates the roll channel control torque; Indicates the pitch control torque; Indicates the yaw channel control torque; The roll angle error is expressed as... , The pitch angle error is expressed as: ; The yaw angle error is expressed as: ,in, , and These represent the desired roll angle, desired pitch angle, and desired yaw angle, respectively. Indicates the roll angle. Indicates pitch angle, Indicates the yaw angle; , and These represent the attitude loop proportional gains for roll, pitch, and yaw angles, respectively. , and These represent the attitude loop integral gains for roll angle, pitch angle, and yaw angle, respectively. , and These represent the attitude loop differential gains for roll, pitch, and yaw angles, respectively; a multi-channel coupling compensation term is introduced, expressed as: ,in, This represents the original desired roll angle, with 0.3 and 0.2 being the laboratory-tuned coupling coefficients for compensation. y / z Position error in direction x Interference in the channel; In this invention, the inner loop PID control parameters are set as follows: x and z The directional channels are tuned with the same control parameters, which are: set up x and z The parameter range for the directional channel is: , , , , , ; y The control parameters for the directional channel are: y Attitude loop proportional gain on the directional channel , y Attitude loop integral gain on the directional channel , y Attitude-to-differential gain on the directional channel ,set up , and ; The design expression for inner-loop nonlinear PID (NLPID) control includes: The inner channel (pitch) uses the control law of the inner loop PID control loop to ensure stability; The nonlinear control torque is obtained based on the inner channel (roll) control law, and its expression is as follows: In the formula, This indicates the nonlinear control torque of the roll angle channel; This indicates the nonlinear roll angle proportional gain; Indicates roll angle error; This represents the nonlinear roll angle integral gain; This represents the nonlinear saturation term of the integral term; Indicates the parameters of the saturation function; This represents the linear roll angle differential gain; Indicates the nonlinear correction coefficient; The nonlinear control torque is obtained based on the inner channel (yaw) control law: In the formula, This indicates the nonlinear control torque of the yaw angle channel; This represents the nonlinear yaw angle proportional gain; Indicates yaw angle error; This represents the nonlinear yaw angle integral gain; This represents the nonlinear saturation term of the integral term; Indicates the parameters of the saturation function; This represents the nonlinear yaw angle differential gain; Indicates the nonlinear correction coefficient; The nonlinear control torque is obtained by introducing the ESO disturbance compensation term: In the formula, This represents the basic moment of roll angle calculated by nonlinear PID control. This represents the aerodynamic disturbance of the roll angle estimated by ESO; The nonlinear control torque of the yaw angle channel can be derived as follows: In the formula, This represents the basic moment of yaw angle calculated by nonlinear PID control. This represents the yaw angle aerodynamic disturbance estimated by ESO; In this invention, a nonlinear correction coefficient is set. exist x and z The value is 0.8 in the directional channel; a nonlinear correction coefficient is set. exist y Directional channel The gain is 0.75; the nonlinear proportional gain of the roll and yaw angle channels in the inner-loop nonlinear PID (NLPID) control is nonlinear. Both are set to 0.75, with nonlinear integral gain for roll and yaw channels. Both are set to 4, with nonlinear differential gain for roll and yaw angle channels. All are taken as 0.75; In the inner channel (pitch) of the inner-loop nonlinear PID (NLPID) control, the differential term gain of the inner-loop control is... It is not related to the inner loop PID. The values ​​are completely identical, but they are based on cascaded PIDs. Using this as a basic reference value, and based on the strength of the aerodynamic nonlinearity of the three channels, the differential term gain is adjusted or corrected accordingly, so that the differential action is... y In scenarios with significant channel aerodynamic nonlinearity, it can more effectively suppress disturbances, avoid differential saturation or high-frequency noise amplification, and ultimately enhance the control stability of the three channels; The inner-loop SMC control design includes: The synovial surface is defined as: This accelerates error convergence; among them, Represents the sliding surface function of the roll channel; Indicates roll angle error; Indicates the parameters of the synovial surface; The exponential law of convergence is defined as: ,in, Indicates the rate of change of the sliding surface; Represents the law of convergence; This represents the coefficient of the convergence law exponent. The expression for the control torque obtained from the control law is as follows: In the formula, Indicates the roll channel control torque; Indicates the moment of inertia of the roll axis; Indicates the desired roll rate; Indicates the parameters of the synovial surface; Indicates roll angle error; Indicates the reaching law switching gain; Represents the sliding surface function of the roll channel; Indicates the boundary layer thickness; This represents the coefficient of the convergence law exponent. Represents the angular velocity vector; Represents the moment of inertia matrix; Represents the angular velocity vector matrix; Indicates the estimated disturbance value; Energy Coupling Correction: To ensure multi-channel energy coupling correction, considering flapping wing energy consumption and control parameters, a dynamic weighting coefficient is introduced, and the control torque is corrected as follows: , ,in, Indicates the SMC basic control torque. Represents dynamic weighting coefficients; flapping frequency ∈ ; In this invention, the inner loop SMC control parameters are set as follows: x and z The same control parameters are used for channel tuning, and the same sliding surface parameters are used for sliding surface tuning. Approach Law The coefficient of the approach law exponent term Boundary layer thickness Suppressing chatter; Y-channel control parameters, slid surface parameters Approach Law The coefficient of the exponential term of the approach law Boundary layer 2.

[0007] S3. Construct an extended state observer (ESO) to estimate the controlled object in real time, for Provides a basis for calculation and disturbance compensation; The extended state observer (ESO) expression is as follows: In the formula, Indicates the estimated value of the common angle ; Indicates the estimated rate of change of the common angle. ; Indicates the estimated value of aerodynamic disturbance. ; , and These represent the gains of the first observer, the second observer, and the third observer, respectively. This indicates the sensor feedback signal; Represents the control matrix; Indicates control input; The ESO perturbation observer is designed based on the modified Kirchhoff equation to estimate the angle of attack in real time. Rate of change of angle of attack and aerodynamic disturbances ,for Provides a basis for calculation and disturbance compensation; Estimate aerodynamic disturbances The expression is as follows: ; The ESO observer gain is set to 100, 2000, and 10000, based on the modified Kirchhoff equation, to ensure aerodynamic disturbances. The estimation error is ≤5%. Value calculation accuracy ≤3%; definition The physical meaning of is the ratio of airflow disturbance energy to the rated aerodynamic power of the flapping wing, based on the ESO output. Combined with control cycle With rated flapping wing aerodynamic power Through formula calculate The values ​​are then used to divide the disturbance into three intervals: low disturbance interval ∈ [1,3] (wind speed < 1m / s), medium disturbance interval ∈ [4,12] (wind speed 1-3m / s), and high disturbance interval ∈ [13,24] (wind speed > 3m / s); To achieve closed-loop control, each step is verified through graphical correlation to ensure consistency between theoretical logic and experimental operation. The specific operation is as follows: Initialize the parameters of each module: load the tuning parameters of the outer loop PID, inner loop sub-strategy, and ESO, set the control cycle to Ts=0.02s, and start the hardware self-test of the sensor, control module, and actuator; Hardware startup: Sequentially activate the sensor modules (MPU6050, VL53L0X), microcontroller (load outer loop PID and inner loop sub-strategy programs), and actuators (brushless motor pre-starts to 15Hz flapping frequency, servo motor returns to center). (torsion angle) Initial state configuration: Set the initial attitude (roll) , looking up ,yaw 1. Initial position (x=0m, y=0m, z=0m), reference trajectory set to figure eight (x=1.0sin(0.5), y=0.5sin(t)), (z=5sin(0.5t)), start cascade closed loop, that is, the outer loop PID runs first, and the inner loop activates the PID sub-strategy by default; Disturbance injection and Real-time value quantization: The system simulates three typical disturbance scenarios in actual flight and quantifies their intensity in real time using a disturbance estimation module, providing an objective basis for switching strategies. Set a low-disturbance scenario corresponding to a steady airflow with a wind speed of 0.5 m / s: sensor set to 50H Z Attitude and position signals are acquired, transmitted to the ESO processing unit, substituted into the ESO state equation, and calculated. ≈2; The disturbance scenario is a periodic gust of wind with a speed of 2 m / s and a period of 5 seconds: the disturbance injection device outputs airflow disturbances according to a preset period, and the ESO tracks the disturbance changes in real time. It exhibits periodic fluctuations, as calculated. ≈7; The high-disturbance scenario is a chaotic airflow with a wind speed of 4 m / s and a fluctuation range of ±1 m / s: the disturbance injection device generates random airflow, and the ESO responds quickly to sudden disturbances. The fluctuations were intense, and the calculations were as follows: ≈18; Value transfer: every 0.02 seconds The value is sent to the strategy switching module to ensure that the switching judgment is synchronized with the change of disturbance.

[0008] S4, based on Calculation results are used to design adaptive switching logic weight coefficients; Introducing dynamic weighting coefficients 、 、 Corresponding to PID, nonlinear PID (NLPID), and SMC sub-policies respectively, satisfying ; The formula for calculating the weighting coefficients of the inner-loop PID controller is: ; The expression for calculating the weighting coefficients of a nonlinear PID (NLPID) is as follows: ; The formula for calculating the weighting coefficient of SMC is: - .

[0009] S5. Generate the overall control command based on the adaptive switching logic weight coefficient; The expression for the master control command is as follows: In the formula, Indicates outer ring Inner Ring Control output; Indicates outer ring Inner Ring Control output; Indicates outer ring Inner Ring Control output; 、 and These represent the weight coefficients corresponding to PID, nonlinear PID (NLPID), and SMC sub-strategies, respectively. Will Inputting data into the flapping-wing aircraft's actuators, and combining this data with the attitude and position signals fed back from sensors, allows for real-time iteration, enabling attitude stabilization and trajectory tracking under various disturbance scenarios. To ensure stability during the switching process, Lyapunov functions are used to monitor system stability in real time. The expression is as follows: In the formula, Represents the total Lyapunov function of the entire cascaded system; The Lyapunov function representing the outer loop position tracking error; The two processes analyze the motion state through inner product operations, where, This represents the error state vector of the attitude loop. The superscript represents the sliding surface vector of sliding mode control (SMC). Indicates transpose; Regulation If an unstable trend emerges, temporarily increase the weight of the current sub-strategy by 10% until the system returns to stability.

[0010] Beneficial effects of the present invention This invention is achieved through The perturbation intensity is quantified, and three sub-strategies cover low, medium, and high perturbation ranges, overcoming the limitations of single strategies. Under low perturbation, PID-PID ensures computational efficiency; under medium perturbation, PID-NLPID achieves a balance between accuracy and smoothness; and under high perturbation, PID-SMC suppresses extreme perturbations. This invention combines real-time disturbance estimation (ESO) with the robustness of sliding mode control. Under high disturbances, the RMSE of trajectory tracking is reduced by 5%-8% compared to pure PID, and the recovery time is shortened to less than 5 seconds. Under low disturbances, the control input fluctuation amplitude is reduced by more than 60% compared to pure SMC, avoiding actuator chattering losses. The outer loop PID parameters of this invention are fixed, and only the inner loop sub-strategy parameters need to be tuned, reducing the complexity of parameter tuning; the control framework is compatible with MWORKS.Sysplorer physical modeling and MATLAB / Simulink simulation, and can be directly connected to the motor drive and sensor system of actual flapping-wing aircraft. This invention verifies the asymptotic stability of the switching point using the Lyapunov function, achieves a disturbance-free transition of the strategy using dynamic weight coefficients, and controls the overshoot to below 5% to avoid attitude fluctuations during the switching process. Attached Figure Description

[0011] Figure 1 This is a diagram of the figure-eight-shaped flight control closed-loop structure of the present invention; Figure 2 This is an aerodynamic model diagram of the flapping-wing aircraft of the present invention; Figure 3 This is a schematic diagram of the adaptive cascaded control strategy switching logic of the present invention; Figure 4This is a comparison chart of the dynamic position errors of different control algorithms of the present invention; wherein, Figure 4 (a) represents the position error in the x-direction; Figure 4 (b) represents the position error in the y-direction; Figure 4 (c) represents the position error in the z-direction; Figure 4 (d) represents the total position error; Figure 5 This is a diagram illustrating the control input characteristics of the present invention. Figure 6 This is the phase space and phase trajectory diagram for access disturbance quantization according to the present invention; wherein, Figure 6 (a) represents the three-dimensional phase space when K*=1; Figure 6 (b) shows the phase trajectory diagram when K*=1; Figure 6 (c) represents the three-dimensional phase space when K*=10; Figure 6 (d) shows the phase trajectory diagram when K*=10; Figure 6 (e) represents the three-dimensional phase space when K*=20; Figure 6 (f) represents the phase trajectory diagram when K*=20. Detailed Implementation

[0012] The present invention will be further described in detail below with reference to specific embodiments.

[0013] See 1 to Figure 6 A cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture includes the following steps: S1. Select a three-section foldable bionic flapping-wing aircraft as the controlled object; like Figure 1 and Figure 2 As shown, a six-degree-of-freedom nonlinear dynamic model of a three-segment foldable biomimetic flapping-wing aircraft is used to describe the mathematical characteristics of the controlled object, and the expression is as follows: In the formula, Indicates the overall weight of the machine; Represents a three-dimensional acceleration vector. ,in, express Rate of change of velocity in the direction, express Rate of change of velocity in the direction, express Rate of change of velocity in the direction; Represents the gravity vector. , Represents gravity. Indicates the transpose operation; Represents the angular velocity vector; Indicates flight speed; Represents the Gorbachev inertial term; The total aerodynamic force is calculated based on the modified Kirchhoff equation, and its expression is as follows: In the formula, Indicates air density; Indicates the wing surface area; , and They represent , and Aerodynamic coefficient in direction; The dynamic relationship between attitude angular velocity and torque is described using a three-segment foldable biomimetic flapping-wing aircraft rotational motion model, as shown in the following expression: In the formula, Let represent the moment of inertia matrix, where They represent respectively to , and Moment of inertia in the direction of rotation; Represents the angular acceleration vector; Represents the centrifugal inertial term; Represents the lumped disturbance torque; The aerodynamic torque is expressed as follows: In the formula, Indicates the mean chord length; , and These represent the moment coefficients for roll, pitch, and yaw, respectively. The attitude kinematics model of a three-segment foldable biomimetic flapping-wing aircraft is used to describe the relationship between attitude angle and angular velocity, as expressed below: In the formula, Represents the rate of change of Euler angles; Represents Euler angle vectors. ,in, Indicates the roll angle, i.e., the angle around the yaw rate. The angle of rotation of the axis Indicates the pitch angle, i.e., the angle around the body. The angle of rotation of the axis This represents the yaw angle, which is the angle of rotation about the z-axis. This represents the transformation matrix, i.e., when the pitch angle... When, it is represented as: ; In this embodiment, the basic parameters to be set include: overall machine weight. =5.6g, wingspan R=53mm, mean chord length =50mm, airfoil area S= ×R=2650 , around , and The three-axis rotational inertia is expressed as follows: =575g· , =576g· and =991g· Setting aerodynamic parameters includes: fixing the flapping frequency to the flapping frequency. Maximum left and right wing twist angle = = 30° (according to the airfoil kinematic equations) = ,in, Indicates the amount of torsion angle correction. (Indicates the instantaneous moment), maximum left and right flapping angles air density =1.225 kg / m³ (Standard atmospheric conditions, used in lift formula) ,in, Lift coefficient; thrust formula Calculate, where, (represents thrust coefficient), angle of attack =10°; The sensors utilize commercially available, mature hardware to ensure real-time signal transmission and control accuracy, including: Attitude sensor: Employs an MPU6050 six-axis gyroscope with a sampling frequency of 50Hz and an attitude angle measurement accuracy of ±0.1°; Position sensor: VL53L0X laser rangefinder sensor, ranging range 0-2m, accuracy ±1mm; The specific layout of the sensors is as follows: the attitude sensor and the attitude sensor are fixed on the inner centerline of the fuselage; the attitude sensing unit (MPU6050) is rigidly fixed by silicone damping pads to ensure precise alignment with the body coordinate system and output roll angle, pitch angle, yaw angle and angular velocity in real time to support the inner loop sub-strategy and disturbance estimation; the position sensing unit (VL53L0X) is mounted in front of the attitude sensing unit, with the measuring axis tilted forward by 5° to avoid wing obstruction, to collect three-dimensional coordinates, support the outer loop position control, and meet the control requirements; Data transmission: Serial communication (115200bps baud rate) is used to ensure that sensor data is transmitted synchronously to the control module with a delay of ≤10ms; The STM32H743 microcontroller (480MHz main frequency, floating-point performance ≥1GFLOPS) is selected to realize the real-time calculation of outer loop PID, three sub-strategies (PID, NLPID, SMC) and ESO disturbance estimation, and meet the real-time requirements of K* value calculation and weight adjustment. For the motor part (actuator): Wing drive: 2204 brushless DC motor (rated speed 3000rpm, output torque ≥0.015N) m); Twist angle adjustment: SG90 servo (angle range -30°~30°, response time ≤0.1s, used for correction of instantaneous wing twist angle, realizing real-time adjustment of flapping angle correction amount); Overload protection: The actuator has a built-in current sensor (measurement range 0-3A, accuracy ±5mA). When the current is >1.5A (rated current 1.2A), overload feedback is triggered to prevent the wing aerodynamic torque from being overloaded and causing structural damage. This invention uses the perturbation intensity quantification parameter as the core triggering condition and employs three fusion strategies—PID-PID, PID-NLPID, and PID-Sliding Mode (PID-SMC)—as switchable modules. Smooth switching of the strategies is achieved through real-time perturbation estimation. Its core logic is as follows: Figure 3 As shown.

[0014] S2. Based on the controlled object, construct a cascaded control framework with classical PID control as the outer loop main loop and PID control, nonlinear PID (NLPID) control and sliding mode control as the inner loop secondary loop; The control equation expression for the outer loop PID main loop is as follows: In the formula, Indicates the expected roll angle; Indicates the desired pitch angle; Indicates the desired yaw angle; express The orientation and position error is expressed as: , express The orientation and position error is expressed as: , express The orientation and position error is expressed as: ,in, , and Indicates a reference position. Indicates the actual direction; , and They represent Position loop proportional gain in direction, set ; , and They represent Position loop integral gain in the direction, set ; , and They represent Position loop differential gain in direction, set ; In this invention, for the outer loop control section, for The parameters for the three-way channel are adjusted as follows: , , ; , , ; , , ; The attitude loop control expression for the inner-loop PID control is as follows: In the formula, Indicates the roll channel control torque; Indicates the pitch control torque; Indicates the yaw channel control torque; The roll angle error is expressed as... , The pitch angle error is expressed as: ; The yaw angle error is expressed as: ,in, , and These represent the desired roll angle, desired pitch angle, and desired yaw angle, respectively. Indicates the roll angle. Indicates pitch angle, Indicates the yaw angle; , and These represent the attitude loop proportional gains for roll, pitch, and yaw angles, respectively. , and These represent the attitude loop integral gains for roll angle, pitch angle, and yaw angle, respectively. , and These represent the attitude loop differential gains for roll, pitch, and yaw angles, respectively; a multi-channel coupling compensation term is introduced, expressed as: ,in, This represents the original desired roll angle, with 0.3 and 0.2 being the laboratory-tuned coupling coefficients for compensation. y / z Position error in direction x Interference in the channel; In this invention, the inner loop PID control parameters are set as follows: x and z The directional channels are tuned with the same control parameters, which are: set up x and z The parameter range for the directional channel is: , , , , , ; y The control parameters for the directional channel are: y Attitude loop proportional gain on the directional channel , y Attitude loop integral gain on the directional channel , y Attitude-to-differential gain on the directional channel ,set up , and ; The design expression for inner-loop nonlinear PID (NLPID) control includes: The inner channel (pitch) uses the control law of the inner loop PID control loop to ensure stability; The nonlinear control torque is obtained based on the inner channel (roll) control law, and its expression is as follows: In the formula, This indicates the nonlinear control torque of the roll angle channel; This indicates the nonlinear roll angle proportional gain; Indicates roll angle error; This represents the nonlinear roll angle integral gain; This represents the nonlinear saturation term of the integral term; Indicates the parameters of the saturation function; This represents the linear roll angle differential gain; Indicates the nonlinear correction coefficient; The nonlinear control torque is obtained based on the inner channel (yaw) control law: In the formula, This indicates the nonlinear control torque of the yaw angle channel; This represents the nonlinear yaw angle proportional gain; Indicates yaw angle error; This represents the nonlinear yaw angle integral gain; This represents the nonlinear saturation term of the integral term; Indicates the parameters of the saturation function; This represents the nonlinear yaw angle differential gain; Indicates the nonlinear correction coefficient; The nonlinear control torque is obtained by introducing the ESO disturbance compensation term: In the formula, This represents the basic moment of roll angle calculated by nonlinear PID control. This represents the aerodynamic disturbance of the roll angle estimated by ESO; In the formula, This represents the basic moment of yaw angle calculated by nonlinear PID control. This represents the yaw angle aerodynamic disturbance estimated by ESO; In this invention, a nonlinear correction coefficient is set. exist x and z The value is 0.8 in the directional channel; a nonlinear correction coefficient is set. exist y Directional channel The gain is 0.75; the nonlinear proportional gain of the roll and yaw angle channels in the inner-loop nonlinear PID (NLPID) control is nonlinear. Both are set to 0.75, with nonlinear integral gain for roll and yaw channels. Both are set to 4, with nonlinear differential gain for roll and yaw angle channels. All are taken as 0.75; In the inner channel (pitch) of the inner-loop nonlinear PID (NLPID) control, the differential term gain of the inner-loop control is... It is not related to the inner loop PID. The values ​​are completely identical, but they are based on cascaded PIDs. Using this as a basic reference value, and based on the strength of the aerodynamic nonlinearity of the three channels, the differential term gain is adjusted or corrected accordingly, so that the differential action is... yIn scenarios with significant channel aerodynamic nonlinearity, it can more effectively suppress disturbances, avoid differential saturation or high-frequency noise amplification, and ultimately enhance the control stability of the three channels; The inner-loop SMC control design includes: The synovial surface is defined as: This accelerates error convergence; among them, Represents the sliding surface function of the roll channel; Indicates roll angle error; Indicates the parameters of the synovial surface; The exponential law of convergence is defined as: ,in, Indicates the rate of change of the sliding surface; Represents the law of convergence; This represents the coefficient of the convergence law exponent. The expression for the control torque obtained from the control law is as follows: In the formula, Indicates the roll channel control torque; Indicates the moment of inertia of the roll axis; Indicates the desired roll rate; Indicates the parameters of the synovial surface; Indicates roll angle error; Represents the law of convergence; Represents the sliding surface function of the roll channel; Indicates the boundary layer thickness; This represents the coefficient of the convergence law exponent. Represents the angular velocity vector; Represents the moment of inertia matrix; Represents the angular velocity vector matrix; Indicates the estimated disturbance value; Represents the hyperbolic tangent function; Energy Coupling Correction: To ensure multi-channel energy coupling correction, considering flapping wing energy consumption and control parameters, a dynamic weighting coefficient is introduced, and the control torque is corrected as follows: , ,in, Indicates the SMC basic control torque. Represents dynamic weighting coefficients; flapping frequency ∈ ; In this invention, the inner loop SMC control parameters are set as follows: x and z The same control parameters are used for channel tuning, and the same sliding surface parameters are used for sliding surface tuning. Approach Law The coefficient of the approach law exponent term Boundary layer thickness Suppressing chatter; y Channel control parameters, slid surface parameters Approach Law The coefficient of the exponential term of the approach law Boundary layer 2; All inner loop control parameters are summarized in Table 1. Table 1: Switchable Inner Loop Control Parameters PID-NLPID nonlinear correction: introduction of differential elements in roll and yaw channels ( For correction factor, (The difference between the desired attitude angle and the actual attitude angle) enhances the differential suppression capability as the error increases, adapting to the nonlinear characteristics under disturbances. PID-SMC chattering suppression: A tanh boundary layer is used instead of the traditional sgn function, and the boundary layer thickness... Combined with energy coupling correction To balance disturbance rejection with fatigue wear of the actuator.

[0015] S3. Construct an extended state observer (ESO) to estimate the controlled object in real time, for Provides a basis for calculation and disturbance compensation; The extended state observer (ESO) expression is as follows: In the formula, Indicates the estimated value of the common angle ; Indicates the estimated rate of change of the common angle. ; Indicates the estimated value of aerodynamic disturbance. ; , and These represent the gains of the first observer, the second observer, and the third observer, respectively. This indicates the sensor feedback signal; Represents the control matrix; Indicates control input; The ESO perturbation observer is designed based on the modified Kirchhoff equation to estimate the angle of attack in real time. Rate of change of angle of attack and aerodynamic disturbances ,for Provides a basis for calculation and disturbance compensation; Estimate aerodynamic disturbances The expression is as follows: ; The ESO observer gain is set to 100, 2000, and 10000, based on the modified Kirchhoff equation, to ensure aerodynamic disturbances. The estimation error is ≤5%. Value calculation accuracy ≤3%; definition The physical meaning of is the ratio of airflow disturbance energy to the rated aerodynamic power of the flapping wing, based on the ESO output. Combined with control cycle With rated flapping wing aerodynamic power Through formula calculate The values ​​are then used to divide the disturbance into three intervals: low disturbance interval ∈ [1,3] (wind speed < 1m / s), medium disturbance interval ∈ [4,12] (wind speed 1-3m / s), and high disturbance interval ∈ [13,24] (wind speed > 3m / s); To achieve closed-loop control, each step is verified through graphical correlation to ensure consistency between theoretical logic and experimental operation. The specific operation is as follows: Initialize the parameters of each module: load the tuning parameters of the outer loop PID, inner loop sub-strategy, and ESO, set the control cycle to Ts=0.02s, and start the hardware self-test of the sensor, control module, and actuator; Hardware startup: Sequentially activate the sensor modules (MPU6050, VL53L0X), microcontroller (load outer loop PID and inner loop sub-strategy programs), and actuators (brushless motor pre-starts to 15Hz flapping frequency, servo motor returns to center). (torsion angle) Initial state configuration: Set the initial attitude (roll) , looking up ,yaw 1. Initial position (x=0m, y=0m, z=0m), reference trajectory set to figure eight (x=1.0sin(0.5), y=0.5sin(t)), (z=5sin(0.5t)), start cascade closed loop, that is, the outer loop PID runs first, and the inner loop activates the PID sub-strategy by default; Disturbance injection and Real-time value quantization: The system simulates three typical disturbance scenarios in actual flight and quantifies their intensity in real time using a disturbance estimation module, providing an objective basis for switching strategies. Set a low-disturbance scenario corresponding to a steady airflow with a wind speed of 0.5 m / s: sensor set to 50H Z Attitude and position signals are acquired, transmitted to the ESO processing unit, substituted into the ESO state equation, and calculated. ≈2; The disturbance scenario is a periodic gust of wind with a speed of 2 m / s and a period of 5 seconds: the disturbance injection device outputs airflow disturbances according to a preset period, and the ESO tracks the disturbance changes in real time. It exhibits periodic fluctuations, as calculated. ≈7; The high-disturbance scenario is a chaotic airflow with a wind speed of 4 m / s and a fluctuation range of ±1 m / s: the disturbance injection device generates random airflow, and the ESO responds quickly to sudden disturbances. The fluctuations were intense, and the calculations were as follows: ≈18; Value transfer: every 0.02 seconds The value is sent to the strategy switching module to ensure that the switching judgment is synchronized with the change of disturbance.

[0016] S4, based on Calculation results are used to design adaptive switching logic weight coefficients; Introducing dynamic weighting coefficients , , Corresponding to PID, nonlinear PID (NLPID), and SMC sub-policies respectively, satisfying ; The formula for calculating the weighting coefficients of the inner-loop PID controller is: ; The expression for calculating the weighting coefficients of a nonlinear PID (NLPID) is as follows: ; The formula for calculating the weighting coefficient of SMC is: - .

[0017] S5. Generate the overall control command based on the adaptive switching logic weight coefficient; The expression for the master control command is as follows: In the formula, Indicates outer ring Inner Ring Control output; Indicates outer ring Inner Ring Control output; Indicates outer ring Inner Ring Control output; , and These represent the weight coefficients corresponding to PID, nonlinear PID (NLPID), and SMC sub-strategies, respectively. Will Inputting data into the flapping-wing aircraft's actuators, and combining this data with the attitude and position signals fed back from sensors, allows for real-time iteration, enabling attitude stabilization and trajectory tracking under various disturbance scenarios. To ensure stability during the switching process, Lyapunov functions are used to monitor system stability in real time. The expression is as follows: In the formula, Represents the total Lyapunov function of the entire cascaded system; The Lyapunov function representing the outer loop position tracking error; The two processes analyze the motion state through inner product operations, where, This represents the error state vector of the attitude loop. The superscript represents the sliding surface vector of sliding mode control (SMC). Indicates transpose; Regulation If an unstable trend emerges, temporarily increase the weight of the current sub-strategy by 10% until the system returns to stability.

[0018] Execution feedback and cascading closed-loop iteration: Actuator drive: master control command The signal is converted to a PWM signal (50Hz) to drive the brushless motor to maintain a 15Hz flapping frequency. The servo motor adjusts the wing twist angle (correction amount) according to the command. , This allows for attitude and position adjustments. Status feedback: The sensor acquires the adjusted attitude and position signals in real time and feeds them back to the outer loop PID to calculate the position error. 、 Wait, and update the disturbance estimation module. Together with the value of k, they form a cascaded closed loop of outer-loop adjustment, inner-loop switching, and execution feedback; Overload protection linkage: The actuator current sensor provides real-time feedback on the load current. If the current is greater than 1.5A, an overload signal is immediately sent to the strategy switching module to temporarily reduce the amplitude of the current sub-strategy control quantity by 10%. At the same time, the outer loop PID is kept stable to avoid the cascaded architecture from collapsing due to local overload.

[0019] After in-depth processing of the actual test data, the statistical characteristics of the three control methods were obtained, as shown in Table 2. Regarding the root mean square error (RMSE), different values ​​were observed in different axis directions under each control strategy. From the table of steady-state accuracy, disturbance rejection capability, and recovery speed of different control strategies under impulse, step, and sinusoidal disturbances, it can be seen that: PID-SMC has the best disturbance rejection capability (0.9, 0.95) and recovery speed (0.95, 0.7) under impulse and step disturbances, but its control smoothness (0.4, 0.45) is the worst due to the sliding mode chattering problem, reflecting its strong suppression capability and inherent characteristics of transient disturbances; PID-NLPID has the best steady-state accuracy (0.9) under all kinds of disturbances, and its disturbance rejection capability and parameter robustness (0.8) are more balanced, indicating that the inner loop nonlinearity correction effectively improves the steady-state performance and generalization; PID-PID has the best control smoothness (0.7 - 0.85), but its disturbance rejection capability decreases significantly with the periodicity of the disturbance (0.45 under sinusoidal disturbances), reflecting the limitation of the pure linear cascade structure in adapting to complex nonlinear and periodic disturbances.

[0020] Table 2 Performance Indicators of Different Control Strategies Combination Figure 4 middle, Figure 4 (a), Figure 4 (b) Figure 4 (c) and Figure 4 (d) Comparison of dynamic position error: The position error (RMSE) test results under three disturbance scenarios are as follows: Low disturbance (k≈2, PID-PID dominant): RMSE in the x / y / z directions are 0.08m, 0.06m, and 0.10m respectively, settling time is 3.2s, and error converges to within ±2% steady state value. Compared with pure PID, the tracking accuracy is improved by 8% and there is no overshoot. Medium disturbance (k≈7, PID-NLPID dominant): RMSE in the x direction is reduced to 0.068m, and the error fluctuation in the y / z direction is ≤0.05m, which is suitable for the disturbance characteristics of periodic gusts, and the steady-state accuracy reaches 0.9. High perturbation (k≈18, PID-SMC dominant): z-direction RMSE 0.078m, maximum attitude deviation under perturbation from Down to The recovery time is 4.5s, which is 35% shorter than PID-PID, and the anti-interference ability reaches 0.95.

[0021] Controlling smoothness: Combining Figure 5 Analysis of control input characteristics, testing control input amplitude and chattering: Low-disturbance switching: When PID-PID is dominant, the control input amplitude is ≤0.6V, and the fluctuation amplitude is reduced by 60% compared with PID-SMC. The actuator current is stable at 0.8-1.0A, with no obvious mechanical vibration and smooth control effect. High-disturbance switching: When PID-SMC is dominant, chattering is suppressed by the tanh boundary layer, and the input chattering amplitude is controlled to be ≤0.4V; During the transition phase: when switching from PID-PID to PID-NLPID, the rate of change of the control quantity is ≤0.1V / s, with no obvious impact, indicating that the control can still be smooth during the switching strategy, verifying the disturbance-free effect of dynamic weight fusion.

[0022] Combination Figure 6 middle Figure 6 (a) Figure 6 (b) Figure 6 (c) Figure 6 (d) Figure 6 (e) Figure 6 (f) (Phase space and phase trajectory under different K* values), the system stability characteristics in actual testing are as follows: Low disturbance (K*=1): The system phase space is a regular compact sphere and the phase trajectory is a dense ellipse, indicating that the state is stable and there is no attitude shift after 1 hour of continuous operation; Medium perturbation (K*=10): Phase points are locally dispersed but not chaotic; the density of phase trajectory ellipses decreases slightly; the system still maintains stable attitude error ≤ ; High disturbance (K*=20): Although the phase points are extended, the overall structure is regular, the phase trajectory profile is controllable, and the phase returns to the target attitude within 4.5 s after the disturbance disappears, without oscillation.

[0023] Referring to Figure 1, Figure 3 , Figure 5 Control input characteristics and Figure 6 Phase space and phase trajectory; the essential breakthrough of this invention lies in: abandoning the limitation of traditional flapping-wing aircraft's single strategy being difficult to adapt to all scenarios, and quantifying the disturbance intensity with the K* value ( Figure 6 The K* values ​​of 1, 10, and 20 correspond to low, medium, and high disturbances, respectively. This replaces the traditional empirical classification and fundamentally solves the core contradiction of wasted resources for low disturbances and insufficient anti-disturbance for high disturbances by using a new mode with a fixed outer loop PID main loop and dynamic switching of three sub-strategies in the inner loop.

[0024] In summary, this invention provides core technical support for the stable operation of micro flapping-wing aircraft in multiple scenarios, and can also provide a reusable cascaded architecture paradigm for the control design of highly nonlinear and multi-disturbance systems, possessing significant theoretical innovation value and practical application prospects.

Claims

1. A cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture, characterized in that, Includes the following steps: S1. Select a three-section foldable bionic flapping-wing aircraft as the controlled object; S2. Based on the controlled object, construct a cascaded control framework with classical PID control as the outer loop main loop and PID control, nonlinear PID control and sliding film control as the inner loop secondary loop. S3. Construct an extended state observer (ESO) to estimate the controlled object in real time, for Provides a basis for calculation and disturbance compensation; The extended state observer (ESO) expression is as follows: In the formula, Indicates the estimated angle of attack. ; Indicates the estimated rate of change of angle of attack ; Indicates the estimated value of aerodynamic disturbance. ; , and These represent the gains of the first observer, the second observer, and the third observer, respectively. This indicates the sensor feedback signal; Represents the control matrix; Indicates control input; Aerodynamic disturbance estimates The expression is as follows: ; set up The estimation error is ≤5%. Value calculation accuracy ≤3%; S4, based on Calculation results are used to design adaptive switching logic weight coefficients; The basis The calculation results and the design of adaptive switching logic weight coefficients include: introducing dynamic weight coefficients. , and These correspond to PID, nonlinear PID, and sliding mode control (SMC) sub-strategies, respectively, satisfying... ; The expression for calculating the weighting coefficients of the inner-loop PID is: ; The expression for calculating the weighting coefficients of a nonlinear PID controller is as follows: ; The formula for calculating the weighting coefficient of SMC is: - ; S5. Based on the adaptive switching logic weight coefficient, generate the total control command and complete the construction of the cascade control switching method for flapping-wing aircraft; The expression for the master control command is as follows: In the formula, Indicates outer ring Inner Ring Control output; Indicates outer ring Inner Ring Control output; Indicates outer ring Inner ring synovial control Control output; , and These represent the weighting coefficients corresponding to the PID, nonlinear PID, and sliding membrane control (SMC) sub-strategies, respectively.

2. The cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture according to claim 1, characterized in that, The control equation expression for the classical PID control as the outer loop master loop is as follows: In the formula, Indicates the expected roll angle; Indicates the desired pitch angle; Indicates the desired yaw angle; express The orientation and position error is expressed as: , express The orientation and position error is expressed as: , express The orientation and position error is expressed as: ,in, , and Indicates a reference position. Indicates the actual direction; , and They represent Position loop proportional gain in direction, set the position loop proportional gain ; , and They represent Position loop integral gain in direction, set the position loop integral gain. ; , and They represent Position loop differential gain in direction, setting the position loop differential gain ; For the outer loop, i.e., the loop control part of the position loop, for The parameters for the three-way channel are set, including: 、 、 ; 、 、 ; 、 、 。 3. The cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture according to claim 1, characterized in that, In the cascaded control framework with PID control, nonlinear PID control, and sliding mode control as the inner loop sub-loops, the attitude loop control expression of PID control is as follows: In the formula, Indicates the roll channel control torque; Indicates the pitch control torque; Indicates the yaw channel control torque; The roll angle error is expressed as... , The pitch angle error is expressed as: ; The yaw angle error is expressed as: ,in, , and These represent the desired roll angle, desired pitch angle, and desired yaw angle, respectively. Indicates the roll angle. Indicates pitch angle, Indicates the yaw angle; , and These represent the attitude loop proportional gains for roll, pitch, and yaw angles, respectively. , and These represent the attitude loop integral gains for roll angle, pitch angle, and yaw angle, respectively. , and These represent the attitude loop differential gains for roll angle, pitch angle, and yaw angle, respectively. Introducing a multi-channel coupling compensation term, expressed as: ,in, This represents the original desired roll angle, with 0.3 and 0.2 being specified coupling coefficients to compensate for the interference of position errors in the y and z directions on the x channel; express Orientation and position error; express Orientation and position error; The inner loop PID control parameters are set as follows: The x and z direction channels are set with the same control parameters, which are: Set the parameter range for the x and z direction channels as follows: , , ; The control parameters for the y-direction channel are: the attitude loop proportional gain on the y-direction channel. Attitude loop integral gain in the y-direction channel Attitude loop differential gain in the y-direction channel .

4. The cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture according to claim 3, characterized in that, In the cascaded control framework with PID control, nonlinear PID control, and sliding mode control as inner loop sub-loops, the design expression for nonlinear PID control includes: The inner channel pitch uses the control law of the inner loop PID control loop to ensure stability; The nonlinear control torque is obtained based on the inner channel roll control law, and its expression is as follows: In the formula, This indicates the nonlinear control torque of the roll angle channel; This indicates the nonlinear roll angle proportional gain; Indicates roll angle error; This represents the nonlinear roll angle integral gain; This represents the nonlinear saturation term of the integral term. Represents the hyperbolic tangent function; Indicates the parameters of the saturation function; This represents the nonlinear roll angle differential gain; Indicates the nonlinear correction coefficient; The nonlinear control torque is obtained based on the inner channel, i.e., the yaw angle control law: In the formula, This indicates the nonlinear control torque of the yaw angle channel; This represents the nonlinear yaw angle proportional gain; Indicates yaw angle error; This represents the nonlinear yaw angle integral gain; This represents the nonlinear saturation term of the integral term; Indicates the parameters of the saturation function; This represents the nonlinear yaw angle differential gain; Indicates the nonlinear correction coefficient; The nonlinear control torque is obtained by introducing the ESO disturbance compensation term. : In the formula, This represents the basic moment of roll angle calculated by nonlinear PID control. This represents the aerodynamic disturbance of the roll angle estimated by ESO; Set nonlinear correction coefficient The value is 0.8 in the x and z direction channels; a nonlinear correction coefficient is set. In the y-direction channel The gain is 0.75; the nonlinear proportional gain of the roll and yaw angle channels in the inner-loop nonlinear PID control is also 0.

75. Both are set to 0.75, with nonlinear integral gain for roll and yaw channels. Both are set to 4, with nonlinear differential gain for roll and yaw angle channels. Take 0.75 for all.

5. The cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture according to claim 1, characterized in that, In the cascaded control framework with PID control, nonlinear PID control, and sliding mode control as the inner loop sub-loop, the sliding mode control (SMC) design includes: The synovial surface is defined as: ,in, Represents the function of the sliding surface of the roll channel; Indicates roll angle error; Indicates the parameters of the synovial surface; The exponential law of convergence is defined as: ,in, Indicates the rate of change of the synovial surface area; Represents the law of convergence; This represents the coefficient of the convergence law exponent. The expression for the control torque obtained from the control law is as follows: In the formula, Indicates the roll channel control torque; Indicates the moment of inertia of the roll axis; Indicates the desired roll rate; Indicates the parameters of the synovial surface; Indicates roll angle error; Represents the law of convergence; Represents the function of the sliding surface of the roll channel; Indicates the boundary layer thickness; This represents the coefficient of the convergence law exponent. Represents the angular velocity vector; Represents the moment of inertia matrix; Represents the angular velocity vector matrix; Indicates the estimated disturbance value; Represents the hyperbolic tangent function; Energy Coupling Correction: To ensure multi-channel energy coupling correction, considering flapping wing energy consumption and control parameters, a dynamic weighting coefficient is introduced, and the control torque is corrected as follows: , ,in, Indicates the SMC basic control torque. Represents dynamic weighting coefficients; flapping frequency ∈ ; The inner loop SMC control parameters are set as follows: The x and z channels are tuned with the same control parameters, and the sliding surface parameters are also used. Approach Law The coefficient of the approach law exponent term Boundary layer thickness Suppressing chatter; Y-channel control parameters, slid surface parameters Approach Law The coefficient of the exponential term of the approach law Boundary layer .

6. The cascaded control switching method for flapping-wing aircraft based on disturbance quantization and PID architecture according to claim 1, characterized in that, In order to ensure stability during the switching process, the Lyapunov function is used to monitor system stability in real time, and the Lyapunov function is specified to be less than or equal to zero.

Citation Information

Patent Citations

  • Model-free quadrotor unmanned aerial vehicle trajectory tracking controller based on RPD-SMC and RISE, and method

    CN108445766A

  • Self-adaptive PID (Proportion Integration Differentiation) hydraulic creeping formwork synchronous control method and system

    CN118534755A