Large Quad tune

Hi,

My team is currently tuning a large quad. We are using 24inch props at 12s., all up weight around 10kg. We have done all of the initial setup and guessed at a base hnotch. We are soon going to attempt a quicktune, however after reviewing recent flight I noticed that the Fundamental notch and harmonic 2 are on top of each other instead of the second notch being where it should be. Any suggestions or thoughts on the tune so far?

The ESC entries report propeller rotation at about 40Hz (which 2500 RPM roughly maps to):

This is consistent with the noise profile:

From this I conclude that the props are indeed rotating at 40ish Hz. Your notch filter is currently configured as follows:

  • INS_HNTCH_FREQ = 80
  • INS_HNTCH_BW = 40
  • INS_HNTCH_FM_RAT = 1
  • INS_HNTCH_HMNCS = 7

which effectively cuts off filtering at 80Hz, because INS_HNTCH_FREQ is a base frequency that is used as a lower bound for dynamic filtering. The plot above indeed shows that 40Hz noise is not filtered out.

For historic reasons, the exact meanings of these parameters is not exactly obvious. INS_HNTCH_FM_RAT is a recent parameter that allows a quick cutting down that threshold without changing much else, but this introduces a situation where we use three parameters to configure two values in a linear way. Because INS_HNTCH_FREQ also in some contexts means hover prop frequency, this might have some sense, but I prefer to leave it at 1 and change the other two.

In short, set these values:

  • INS_HNTCH_FREQ = 30 (or maybe even lower, I tend to choose half the hover freq in my machines, because I’m a freestyle-ish flyer and often “fall” from the sky in a controlled manner). This is the lowest frequency you want your filters to work at.
  • INS_HNTCH_BW = 3, or 1/10 of INS_HNTCH_FREQ, because with four rotors the default fraction of 1/2 introduces too much phase lag. It is INS_HNTCH_FREQ / INS_HNTCH_BW that defines how sharp the filters are.

Also, from the noise profile I rather see harmonics 1, 2 and 4 rather than 1, 2, 3. You are probably using two-blade props, and 3 has almost nowhere to come from. Set INS_HNTCH_HMNCS = 11, where 11 = (1 = 2^(1-1)) + (2 = 2^(2-1)) + (8 = 2^(4-1)), actual harmonics number in bold, instead of the current 7 = 1 + 2 + 4. (Software like Mission Planner would conveniently show you a set of ticks to tick off, but sometimes it’s important to know how things are stored)

Or alternatively - as I continue thinking about it - this 140-190Hz noise might not be propeller-rotation-induced noise but rather a frame resonance (or prop blade resonance, or something like that). Part of me thinks this is the actual case, because propeller harmonics higher than the number of blades are usually quieter. In this case, elimination of the physical source would be better, and a static notch on what remains would be a good solution.

That should improve your filtering situation. (By the way, none of this is proprietary/tribal knowledge, the official documentation on filters cover this in enough detail).

Unfortunately, there is much more to improve on this machine, staring with extraordinary vibration levels, well in the 30-40s on Z:

but of course not limited to that.

2 Likes

Great explanation from Max, appreciate.
Filters can be like this:


IMO 3db bw and attenuation can be too small, 8 or 10 is good enough.
Usually crafts this size have much less prop noise, and just LPF is enough, you need to review your frame construction and FC mount to lower the overall vibrations level.
Take a look at your SCHED_LOOP_RATE, it’s too low for multirotor, change it to default 400.
PIDs P and I looks too small, also
INS_STILL_THRESH
ATC_ACCEL_*_MAX
ATC_INPUT_TC

TKOFF_THR_MAX
seems misconfigured.

LOG_BITMASK bits for “Fast IMU”, “Fast harmonic notch logging”, Both Medium and Fast Attitude
RPM1_TYPE
RPM1_ESC_MASK
are also wrong from Chris Rosser manual.

Thanks guys. I think we will go for a middle ground with hnotch bandwidth and fix the frequency. That bin was captured after removing a vibration plate. Ive attached the bin of a flight with the vibration plate. I believed that the viberation plate was causing excessive low frequency vibes and the filters did not appear to be working, so I removed it. With corrected settings do you believe the vibe plate would be beneficial from the numbers? Thanks again.

The reported vibration levels are much better now. Not sure if it reflects the overall behavior of the craft though, overdampening can also cause problems.

If judging from logs only, PIDs are too small currently, as the contributions (PIDP, PIDR, PIDY entries) are around 0.01 for pitch and half that for roll (for the current hover throttle, I would expect good ones to be at least three times larger in hover). This is also consistent with non-oscillating desired vs actual attitude angles with sloppiness up to 1.5 degrees. Tuning is required.

But what you did with INS_HNTCH_* entries is a blasphemy. From what I see, you increased attenuation to INS_HNTCH_ATT = 40, which is OK, but you also turned the multi-source off (INS_HNTCH_OPTS = 0), which is not what one does on multirotors, and all the frequency/bandwidth considerations are not even applied. You seem to have no idea what you are doing, and you also ignore reasoning of people that try to help you. That’s bad.

If you are so much new to Ardupilot that INS_HNTCH_OPTS = 0 does not look like a bad thing to you, then you have to use a step-by-step system like Methodic Configurator (Correctly configure ArduPilot for your vehicles on your first attempt | MethodicConfigurator) by @amilcarlucas.

2 Likes

That flight was recorded before the initial post, and I had forgotten to write params after settings hntch opts which was an issue. I didn’t disregard what was advised. I will attempt a new flight with all the suggested params. Thanks.

Hi, after flying another flight I was happy with vibes and filtering and was going to start pid tuning. Took off again and started having ekf issues. I am unsure why this is happening. https://drive.google.com/file/d/19_IYFCm-Qm3rtIgDjzmvNqlxAQ2P8ZQ6/view?usp=sharing

I would go back to @MaxBuzz comments about the Rate PID’s, and the ATC_ANG parameters for that matter. They are all too low for a larger craft. The Vertical Acceleration Controller gains are at default also.