Filtering Vibration to Get a Better Tune

Hi,

I was able to make an FFT happen after updating the software!

The last time I used autotune on my large frame hexarotor, it produced a tune that was okay it althold but made the copter unstable in poshold. I am going to try again with a higher autotune_aggr value, but read that filtering vibration first can help too.

I am new to adding filters so wondering if anyone can comment on a conservative notch filter to add for these FFT results.

My hexa is 6ft wide and wieghs about 30lbs. Should I also consider bumping up ATC_Input_TC from 0.15 ā†’ 0.2?

Attached is the log from the FFT flight.

Log

Any help is greatly appreciated.

Itā€™s important to review the RC outputā€™s and Vibratiobn levels and the logging you have enabled doesnā€™t collect it. Change to default:
LOG_BITMASK,176126
Set these for the Notch Filter:
INS_HNTCH_ENABLE,1 (then refresh)
INS_HNTCH_ATT,40
INS_HNTCH_BW,35
INS_HNTCH_FM_RAT,0.75
INS_HNTCH_FREQ,70
INS_HNTCH_HMNCS,3
INS_HNTCH_MODE,1
INS_HNTCH_OPTS,0
INS_HNTCH_REF,0.15

And these:
INS_ACCEL_FILTER,10
PSC_ACCZ_I,0.3
PSC_ACCZ_P,0.15

Then perform another AltHold flight to check the filter results and motor outputs.
You really donā€™t want an Auto Aggression below .75 I would set it back to default (0.10) and try that.

I have an x500v2 with Pixhawk 6x, I have flown a flight to notch filter but not sure how to apply the results, I have significant vibrations that I think I need to address first, but thought it was worth asking if the notch filter could be applied. I have been following the ā€œhow to tune almostā€¦ guideā€ unfortunately I was not able to cool the flight controller for IMU calibrationā€¦but am prepared to remove it from the frame if required.
The parameters here: New standard tunes for Holybro QAV250 and X500v2 by andyp1per Ā· Pull Request #25717 Ā· ArduPilot/ardupilot Ā· GitHub
I have not applied, however now I have found them, I will apply before my next tune.

Below is my notch filter flight

Disable the 2nd notch and set these parameters:

Resulting in:

Pre

Post:

1 Like

Each frame is different, even if they are from the same make and model. You probably didnā€™t assemble it exactly like Andy Piper did, so you do need to (re)tune it for it to work like it should.

The blog post explains how to do it from scratch, but if I understand it correctly you ignored the instructions and just loaded a parameter file from Andy Piper.
That might workā€¦ Or not.

Hi amilcarlucas,
Thanks for your reply, Just to clarify I have not applied the x500v2 Parameters listed above - However I believe, and I may be wrong they are there as a basic tune, if not why have them at all? I feel my x500 is stable enough now to proceed with an auto tune - please correct me if the log says otherwise.
Other then being unable to cool the flight controller I have followed and applied the how toā€¦ guide.
Iā€™m grateful Dave was able to provide some parameters to clean up the harmonic notch, and have gone over the whole frame to tighten and remove any other sources of vibration.

Thankyou so much Dave, I really didnā€™t think this log was of much use.

Happy to help Steven. You will notice this is estimated from these parameters so you should make another hover flight to check actual. But itā€™s usually pretty close to being right.

1 Like

Log file 23/3/24
I have had the opportunity to get out and refly, I have side tracked a little bit, however I wanted to eliminate what I thought was excessive vibration throughout in the VIBE. So I went through and tidied up the cabling tightened and secured everything and I donā€™t think it made much difference. I did a quick tune today via the lua (first time user) and was happy with that, and have applied the corrections given by Dave for harmonic Notch. Post he Quick tune Yaw is rock solid, however Pitch and roll are soft (drift a bit on release and the feeling the altitude sinks a little in forward flight). I can however ā€˜feelā€™ the difference, not to mention the increased confidence as tuning progresses. I will get out next time with mag Cal and autotune to get back on track. I have attached the log for today I would appreciate any guidance with Vibe and any further Harmonic notch that may need to be applied kindly. Steve

The file is locked. You need to remove the password.

