高环路速率调参
通常情况下, PID 控制器在显示( LOOP),主循环速度和噪声过滤速度为半循环速率. 这意味着PID速率错误校正只能以1/loop速率发生. 对于400赫兹,这是2.5ms。 在ArduCopter 4.7以及后来,可以运行PID姿态率接近陀螺仪提供测量速度,测量速度可达4KHz,导致2.5uS率实际上是校正. 陶宁比较敏感和复杂,但对于对惯性比(非常敏捷)有较大推力的机体进行气压应用,可以产生更精确和反应更敏捷的控制.
说明:
仍在进行大量计算,导致CPU负载增加。 H冉基以何种方式进行自动驾驶是可以接受的,但F4基自动驾驶可能无法维持这种增加的负载.
设置运行 PID 速率循环,更接近于更高的陀螺仪采样率,而不是显示( LOOP):
配置
仅有两个新的设置可以让快速率姿态出现,但这些设置对其他几个设置有影响:
- 可实施的战略:
- 0: 页:1
- 1:启用动态快速速率. 在高的CPU加载时(由主循环为慢或陀螺仪样本队列填充决定),速率会降低到陀螺仪数据速率的整数二维器,直到CPU稳定. 这是尝试支持的最安全的方法.
- 当我们开始战斗时, 当我们开始时, 注意, 您必须确定您有足够的 CPU 来启用此选项或控制会被在这一方面损坏 。
- 3: Enable fixed fast rate. This is useful for testing but not usually used.
- FSTRATE_DIV: this defaults to 1 and represents the minimum fast rate gyro divisor. So a value of 2 will yield a rate loop of gyro rate / 2 (INS_GYRO_RATE / 2). This allows a fixed fast rate that is lower than the gyro rate. This parameter is can be modified in-flight.
The easiest way to try this feature is to set FSTRATE_ENABLE = 1 (Dynamic rate). If your flight controller is struggling it will reduce the attitude loop rate until normality is restored. FSTRATE_ENABLE = 2 (Fixed Rate) is not recommended until you have seen reasonable performance with dynamic rates.
One way to gain more CPU is to switch off additional IMUs using INS_ENABLE_MASK or reduce INS_GYRO_RATE. The main CPU load is from the INS and attitude control threads.
When this feature is enabled, several other settings are affected:
- SERVO_DSHOT_RATE - this represents a multiplier of the main loop rate to output to the motors. When the fast rate loop is enabled this is normally set to 1, however if the calculated rate will not exceed the gyro rate, higher values are allowed. For instance if INS_GYRO_RATE = 2(4KHz) and FSTRATE_DIV = 4 (1KHz)then values of SERVO_DSHOT_RATE up to 4(4x loop rate) are allowed.
- Fast attitude and PID logging enabled in LOG_BITMASK - setting these bits usually logs at the main loop rate, however if fast attitude is enabled these will be logged at the minimum of the fast attitude rate and 1kHz
- SCHED_LOOP_RATE - since all the heavy lifting of attitude control is being done in a separate thread, SCHED_LOOP_RATE can be run at normal values - for instance 400Hz or even less.
Tuning Setup
Its extremely important that the Notch filtering ** be setup as well as the **tuning-process-instructions be followed before tuning with this feature enabled.
- INS_GYRO_FILTER - as high as you can get without cooking your motors. Often copters have resonance around 120Hz so it is hard to get higher than this without notching out frame resonance.
- each axis'
ATC_RAT_xxx_FLTDshould be INS_GYRO_FILTER/2 on roll and pitch and INS_GYRO_FILTER/4 on yaw. This is because D is more active, lets more noise through and is more likely to cook your motors. Setting it above 0.75 * INS_GYRO_FILTER is not recommended. - each axis'
ATC_RAT_xxx_FLTTshould be at the highest rate you want the EKF or your fingers to control the copter. Values of 30Hz should be fine, but higher has diminishing returns but does not affect the tune.
【本页后半部分仍为英文原文摘录,补译中。】
译自 ArduPilot Copter「Aggressive Rate Loop Tuning」· 查看原文 · CC BY-SA 3.0
没有要显示的评论
没有要显示的评论