QuadPlane too many notches (solved sort of)

I’m trying to tune my VT-Bird QuadPlane tilt-rotor running ArduPilot 4.4.0. I am finding there are a number of harmonic notches and running the filter review tool (thanks @peterbarker - well actually @iampete sorry mate!), I think I want to run 2 notch filters with about 3 harmonics. I guess this is a very noisy plane.

But when I try to set this up I get “Config Error: Too Many notches”. This is the parameters I tried to set, which gives a really smooth IMU spectrogram on the Filter Review Tool:

INS_HNTCH_ENABLE = 1
INS_HNTCH_MODE = 1 Throttle
INS_HNTCH_FREQ = 58
INS_HNTCH_BW = 26
INS_HNTCH_ATT = 40
INS_HNTCH_REF = 0.23
INS_HNTCH_FM_RAT = 1
INS_HNTCH_HMNCS = 15
INS_HNTCH_OPTS = 22

INS_HNTCH2_ENABLE = 1
INS_HNTC2_MODE = 1 Throttle
INS_HNTC2_FREQ = 80
INS_HNTC2_BW = 40
INS_HNTC2_ATT = 4
INS_HNTC2_REF = 0.32
INS_HNTC2_FM_RAT = 1
INS_HNTC2_HMNCS = 7
INS_HNTC2_OPTS = 22

This is the log I ran it on (I selected the last long flight at the end).

Any suggestions on notch filter setup that will work without throwing this “Config Error”?

[PS: Peter - perhaps the filter tool could warn if the proposed parameters are going to have this problem?]

Ok - sort of solved. I had “EnableOnAllIMUS” selected in INS_HNTCH_OPTS. I deselected this and reduced the number of harmonics on each filter and the error went away, but does this mean I can only filter 1 IMU on this (noisy) plane?

This is my parameters now:

INS_HNTCH_ENABLE = 1
INS_HNTCH_MODE = 1 Throttle
INS_HNTCH_FREQ = 58
INS_HNTCH_BW = 26
INS_HNTCH_ATT = 40
INS_HNTCH_REF = 0.23
INS_HNTCH_FM_RAT = 1
INS_HNTCH_HMNCS = 3
INS_HNTCH_OPTS = 22
INS_HNTCH2_ENABLE = 1
INS_HNTC2_MODE = 1 Throttle

INS_HNTC2_FREQ = 80
INS_HNTC2_BW = 40
INS_HNTC2_ATT = 4
INS_HNTC2_REF = 0.32
INS_HNTC2_FM_RAT = 1
INS_HNTC2_HMNCS = 3
INS_HNTC2_OPTS = 22

You really need to get rid of all the wobbling about before you can get a good clean picture of the noise. Roll and yaw gains both need to be reduced. Because of the averaging in the FFT the more “steady state” you can make the vehicle the sharper your peaks will be and the easier they will be to target. Then once you have them nicely targeted you can do a nice “flying about” flight to make sure there tracking OK.

The reason your having trouble is the motors are in two groups due to a pitch imbalance. The GC is a bit too far forward so the front motors are having to work a bit harder. Sometimes this in unavoidable on a quad-plane due to the GC requirements of fixed wing flight. At some point we will add support for per-motor throttle based tracking which will deal with this split much better, in the mean time two smaller throttle notches, as you have setup, is better then using one with a massive bandwidth trying to cover both peaks.

1 Like

Thanks so much for looking at it Pete. Yes my CG is set for fixed wing flight, not sure how to avoid that.

My roll and pitch gains are set by VTOL-quicktune.lua, but I could reduce them for sure. I tried manually reducing the yaw gains which didn’t help much, but as soon as I run the quicktune again they jump back up.

Confusingly the VTOL-quicktune.md file recommends to do the harmonic not filtering first.

First you should setup harmonic notch filtering using the guide in the ArduPilot wiki. This tuning system relies on you already having reduced gyro noise using the harmonic notch filter. It will fail if your noise is too high.

It seems too be a bit chicken-and-egg, no?

No, you don’t have to have a good tune to do the filter flight, it just needs to not be oscillating all over the place. If you cant get a stable hover turn down the gains until you can. Then do the filter flight. Then you can tune the vehicle and see how far you can increase those gains again.

Filtering and tuning are not really two separate things, its all part of the same process.

1 Like