5iMX宗旨:分享遥控模型兴趣爱好

5iMX.com 我爱模型 玩家论坛 ——专业遥控模型和无人机玩家论坛(玩模型就上我爱模型,创始于2003年)
查看: 2474|回复: 7
打印 上一主题 下一主题

[普及贴]What FC Looptime should I use?(如何使用Looptime)

[复制链接]
跳转到指定楼层
楼主
发表于 2017-2-6 13:12 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 austhuhui 于 2017-2-6 13:17 编辑

2017年的第一帖,在这里祝大家新年快乐,身体健康,永不炸“鸡”
写在前面:我也是穿越新手,玩F3飞控调参的时候总会听到“Looptime”这个词。估计很多人和我一样,只知道跟着大神后面设置就对了,然而并不知道到底什么?或者说知其然而不知其所以然。有幸看到国外论坛的一篇帖子,就是关于Looptime的介绍!好吧,本人英文水平有限,我跟着学习,大家也一起看看
申明:本文转自国外论坛,非本人原创,如有侵权请告知如有翻译错误请告知




This article explains what FC looptime is and whether faster looptime is really better for your quadcopter. We’ll also talk about gyro update frequency and ESC refresh rate which is equally important.
文章首先介绍什么是飞控的Looptime,更快的Looptime对于你的穿越机是否更有利。当然,我们还将讨论关于,陀螺仪的更新频率和电调的刷新频率是否对穿越机同样重要。

With all the new technologies coming out every day in the FPV multirotor world, it can be hard to keep up. “Looptime”, “Gyro update frequency” and “ESC protocols” are one of the concepts being discussed a lot in the FPV community, with regards to the FC and ESC.
穿越机发展迅猛,每天都有新的技术出来,我们很难跟的上。“飞控刷新时间”、“陀螺仪更新频率” 和 “电调刷新频率” 依然在FPV版块、飞控版块、电调版块被讨论的很多。


The Different Looptime in Firmware
Today, the four main flight controller firmware for mini quad’s are Betaflight, Cleanflight,Raceflight, and the KISS FC firmware. Each firmware can run at a different looptime.
这段时间,主要流行四个关于四轴的飞控固件包括BF,CF,RF,KF。每一个固件都可以在不同的Looptime下运行。

Some of these firmware can operate from 1kHz (1000us looptime) all the way up to 8kHz (125us looptime). (There are already experiments of running 32kHz in Raceflight)
For example in Betaflight, it’s possible to run 8kHz on it, while the KISS FC just runs 1kHz (1000us) looptime.
某些固件可以在1KHZ到8KHZ范围下运行(32KHZ的频率在RF固件中已经得到验证)。举个例子来说,KISS飞控只支持1KHZ,但是在BF固件中,飞控却有可能在8KHZ下运行。


PID Looptime Isn’t Everything
The reason we want higher looptime is to reduce latency in the system. But there are so many other factors that can cause delay in the system than just PID loops:
我们获得更高的Looptime是为了减少系统的延时。当然,还有其他一些原因导致系统延迟:

  • Gyro Delay (built-in Low-Pass filter) 陀螺仪延迟(内置低通滤波器)
  • FC PID Looptime 飞控PID的刷新时间
  • ESC Protocol (Refresh Rate) 电调协议(刷新率)
  • Motor/Propeller Physical Delay (change of RPM) 电机/螺旋桨的物理延迟
  • Moment of inertia of a quadcopter (related to frame and weight distribution) 四轴的惯性延迟(机架形状和重量分布)
  • FPV camera/VTX delay (if you fly FPV) FPV摄像头/发射的延迟(如果你玩FPV)

This article focuses on the first 3 things in the above list, as they can be improved right in the software.
本文着重强调上面提到的前三点。


FC Looptime
FC looptime is basically the time it takes the FC to complete a PID loop. For looptime 1KHz, the delay would be 1ms.
飞控的刷新时间是指飞控完成整个PID调整的过程。Looptime=1KHZ,即延迟为1MS。

  • 1000us = 1khz
  • 500us = 2khz
  • 250us = 4khz
  • 125us = 8khz



