Filter Review Tool Tests

Hi all,

I’ve been very interested in the Arducopter Filter Review tool recently. (Thanks @iampete ) I went through the blog post here new FFT Filter setup and review web tool and watched the video, and I’m trying to make sure I’m understanding how to use the tool correctly and am interpreting my changes between flights correctly as well. I don’t have as much background in engineering and programming as many of you here, so I’m struggling to understand parts of the tool. I think what I understand the least is what these graphs below are telling me.

I used this tool to try to improve the filter settings on a HolyBro S500 quadcopter with a Matek F405SE FC. Here is a folder with two logs - one as I had the aircraft setup before, and then after using the filter tool and making some changes (notably adding a second notch) a flight with the new settings. I know the F405 is fairly at the limit of its abilities, but I did also run the logs through the Ardupilot Hardware Checker tool to try to see if the CPU and/or memory usage changed drastically between the two logs. To my observations, it didn’t seem to be much of a change, but I could be missing something.

Would anyone be willing to look these over and help me understand the tools better? Thanks in advance.

You are using Dshot so I would 1st suggest you use the Bdshot version of firmware so as to drive the Notch Filter with ESC RPM rather than throttle. Then configure the Notch Filter settings accordingly.

But, with the Throttle reference I don’t think you need 2 Notch filters configured and you don’t have a reference set. Use Estimated Post Filter and choose settings to experiment with. I think you will find one notch will do.

These work. Enter them and look at Estimated Post Filter. You want the minimum filter to do the job.
Notch
And use Linear amplitude scale if you are not already.

Thanks for the help, @dkemxr . Last time I tried the bdshot firmware I think the CPU was hanging, so downloading logs would reboot the copter. It seems to work better now on 4.4.0, but I’m getting this pop-up on the filter tool when I load in one of the 4.4 logs. Do you have any ideas why it would give me this result? Here’s a link to the logs - just two flights with the same settings. During the first flight I had an EKF failsafe, which was concerning - I haven’t looked into that yet, but second flight no issue there.
https://usu-my.sharepoint.com/:f:/g/personal/a01416515_aggies_usu_edu/EmDJLYNaaaNKlyBKzSav-MIBu8k8HaFirPaC19A2sa-k7A?e=6p3V03

Ah, wait - am I getting this pop-up in the filter tool because I set INS_HNTCH_REF to “1” enabling dynamic updates on the notches?

Because you didn’t configure the outputs for Bdshot with SERVO_BLH_BDMASK so no RPM data.
After correcting this and making another test flight review the log file and see if there is data in the ESC field.

No, 1 is correct.

Ahh, that makes sense. Unfortunately I tried that, and now I’m getting all kinds of internal and watchdog errors, especially when I try to download logs. Maybe it’s just too much for the F405?

Set this to 0 INS_HNTCH_OPTS
Many people use Bdshot and ESC RPM based notch filters on F405’s. I don’t use F405’s any longer but it should work fine.

Okay, that would switch from notch per motor to average over the four motors, right?

I tried that, but am getting a lot of “stuck logger”/logging failed messages now, and it will fail to arm, unfortunately. I tried decreasing the logging rate with some of the parameters here, but it doesn’t seem to be resolving it.
https://ardupilot.org/copter/docs/common-downloading-and-analyzing-data-logs-in-mission-planner.html#logging-parameters

Set all those back to default. I don’t see how any of the parameters set would generate this error. You seem to be moving from one error to the next on what is a routine configuration. Re-format the Sd card and try again.

Okay, will do. Thank you for the help!

Do you have any recommendations on SD card type or formatting? I’ve used the one I’m using now loads of times before, but maybe there is a better option. It’s just a basic 4GB card, I probably formatted it as FAT, though I can’t remember for sure.

I typically buy Sandisk Ultra cards. They are so cheap these days, a 32G card is <$10. Not that you need that capacity. FAT32 is fine.
BTW-Are using a custom firmware build with Wind Estimation enabled? Or something else?

Okay, I’ll try that with the SD card. I was/am using a custom firmware for the 405 that has some of the Benewake lidar sensors for terrain and proximity avoidance enabled along with an i2C display.

Time to update to H7 based board. Did you disable some other things?

Definitely time for an H7, haha! We used these up until last year in a class I teach, now we use H7s, but I still have some students coming through with the F405s, so I’m trying to see what I can squeeze out of them until those students age out. I did disable unneeded items, but I’ve always wondered how close to the “edge” I actually am with these.

So I got a new microSD card, formatted it to FAT32 and tried it with the SERVO_BLH_BDMASK turned off, and all is well - the aircraft arms, I can read logs, etc. But after switching the SERVO_BLH_BDMASK on and a reboot, when I try to arm I get all kinds of errors - AP Logger Stuck Thread, Bad Compass, and Baro not healthy. I’m wondering, are these all i2C devices? Is there some kind of i2c overload happening when I turn on the bdshot parameter?

I went ahead and went back to the throttle based notch and disabled bshot in the parameters. I used your settings here, although I forgot to turn on the 2nd harmonic. It looks pretty nice now, thank you for the settings. I’ll have to try the bdshot on a different aircraft with the same FC, but without all the rangefinders and i2C display, etc and see if I can get it working there.

What board are you trying this on? Just curious.

Hi @Allister! This is on a Matek F405SE that we used a year or so ago before it was discontinued and I decided to move to an H7.

Can either of you help me understand what these graphs show? Is the gray area the lag that is induced by the filter(s)?