With upcoming Betaflight 3.2, we will be given a new, outstanding, new feature: dynamic filtering. An belive me, it was worth waiting for Betaflight 3.2 only to get it. I do not care much about other changes that happened with version 3.2 but dynamic filtering it the thing! In this post I will explain, in simple words, what is dynamic filtering and how to enable it.
The problem of noise
Gyro has a nasty tendency to pick up a lot of noise. Vibrations. After all, there are a lot of things that can vibrate (motors, propellers) and resonate (frame). Without a good way to filter all that noise out, our racers would not fly as good as they fly now. And you would be replacing motors and ESCs even more often. I you want to know more about gyro noise sources and filtering, please watch my Gyroscope and filtering series on YouTube.
I will be very honest: until very recently I did not really understood how PID controller’s Dterm really works. Yes, something with dampening, something with “looking into future”, bla bla bla. But the reason for not understanding was because I was overthinking it. There is no “magic” only simple mathematics and few basic concepts which I will now explain.
Setpoint is the value which we request from our system. In case of multirotors, PID setpoint will be a rotation speed around axis given in degrees per second [dps]. Setpoint 0 means we do not want to rotate (keep current attitude) and setpoint 200 means we want to rotate at 200dps
Measurement the value that represents actual state of the system measured by some kind of sensor. In our case, it will be the gyroscope and rotation-around-axis speed measured in degrees per second
Error the difference between Setpoint and Measurement computed as Error = Setpoint – Measurement. In our case, when Error is above 0, that means drone is rotating too slow and should speed up. If Error is below 0, drone is rotating too fast and should slow down
Is it worth to soft mount flight controller? Are gyro pads I recommended here better than rubber standoffs? I feel that they are better, but I do not have any solid data to prove it. So I can only tell, that I find them better and that is all. But, I can answer the question is it worth to soft mount flight controller at all. The answer is YES and here is a proof…
The problem of twitching motors
After I updated my 5" racer to stronger motors (EMAX RS2205S 2300KV over RS2205 2300KV) I noticed something very very irritating: twitching motors. When the throttle was in more less middle position or after rapid throttle change, twitching from motors was very audible. Quad was flyable, but performance was very low. I had to reduce yaw P gain by more than 50% not to see those twitches in FPV footage!
Blackbox log revealed the truth: from time to time, the strong vibration was getting into yaw gyro traces. I also localized the source of those twitches: stronger motors with more torque and higher radial acceleration were able to shake the whole machine when the frequency was close to the resonance frequency of the frame.
Did you ever wondered what is the most popular flight controller? Hardware I mean. I can tell you 🙂 OK, maybe it will not be a full truth, since I have data only from INAV, but assuming that distribution for Betaflight and Cleanflight is similar, we might know what is happening…
Important, this is not the number of boards flashed with INAV, but rather number of times a board was connected to Configurator!
This counts TARGET software name, not retail name. For example, all clones of Naze32 will be counted as Naze32
I will not try to proof if you should soft mount a flight controller on a racing drone. I will only say, that few months ago I was against it, but lately I changed my mind. Stronger motors, stronger magnets, more torque, more speed and out of nowhere, incredible amount of noise can be fed into gyro signal. Sure, this is not required, but motors, ESCs and battery will thank you when you soft mount flight controller. Less, noise, less restrictive filtering required, lower signal delay, better flight performance.
In most places over internet you can find either a rubber standoff or double sided tape solution. Sure, that works, but there is something better. Dedicated, double sided adhesive, vibration dampening pads. There are many sources, and many names. I'm using Sekisui brand. Check ebay, Amazon, HobbyKing. Look for gyro pads, vibration pads, vibration dampening. I do not want to advertise any particular seller, so you are on your own here.
Thanks to Airbot I got my hands on a new STM32 F7 flight controller: Omnibus F7.
Before we proceed, small note.
I am a huge fan of F7 flight controllers. In a year, they will be a main line of high performance FC on the market. STM32F7 with built-in UART inverters solves so many issues STM32 F4 boards are facing. But, F7 are not there yet. Currently available boards uses STM32F745 CPU in 100 pin packages. They are just too big to comfortably fit 36x36mm format. You place CPU and most of the PCB is taken. Than means there is no space left for either connectors or OSD for example. What we are waiting are FC with STM32F722 in 64pin package!
STM32F7 CPU family present in newest, experimental, flight controllers like AnyFC F7 (as well as upcoming AnyFC M7 with smaller STM32F722) simplifies many things. For example, comparing to F4 boards, SmartPort or S.Bus connection is extremely simple and can be done on any free UART. No more hardware hacks, external inverters and other “special” ways of doing things.
It’s super simple again, and here is how to do it in Betaflight (Cleanflight 2.x) and INAV
The only required hardware is a cable to connect SmartPort enabled receiver with free UART port on F7 board. This will work on X8R, X6R, X4R, X4RSB, XSR and any other. The trick is to connect S.Port pin with UART TX pin only.