FC Looptime
FC looptime is basically the time it takes the FC to complete a PID loop. For looptime 1KHz, the delay would be 1ms.
  • 1000us = 1khz
  • 500us = 2khz
  • 250us = 4khz
  • 125us = 8khz

Most F3 FC these days can run up to 8KHz looptime, while some F4 can reach 32KHz.
就比如大家使用最多的F3飞控,可以高达8KHZ,而一些F4飞控却可以到达32KHZ.


Gyro Delay
Gyro has some physical delay when sampling data, but it’s so small we can normally ignore (some micro seconds). However they have built-in low pass filter that can cause much noticeable delay. They are designed to reduce the amount of noise that can get through above certain frequency. For example in Cleanflight, the default Gyro_LPF is 42Hz, which would introduce a 4.8ms delay. That’s nearly 5 times as much as the PID loop delay!!
陀螺仪在采样时带来的一些物理延迟很小,我们基本可以忽略。但是其内置的低通滤波器可以引起明显的延迟。低通滤波器的设计是为了减少某些特定频率的通过。举例来说,在CF参数中Gyro_LPF=42KHZ,相当于引入了4.8MS的延迟。那可是将近5倍的飞控Looptime啊!!

It seems to be a no brainer to use higher Gyro LPF frequency right? But the downside is it might give you a noiser quad that is hard to tune.
有些人可能就认为要加大陀螺仪的频率,但是这样带来的将是一个复杂难调的四轴。

GYRO LPF
DELAY
256Hz
0.98ms
188Hz
1.98ms
98Hz
2.8ms
42Hz
4.8ms
20Hz
8.3ms
10Hz
13.4ms
5Hz
18.6ms




ESC Protocol
ESC Protocol determines how fast the ESC signals are sent from the FC. Standard PWM has a delay of 2ms, and that’s twice of much delay as 1KHz looptime. Therefore by improving what ESC protocol you use would give a very noticeable improvement on your quad’s flight performance.
电调的协议决定飞控发送的信号有多快。标准的PWM信号有2MS的延迟,那可是两倍的Looptime啊(在1KHZ下)。因此,改善你电调的协议,将会给你的四轴飞行性能上带来有很大的改善。

Oneshot125 (250us) and Oneshot42 are invented later on to reduce the latency. More recently Multishot are implemented which can reduce delay down to 25us. And only a couple of months ago (Sep 2016), D-shot was born which is even faster and more reliable than Multishot!
Oneshot125 协议和 Oneshot42协议的出现减少了延时。最近出来的Multishot协议将延迟降到了25us。2016年的9月,D-shot 协议的问世将会使得延时更短。

We will discuss these ESC protocols in a bit more detail below.
我们将在下面讨论关于电调协议的一些东西。









欢迎继续阅读楼主其他信息

沙发
 楼主| 发表于 2017-2-6 13:16 | 只看该作者
本帖最后由 austhuhui 于 2017-2-8 17:31 编辑

这几天比较忙,有时间把翻译补上,有能力的自己看。
原帖地址:https://oscarliang.com/best-looptime-flight-controller/
需要fan qiang!


3
发表于 2017-2-6 13:44 | 只看该作者

4
发表于 2017-2-6 15:09 | 只看该作者
感谢楼主分享
5
发表于 2017-2-6 15:45 | 只看该作者
F4也可以开双32K吗?好像bf官方说只有F7才行。。还要配合mcu6500
来自苹果客户端来自苹果客户端
6
发表于 2017-2-8 16:40 | 只看该作者
感谢楼主分享!
方便的话直接附上原贴链接!谢谢!
7
 楼主| 发表于 2017-2-8 17:31 | 只看该作者
gedove 发表于 2017-2-8 16:40
感谢楼主分享!
方便的话直接附上原贴链接!谢谢!

https://oscarliang.com/best-looptime-flight-controller/
查收!

8
发表于 2017-2-9 09:32 | 只看该作者
收到,万分感谢!
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

关闭

【站内推荐】上一条 /1 下一条

快速回复 返回顶部 返回列表