ArduPilot之H743自动PID调节

1. 源由

ArduCopter可以自动通过算法来对PID进行调优,不过这里有个前提是模型噪声要比较少。

注:PID初始值会设置的比较小,因此,调整后的PID理论上会比默认的更加灵敏。

2. 涉及参数

注:这里就操作性比较强的重点参数列出来,因为这个文档并不和代码同步。如果大家发现遇到问题,请多看官网+论坛+Discord。

2.1 AUTOTUNE_*

在这里插入图片描述

2.2 RCx_OPTION

3. 自动校准

3.1 预准备

  1. 减少振动:通常默认参数软件上不会有太多问题,应该能平稳的飞行;如果有振动,请仔细检查硬件上的问题。

Reduce the vibrations in the control signals as low as possible

  1. 找个风和日丽的天气,尽量没有风,开阔的场地。

On a calm day, the heli will maintain a near driftless hover (< 1 m/s)

3.2 参数配置

  1. 设置遥控器触发

RC10_OPTION = 17 //autotune,请根据大家的遥控器进行设置

  1. 设置自动校准项目

AUTOTUNE_AXES = 7 // roll+pitch+yaw,通常15分钟左右,如果电池时间不够,请减少一次自动调整的项目,比如:仅roll+pitch,不做yaw

在这里插入图片描述

  1. 设置基准的MIN_D

AUTOTUNE_MIN_D = 0.0003 // small copter,这个就经验吧,多做实验,大家基本也就知道了。真想搞明白,请搞懂原理,熟读代码
在这里插入图片描述

  1. 设置算法调整的强度

AUTOTUNE_AGGR = 0.1 //(0.1=agressive, 0.075=medium, 0.050=weak), normally start with the default 0.1.

在这里插入图片描述

3.3 操作步骤

  1. 航模上电

Power up the controller.

  1. 切换到AltHold模式

Set the flight mode to either stabilize or AltHold (Althold recommended).

  1. 解锁,起飞

Enable motor interlock and allow rotors to complete runup.

  1. 上升到安全高度

Lift off and establish stable hover approximately 3-5 meters above the ground.

  1. 遥控触发AutoTune

Switch into AutoTune and center all sticks.

  1. AutoTune算法会自动进行校准

AutoTune will start conducting the maneuvers.

  1. AutoTune完成后,GCS/遥控器/OSD 会显示调整完成

After the tuning is complete, a message will appear in the GCS saying “AutoTune complete”.

  1. 通过模式切换,可以测试调整效果(不过一般看不太出来)

To test the settings, switch out of AutoTune and then back to AutoTune and you will be able to test the settings that were tuned.

  1. AutoTune模式下降落,解锁自动保存AutoTune参数

Once you are finished testing, descend and land in AutoTune. Once the aircraft has landed, the engine will shutdown on its own. At that point flip your motor interlock switch to disabled and disarm the aircraft.

4. 实操&总结

Mark4 Roll Pitch Yaw YawD Autotune

笔者这台Mark4电机有点问题:稍有振动噪声,详见:

【1】BetaFlight Mark4之“妖怪”声音
【2】BetaFlight Mark4之“妖怪”声音之二

参数初始值(手动)有风场地无风场地
ATC_ACCEL_P_MAX165300228225.7316101.2
ATC_ACCEL_R_MAX165300350944.3403007.5
ATC_ACCEL_Y_MAX3150043567.1743567.17
ATC_ANG_PIT_P4.524.6296934.38787
ATC_ANG_RLL_P4.53635.721
ATC_ANG_YAW_P4.513.02913.029
ATC_RAT_PIT_D0.00640.0042458910.003076027
ATC_RAT_PIT_I0.1350.12553430.1093932
ATC_RAT_PIT_P0.240.12553430.1093932
ATC_RAT_RLL_D0.00560.0024647090.00208265
ATC_RAT_RLL_I0.1350.093471630.095719
ATC_RAT_RLL_P0.210.093471630.095719
ATC_RAT_YAW_FLTE21.792431.79243
ATC_RAT_YAW_I0.0180.035504470.03550447
ATC_RAT_YAW_P0.180.35504470.3550447

最终调教出来的参数并不理想,因为手动调整的参数比自动调准的PD值更高,且并不振动,而较低的PD值,响应会差很多。

不管怎么说,这个确实是个好的功能,但是作为手动飞的情况,还是需要每个人根据自己的习惯以及喜好进行调整。

5. 参考资料

【1】ArduPilot之H743+BMI270x2+First Normal Takeoff
【2】BetaFlight Mark4之“妖怪”声音
【3】BetaFlight Mark4之“妖怪”声音之二
【4】ArduPilot: traditional-helicopter-autotune

6. 补充视频

Arducopter Tuning (AUTOTUNE, PIDs & FILTERS, FLIGHT TESTS!)

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值