Thread Tools
This thread is privately moderated by RS2K, who may elect to delete unwanted replies.
Dec 28, 2017, 02:16 PM
Woohoo!
RS2K's Avatar
Download

BF+K / Testing the Fast Kalman filter on Betaflight


This thread is for the discussion of testing the Fast Kalman filter on Betaflight.

The source code can be found here:
https://github.com/rs2k/betaflight/
https://github.com/apocolipse/betaflight/

All previously released binaries can be found here:
https://www.dropbox.com/sh/lw5fuu72g...j0SoBH1Pa?dl=0

The latest and recommended binaries can be found here (2018-02-17 3.3 RC1 build with FKF bugfix applied by Apocolipse).
https://www.dropbox.com/sh/pkppzfo7l...WCTQeJAka?dl=0


Thanks to Apocolipse for adding the bugfix PR to get the FKF correctly re-enabled. It looks like the FKF was mistaken blocked by an wrongly placed #ifdef and it was recently discovered the BQRC2 filter does not work as intended.

To enable the FKF with the most recent bin:
Code:
set gyro_use_32khz = ON
set cpu_overclock = ON
set gyro_stage2_filter_type = FKF
set gyro_filter_q = 400
set gyro_filter_r = 88
Last edited by RS2K; Feb 18, 2018 at 05:57 PM.
Sign up now
to remove ads between posts
Dec 28, 2017, 02:17 PM
Woohoo!
RS2K's Avatar
Extra notes:

Quote:
Originally Posted by denovich
Tuning notes:

#0: every quad is different. The defaults are conservative enough for most noisy quads (so they don’t flyaway or burst into flames on arm). But for 6” biprops, you might need to go lower still (Q=90). For noise-free quads you will want to go lighter on filtering.



#1: if you are not having noise problems with default Q settings try raising that number. Some quads can go very high (>6000) but start slow in increments of 100 or so until you have a feel for how it’s reacting. The higher the Q the more direct it will feel... up to a point.

#2: the Kalman can be deceptively good. Double check with BBlog to make sure you are filtering “enough”. You can have a quad that sounds really good (little to no propwash, MTOs etc) but feels loose if you don’t have enough filtering. Look for very active dterm traces in your BBlog.

#3: FIR lpf on Dterm. Seems to be more effective in suppressing dterm ringing/oscillations. Use same cut-off frequency, but you’ll probably need to increase D by 5-10pts compared to the same tune on Biquad or PT1.

BF LUA for BF+K (Thanks @papayou):

Place the contents of the attatched rar file to the SD card. It will add the missing files only. Do not rename the folder.

Last edited by RS2K; Dec 30, 2017 at 11:22 AM.
Dec 28, 2017, 02:20 PM
Registered User
Therotak's Avatar
Thanks for all your work here!

Kalman flys amazing

Just some small test videos:

8K Gyro:

This is what happens when you give your quad to a pro pilot (4 min 24 sec)



Fury - Kakute F4 - 8/8k - Kalamn q750 r60 - dshot1200 (2 min 49 sec)


32k Gyro on another quad:

BF 3.3 - 32khz Gyro /16 khz PID / 32khz PWM - Kalman - Revolt - Multishot on _32 EsC (3 min 7 sec)
Last edited by Therotak; Jan 09, 2018 at 01:28 AM.
Dec 28, 2017, 02:53 PM
N'a qu'un oeil
papayou's Avatar
Subscribe
Dec 28, 2017, 03:13 PM
Registered User
Looking forward to giving this a test drive.
Dec 28, 2017, 03:37 PM
Registered User
thanks K - you da man
Dec 28, 2017, 04:13 PM
Registered User
Quote:
Originally Posted by Therotak
Thanks for all your work here!

Kalman flys amazing

Just some small test videos:

8K Gyro:

https://www.youtube.com/watch?v=hMBUQyYqPlc

32k Gyro on another quad:

https://www.youtube.com/watch?v=fjq1...ature=youtu.be

Both videos are amazingly smooth! In your experience, are there significant differences in performance(handling, feel, prop wash, oscilations, etc.) between 8k/32k? Thanks in advance.
Dec 28, 2017, 04:56 PM
Registered User
Looking forward to trying the above settings RS2K. I managed to get 6 packs in earlier today with what I thought would be good settings. Used the FIR filter instead of PT1. Matek boards don't seem to overclock so I ran 32/16 on D600 _32. Flew pretty good but had to detune slightly to my 8k/8k D1200 3.2.X tune.

Initial Betaflight 3.3 Kalman Filter Testing - 32k/16kDShot600 - Halo Archon - Matek F405 (3 min 42 sec)
Dec 28, 2017, 05:34 PM
Registered User
SadLeprechaun's Avatar
Quote:
Originally Posted by jologs
Both videos are amazingly smooth! In your experience, are there significant differences in performance(handling, feel, prop wash, oscilations, etc.) between 8k/32k? Thanks in advance.
I would love to know more on this, as well as have perhaps some details on the new filter, its settings, etc
Dec 28, 2017, 07:42 PM
Registered User
So is multishot recommended?
Dec 28, 2017, 08:24 PM
Midwest Gravity Tester
chickenhawk725's Avatar
Looking forward to tryin this. Thanks for your work RS2K!!
Dec 28, 2017, 09:37 PM
Registered User
Awesome work . the latest and recommended binaries fly great. I can wait to fly the expect a new release.
Dec 28, 2017, 11:56 PM
Registered User
Therotak's Avatar
Quote:
Originally Posted by jologs
Both videos are amazingly smooth! In your experience, are there significant differences in performance(handling, feel, prop wash, oscilations, etc.) between 8k/32k? Thanks in advance.
Hey,

Hard to say. The sound is differentyso is the black box log. Feeling I can't really tell. I had other test user reporting the can feel it, but I cannot really to be honest. Maybe it's my style of flying or just the thing I hat I am not 18 anymore 😄

It's planed to have a blind test once a mate got some time to see if it's feelable.
Dec 29, 2017, 12:12 AM
Registered User
Quote:
Originally Posted by Therotak
Hey,

Hard to say. The sound is differentyso is the black box log. Feeling I can't really tell. I had other test user reporting the can feel it, but I cannot really to be honest. Maybe it's my style of flying or just the thing I hat I am not 18 anymore 😄

It's planed to have a blind test once a mate got some time to see if it's feelable.
Thank you so much for the feedback. I thought BF+KF works great only on 32k gyro. I'll try this on my Cyclone board which is 8K gyro capable only.
Dec 29, 2017, 02:14 AM
Registered User
Therotak's Avatar
no Kalman works on every setting

Todays quick test... wow it was hard to judge the hight over the snow, even in HD its hard.

But still amazing flying quad.

That video ist just demo, no public "nice" footage with tricks and stuff, just my one pack on the way to the office

GOPR3200 (3 min 32 sec)


Quick Reply
Message:
Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Kalman filtering tutorial dentompie UAV - Unmanned Aerial Vehicles 39 Feb 05, 2018 03:45 PM
Discussion Kalman filter guru? reedchristiansen UAV - Unmanned Aerial Vehicles 9 Jan 01, 2007 09:01 AM
Question What are the inputs for Kalman filter ? mikel UAV - Unmanned Aerial Vehicles 5 Oct 31, 2006 02:57 AM