Thanks Allister,

I believe the password is now removed

Kindly
Steve

Filter looks good.

I ran the file through the online Magfit and got these numbers for calibration. Both compasses looked but benefit from running current offset (COMPASS_MOT)

COMPASS_OFS_X,99.94135301903044
COMPASS_OFS_Y,-4.835519981104709
COMPASS_OFS_Z,50.250378311671156
COMPASS_DIA_X,1.0117537800791392
COMPASS_DIA_Y,0.9818517132775418
COMPASS_DIA_Z,1.0063945066433189
COMPASS_ODI_X,-0.003602344416835102
COMPASS_ODI_Y,0.040688781800220064
COMPASS_ODI_Z,-0.058146142788499756
COMPASS_MOT_X,-1.985606683577201
COMPASS_MOT_Y,1.410246026038831
COMPASS_MOT_Z,2.523027101894699
COMPASS_SCALE,1.0191731682386649
COMPASS_ORIENT,6
COMPASS_OFS2_X,78.41447421779984
COMPASS_OFS2_Y,43.206690925386646
COMPASS_OFS2_Z,-107.95031784010868
COMPASS_DIA2_X,0.9958673701718391
COMPASS_DIA2_Y,0.9943710827410694
COMPASS_DIA2_Z,1.0097615470870918
COMPASS_ODI2_X,-0.012584929405016348
COMPASS_ODI2_Y,0.008887379839260376
COMPASS_ODI2_Z,0.0033807649604197395
COMPASS_MOT2_X,1.1396117243532504
COMPASS_MOT2_Y,1.3249293227740089
COMPASS_MOT2_Z,-4.580542271601371
COMPASS_SCALE2,0.9986165464255835
COMPASS_ORIENT2,0
COMPASS_MOTCT,2

The quick tune looks functional. I can see why you say itā€™s a bit soft, but I donā€™t see any oscillations or really crazy overshoots. So Iā€™d say that worked.

The bad news is the vibrations. Before you go any further is you need to sort out the vibrations. Thereā€™s still something going on. Itā€™s on all axis, and thereā€™s even a few clipping events on one of the IMUs. Have a good look at the props. Maybe oneā€™s got some damage or a bend or something. double check all the arms are tight. The X500V2 has an option for a landing gear leg brace that you can 3D print. Check your landing gear isnā€™t flopping around too much, and if you have access to a printer maybe consider one of those braces. How did you mount the GPS? Make sure that isnā€™t loose or moving.

So my biggest suggestion is to sort out the vibrations before you do anything else. Everything else looks like itā€™s on track.

Thank you Allister,
Every nut is secure, the legs are tight and rigid, I have found the STL file for the leg brace, and have sent it to our 3D printing dept forā€¦printing. Propellers OK. They are original level and undamaged. The GPS is mounted off the sub tray attached to the rods - I have added some hot glue inside the GPS mount where I previously had tape to keep tension. I donā€™t have room to move it on top without affecting the lateral CofG. I have added some dampening to the battery tray, and relocated my antenna off the arms. I will do a flight over the long weekend before the brace comes back to see if I have made any improvement.

To confirm - I should update my parameter values to the ones listed in your post above?

Kindly

Steve

Here is the log from todays flight - unfortunately I donā€™t think there is much to report. I turned on COMPASS_MOTCT,2 before this flight. I didnā€™t change the rest of the compass parameters because I removed and reset the compass to try and remove some of the vibration, unfortunately none of the changes I applied yesterday seem to have made any difference to the Vibe. So at least Iā€™ll have a single point of change when the leg brace goes on. Iā€™ll run the new file through the magfit to see what changes to make.


These figures are way different from what Allister provided above, Although I reset the compass, it was for all apparent purposes in exactly the same spot, and orientation.

  1. List item

Given the scale of some of the values in the compass calibration, that doesnā€™t look too different than what I gave you. Either way, if you moved compass, even if you think itā€™s in the same place the values will change a bit. No big deal to run Magfit again. Looking at the log I would certainly use the numbers you calculated and try again.

The vibrations are still there, but letā€™s see if the brace helps.

2 Likes