New Tuning Instructions Wiki Page

Perhaps it would be a good idea to add INS_LOG_BAT_MASK,1 to the parameter list for the plug-in. Configuring the notch filter is the next step typically anyway. That note could be added also.

Do you think that could be an issue for F405 users if it’s turned on too early? The wiki mentions there could be issues with compass calibrations.

I’ve actually got it in the spreadsheet under a HNOTCH Suggested section now, but we could definitely move it to being one of the things that are always selected

Some of these are based on prop size (and estimated RPM → frequency) and MOT_THST_HOVER (which will rely on someone putting in their own learned value)
image
These are probably “Alpha” at the moment and the frequency calc could be better.
:slight_smile: It’s all a bit of an “exercise” though and might have doubtful value.

I think I recall hearing about that problem once but don’t recall the exact circumstance. Link to that wiki entry? Curious now.

https://ardupilot.org/copter/docs/common-imu-batchsampling.html#post-configuration-confirmation-flight-and-post-flight-analysis

There’s a note at the end of the post flight analysis.

Yea, I suppose as long as F4’s hang around it would be best to simply note that Notch Filter Configuration is the next step and link to the Wiki page.

1 Like

I’ve updated my spreadsheet, v1.9 on the tab title.

  • Throttle-based HNOTCH section (added some time ago)
  • RPM-based HNOTCH section
  • New MOT_THST_EXPO calculation in the copter 4.0+ section
  • Old MOT_THST_EXPO calc is still in the copter 3.6 section for comparison
  • Added a couple of the newer Solid State batteries

Some of these calcs are approximations and will need adjustment based on real data in your logs.

The new MOT_THST_EXPO is based on some early/incomplete results from the expo LUA script, but a key feature is limiting the expo value more for very large props. The new value should be close enough and safe to use.
The old formula is in the 3.6 section for comparison. Keep in mind the old formula was somewhat arbitrary, so it wasnt necessarily “right” but just an approximation. This makes the new formula a slightly different approximation rather than right or wrong.

FYI
@Leonardthall @dkemxr @andyp1per @iampete @Eosbandi
If this iteration proves useful, I’ll work on getting some of the updates into MissionPlanner Initial Params.

2 Likes

@xfacta how difficult is to have ArduPilot calculate the notch filter and then set the parameters automatically after a hover?

Something similar to auto tune but for notch filter. After setting the initial parameters do a hover and it’s done. No need to get logs, plot charts, FFT, etc… I’m just suggesting.

The live in-flight FFT works well for small props, can have a bit of trouble identifying the target frequency for larger props, but has definitely worked well.
Start with these params below, but there are more to tune the effectiveness of the FFT

FFT_ENABLE,1
FFT_MINHZ,30  //  depends on your props of course
INS_HNTCH_ENABLE,1
INS_HNTCH_MODE,4
INS_HNTCH_REF,1
INS_HNTCH_FREQ,40
INS_HNTCH_BW,20
INS_HNTCH_OPTS,2

Pay close attention to FFT_MINHZ and INS_HNTCH_FREQ , INS_HNTCH_BW , they must be lower than the target (hover) frequency. FREQ and BW scale up with the dynamic input - they dont scale down.
There is definitely still some analysis to be performed to check everything is working as planned - it’s not a blind “set and forget” thing.

The in-flight FFT would suit a copter with frequently changing payloads, you wouldnt need to manually configure anything (once there’s a good base tune for attitude control)

If you have a flight controller with slightly limited resources, once the FFT data is gathered and HNOTCH confirmed working, you could change it to use throttle-based notch and disable FFT.

The new Filter Review Tool can go quite a few steps further than the ordinary FFT graphs in MissionPlanner, Apart from confirming a working or non-working filter, you can make changes for the “what if” effect.

There is also a scripted method that is more like what you are hinting at, but I havent used it in a long time and the output/effectiveness has faded from memory.

INS_LOG_BAT_OPT,2
Perform a hover test as per usual
mavfft_isb.py --notch-params
Required params notified by the program output.

There is a feature in 4.4 that will do this for you. Calculate throttle based harmonic notch using FFT averaging by andyp1per · Pull Request #20230 · ArduPilot/ardupilot · GitHub

1 Like

Hi Andy, great feature! Works also on F4 1MB FC?

You would have to enable using the custom build server since FFT is not enabled by default

1 Like

Yes you are right it can be done with CFW. I’ll do some testing asap…thanks :slight_smile: