Recommended logging settings for HNTCH and ACRO PID tuning

I’ve been struggling to find the best LOG_BITMASK settings to perform iterative ACRO tuning on a 7 inch quad.

I’ve followed the AC docs and some AC tuning guide videos and posts to successfully make it through initial HNTCH setup and successful completion of several rounds of AUTOTUNE, but now I want to focus solely on manually refining my ACRO mode PID tune while still being able to monitor the vibration data on the quad so that I can examine it in the Filter Review webtool and keep tabs on my filtering effectiveness (refining along the way as I crank up PIDs in ACRO).

The problem I’m having right now is that:

  1. With my current configuration, I appear to be dropping lots (>1M in a flight) of messages and this appears to be corrupting the data to the point where Filter Review tool won’t even open the file
  2. I’m not certain which messages I really should be logging to achieve my goals based on my FW/HW combination

My quad’s configuration is as follows:

7" frame running 6S
Kakute H7 V1.3 FC
AC V4.5.2
SCHD_LOOP_RATE 800hz
Logging to microSD card: Samsung Evo Plus 32GB (rated “U3”)
Log bitmask 180221
image

If someone can sanity check my rationale I’d appreciate it:
-Fast Attitude: need this for manual PID tuning
-Medium Attitude: not needed/superseded by Fast Attitude
-GPS: I would like to keep this on if possible - I think it’s low overhead
-System Performance: ditto
-CTUN: ditto
-NTUN: ditto
-RC input: need this for PID tuning
-Compass: I would like to keep this on if possible - I think it’s low overhead
-Camera: N/A for me
-Motors: need this for PID tuning
-Mission Commands: I would like to keep this on if possible - I think it’s low overhead
-Optical Flow: ditto
-PID - need this for pid tuning
-Video Stabilization - don’t need

The ones that I’m struggling with are:
-Fast Harmonic Notch Logging - I’m not exactly sure what this is used for - sounds like I need it for HNTCH tuning but I don’t recall seeing any of the docs/guides recommending it being enabled.

-IMU vs Fast IMU vs Raw IMU - this is where I get a little confused, I just want to be able to monitor vibrations with enough precision to perform HNTCH and other filter tuning/refinement. I think I need Raw IMU for the Filter Review Tool but do I also need Fast IMU to generate relevant PID tuning plots? I’m guessing regular IMU is redundant at that point.

Couple related questions:
It sounds like in-flight FFTs deprecated at this point, is there any point turning that on for my use case?
IMU batch sampler sounds like it is deprecated at this point? (i.e. INS_LOG_BAT stuff should all be disabled?)

Any guidance is appreciated!

Neither are deprecated, both work well. It depends what you are trying to achieve.

Your logging setup looks good to me. The setting that will be filling up your logs is fast attitude - and if you have PIDs on as well that rate will double. To get a good tune you do need to be able to see these however. I tend to run with fast atittude, PIDs and batch sampling on - that works well, does not tend to drop messages and lets you see what you want to see. Raw IMU will fill up your logs even quicker - wouldn’t necessarily recommend that at the same time as fast attitude. One thing to check is your log buffer size. You should be able to have that at 200k.

One way you can monitor vibration data on an H7 is to switch on in-flight FFT and use it to monitor post-filter - FFT_OPTIONS = 3 - I use this on several of my quads to make sure the motor noise is not getting through. You will get a warning in the OSD if the motor noise is above 40dB.

1 Like

Thank you Andy, I’ll give that a shot. All very helpful info, much appreciated!

I’m guessing one of the autotune videos you watched was mine?

I did your entire 7" build video series, as well as the 2023 Autotune playlist. Lots of great info!

1 Like

As a first step, I tried backing things off to LOG_BITMASK defaults and just enabling INS_RAW_LOG_OPT bitmask 9. The resulting hardware report looked great (only 1 dropped message) but the Filter Review tool found something it didn’t like. Any ideas or should I just submit a bug report?

image

Log looks ok, @iampete is pretty responsive so send him the log

Update:

Taking @andyp1per 's advice and enabling only the following LOG_BITMASK options I am now able to get the manual PID tuning data and filter refinement vibe data I needed without an excessive drop rate of log messages:

LOG_BITMASK = 180223

  • All default log bitmask options left enabled
  • Fast Attitude enabled
  • PID enabled

Related logging params:

  • I have all raw IMU logging disabled
    INS_RAW_LOG_OPT = 0
  • I have IMU batch logging enabled:
    INS_LOG_BAT_MASK = 1
    INS_LOG_BAT_OPTIONS = 4

This appears to be right on the brink of my H7’s performance limits as I am dropping some log messages, but the filter plots appear largely intact (no holes in the spectrograph) and I wasn’t able to do that previously using Raw IMU data.

1 Like