本帖最后由 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 FirmwareToday, 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 LooptimeFC 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 DelayGyro 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. 我们将在下面讨论关于电调协议的一些东西。
|