Betalight 3.3 and Kalman filter (BiQuad+FIR2 to be precise) situation
Betaflight 3.3 RC1
Betaflight is at the end of next release cycle. Betaflight 3.3 RC1 has been released only 2 days ago and that brought us a (not) Kalman filter! Long story short:
- Raceflight was using Kalman (Fast Kalman Filter - FKF)
- RS2K left RF and brought FKF to Betalight
- Betaflight did some changes and replaced Fast Kalman with BiQuad + FIR2 (Finite Response Filter) equivalent that gives more less the same results (same response) as Fast Kalman
Unfortunately, someone at Betaflight forgot that users will want to use it and the process of setting up (not) Kalman filter (I will be calling this (not)Kalman because it just sounds better than BiQuad+FIR2 and says all you need to know) is at least stupid. The filter is gyro update frequency dependent and instead of setting up a cutoff frequency, it has to be tuned using gyro_filter_q
and gyro_filter_r
CLI settings that you have to guess or compute somewhere else. How awesome is that!
Anyhow, to make life a little easier I prepared an online (not) Kalman filter calculator for Betaflight 3.3 RC1 that allows computing filter cutoff frequency based on gyro_filter_q
, gyro_filter_r
and gyro update frequency.
Also, here is a YouTube video that shows how to use it and configure BF 3.3 RC1 for (not) Kalman:
And another video that shares some more general thoughts on the topic:
Betaflight 3.3 RC2 (upcoming)
Ah yes, there was a small change... Looks like BF guys decided to make life a little easier for us after all, and sped up a small but very important change. Starting from Betaflight 3.3 RC2 (or today's nightly build), (not) Kalman filter cutoff frequency can be specified with a single CLI setting: gyro_stage2_lowpass_hz
. More than that, gyro_filter_q
and gyro_filter_r
are removed and not available at all.
I always knew that developers need some proper motivation, but why could this not be like that from the beginning?
I'm Paweł Spychalski and I do things. Mainly software development, FPV drones and amateur cinematography. Here are my YouTube channels: