New Tuning Instructions Wiki Page

I’ve updated my spreadsheet for the new name ATC_ANG_YAW_P in 4.3+ versions of Arducopter
It was ACRO_YAW_P in 4.2 and below, but still does exactly the same function.

I’ve added in some Harmonic Notch Filter suggestions, with the frequency based very roughly on prop size. The INS_HNTCH_REF is also an estimation in this case, without knowing your exact hover frequency and minimum frequency.

Feel free to offer suggestions of your own or point out errors

2 Likes

@xfacta
is this spreadsheet what feeds the initial param thing in MP

Yes in a way - the formulas are used.
The spreadsheet was converted to a plugin you could run in MissionPlanner, then became the Initial Parameters section you see now.

1 Like

Do I recall that @Eosbandi generated the plug-in from your data Shawn? Good time to rev it with your updates!

1 Like

Yes, I was going to ping @Eosbandi to update the Initial Params section with the new ATC_ANG_YAW_P name for 4.3+ and also the new INS_ACCEL_FILTER value.

I’m not sure about my HNOTCH suggestions yet, probably leave them out unless people think it’d be a good idea to have them in Initial Params.

1 Like

I’m quite busy, but put on the list to update the initial parama calc. (right before killing the dragon)

1 Like

Thanks Andras - take your time
The two changes are not critical.

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: