I’ve been procrastinating for a long time. All my 5” freestyle quads and even my 4” micro Kestrel have the hardware to support Betaflight’s RPM filter. All you need is an F4 flight controller and, until recently, blheli_32 ESCs. Using the RPM filter with Betaflight 4.0 requires a bit of extra tinkering, but it didn’t seem like I big deal.
The trouble was that my quads were all flying great. I worked hard tuning Betaflight 4.0. I wanted to reduce propwash oscillation as much as I could, and I think I did a pretty good job. I turned off as many filters as I could. I loosened up the remaining filters a bit to improve latency. Then I pushed my D-term as far as I could.
I thought it was flying great. When we flew with Alex Vanover, I asked him to fly my quad, and he didn’t seem to think it needed much tuning. If I thought it was flying great, and the fastest drone racing pilot in the world thought it was flying well, why would I mess with it?
- Spending an Afternoon Flying with Alex Vanover
- Open-Source Falcon Miniquad Frame: Road to Version 1.0
- My 4-Inch Kestrel – Can I Keep It Under 250 Grams?
I messed with it
Mark Spatz at UAV Tech posted a video about the settings you should start with if you want to try flying Betaflight 4.1 with the RPM filter. Everything is straight forward now. When I set it up, I had to download test firmware for my ESCs, but bidirectional Dshot support is currently in the official blheli_32 release, so you won’t have to worry about that.
I’m flying an iFlight TwinG F7 flight controller. It has two identical gyros, but one of those gyros is rotated 90 degrees. Betaflight reads both gyros and takes the average of those readings. This buys you a few decibels of noise filtering with no increase in latency. Betaflight 4.0 could not perform this sensor fusion while using the RPM filter. Betaflight 4.1 can!
I updated one of my quads to Betaflight 4.1. I set up the RPM filter according to Mark Spatz’s instructions. I set up my rates, but I left the PID settings alone. Then I took my quad to the golf course.
I can’t believe that it flies better!
We’re running out of improvements at this point. When I upgraded from Cleanflight to Betaflight, it was like a quantum leap forward. You’d say things like, “Holy potatoes! I can’t believe it stops smoothly after a snap roll!”
Then I upgraded from Betaflight 3.3 on an Kakute F4 to Butterflight on a Helio Spring. The difference wasn’t as dramatic, but I will say this is the first time I had a quad that could handle propwash well.
I recorded my impression of flying the Betaflight 4.1 RPM filter for the first time! pic.twitter.com/yiYxsEP98R— Pat Regan (@patsheadcom) September 26, 2019
Upgrading from the defunct Helio board to my dual-gyro F7 flight controller and Betaflight 4.0 was a nice upgrade. Tuning became a little easier and propwash handling improved. There are also a lot of nice quality of life updates, too.
NOTE: If you have a Helio Spring, you should check out EmuFlight. They’re doing a good job resurrecting Butterflight and the Helio’s IMU-F. Don’t let your old hardware go to waste!
Our quads are already flying amazingly well—nearly perfectly. Can it really get much better?
Yes. Betaflight 4.1 with the RPM filter flies noticeably better, but it is the sort of improvement that you’re only going to notice when you’re pushing things to the edge of what Betaflight 4.0 can handle.
You can always fly around propwash oscillations. When I flew that first pack with the RPM filter, I did my very best to do the opposite. I tried to bring out as much propwash as I could!
I did the move where you fly forward, cut the throttle, then do a 180 degree turn. Then I’d blip the throttle pretty hard and go back the other way. My 4.0 tune did well at this, and so did the RPM filter. No surprises there.
This is the closest I can come to science without actually doing science. These are the same quad on different days. First snippet is the setup I've been flying for months. The second is Betaflight 4.1 RC5 with the RPM filter. pic.twitter.com/qa7XxMrJWo— Pat Regan (@patsheadcom) September 27, 2019
NOTE: I don’t have great before-and-after comparison of my well tuned quad. I tested on my backup quad, which was much closer to running stock Betaflight 4.0 settings. That’s my backup quad in the Tweet above.
Then I started popping up over trees to do some power loops and S-turns. This is the time when I’m most likely to be bummed out about propwash in my GoPro footage. You know when you don’t quite line up the move like you should, and you just can’t hit the throttle until the very last moment. I did my best to simulate those moments.
I’d line up my exit under the tree, fall with zero throttle until the last possible moment, then I’d punch the throttle harder than I should. I’ve practiced doing this smoothly for so long that it is difficult to do it poorly on purpose, but when I did, I couldn’t see any oscillations in my goggles, and it sounded smooth to my ears.
You could see some oscillation in the GoPro footage, but it is extremely brief.
This is the part where I’d usually just paste in a dump from the Betaflight command line. I don’t want to do that this time. I think it is important to understand a little about what you’re changing.
There are plenty of videos showing you what to do. If that’s the way you prefer to ingest your knowledge, you should check out UAV Tech’s RPM filter guide or [Joshua Bardwell’s RPM filter setup guide][wdrpm]. These are the places where I got my information!
On the configuration tab in the Betaflight Configurator, you need to enable bidirectional Dshot. On my F7 flight controller, I’m running a 4K/4K PID loop. You can probably get away with an 8K/8K PID loop, and I’m going to experiment with this, but for now, you should play it safe.
NOTE: I forgot to mention motor poles. If you’re flying 2306, 2205, 2206, or 2207 motors, then the default of 14 is most likely correct. You can check the specs of your motor on the manufacturer’s or vendor’s website, or you can count the magnets. If you’re setting this up on a micro, 14 is likely to be incorrect!
I’ve learned that at if you have bidirectonal Dshot enabled in Betaflight, and your ESC firmware doesn’t support it, then Betaflight will refuse to communicate with your ESCs. At least it shouldn’t go bananas on you if you fail to correctly upgrade your ESC firmware!
You’ll need to be running blheli_32 version 32.7 or newer. You should also be able to use the JESC firmware on blheli_s ESCs, but I haven’t tested this.
Betaflight defaults to using three layers of RPM filtering. I believe that gives you a total of 12 notch filters. One for each motor at three different resonance frequencies. I was happy with how my quad flew with one level of RPM filters, but Joshua Bardwell talked me into trying the default of three.
You should set the width of your dynamic filter to 0. With the default of 8, you will be running a pair of dynamic filters that are 4% or 8% above and below the target frequency. We don’t need that with the RPM filter. When you set this to zero, you will remove one of those dynamic filters and decrease your latency.
I’m running my dynamic notch filter with a Q-factor of 250. Joshua Bardwell recommended starting at 200. The higher the number, the narrower the filter, and the lower the latency. I’m unsure how I got up to 250, but it is working fine for me, so I’m sticking to it.
NOTE: I didn’t adjust any of the checkbox or numbers in the boxes above the RPM filter and below the sliders. These adjust themselves as you move the sliders up and down!
You should lower the dynamic filter’s minimum frequency to 90 hz.
The rest of my filter tuning consisted solely of moving the two sliders farther and farther to the right. I’d move then two or three clicks, go outside, and fly around for a minute. If my motors were still cool, I’d move the sliders again.
I have both sliders maxed out, and my motors barely get warm.
Who should upgrade?
If your quad is flying just fine, and you’re not complaining about propwash oscillation, you should probably just keep doing whatever it is that you’re doing. It is difficult to get better at flying if you keep changing your setup. If you’re happy, just keep flying.
I was exploring a gap in a tree, attempted to S-turn through the gap, but I forgot about the gazebo! pic.twitter.com/zbZh6wsshF— Pat Regan (@patsheadcom) October 7, 2019
What if your quad doesn’t fly so well? Do you have weird twitches and vibrations? Maybe you just have a failing component that just has to be replaced, and no amount of software will be able to make it fly right. Then again, maybe Betaflight 4.1 and the RPM filter will help out your problematic quad.
Or maybe you’ve been running Betaflight 3.4 or 3.5 for a long, long time. You’ve been hearing good things about Betaflight 4.0, but you just weren’t ready to put in the effort to upgrade your flight controllers. I’d say now is the time to upgrade, especially if you’re going to be able to use the RPM filter with your hardware.
I’ve been thinking about upgrading to a prerelease of Betaflight 4.1 for months. I wish I did it sooner. There’s not much excuse to wait now, because as I was writing this blog post, Betaflight 4.1 was officially released!
What do you think? Am I going to have to buy the JESC firmware for my Kestrels? Have you been running the RPM filter for a while? Were you using it with Betaflight 4.0, and did your quad’s flight characteristics improve even more when you upgraded to Betaflight 4.1? Do you also think it is time for everyone to start upgrading? Let me know in the comments, or stop by [the Butter, What?! Discord server][bwd] to chat with me about it!