Iāve been doing more testing lately, and studying other peoples logs too and this has served to validate the Tuning Guide provided by @Leonardthall, and the formulas for setting initial values. Iāve seen a lot of examples lately of multirotors that seem to be resisting attempts at better tuning
For the purposes of discussion here, Iām going to ignore those cases where people have neglected to read the documentation and Tuning Guide, and quite often havenāt even set the most basic parameters to suit their aircraft.
I want to summarise the initial tuning process and issues Iāve seen. Itās not my intention to regurgitate the Tuning Guide. We assume all the mandatory setup and calibrations are done.
The Situation
The spreadsheet, MissionPlanner plug-in (thanks @Eosbandi) and Tuning guide all recommend setting INS_GYRO_FILTER=20 at least initially. Because the documentation says to lower this (and to lower INS_ACCEL_FILTER) to combat vibrations, of course thatās what we end up doing in a lot of cases.
This leads to other filter valuesā¦
ATC_RAT_PIT_FLTD
ATC_RAT_PIT_FLTT
ATC_RAT_RLL_FLTD
ATC_RAT_RLL_FLTT
ATC_RAT_YAW_FLTT
ā¦being set too low, even though they are still half of INS_GYRO_FILTER as per the doco.
The Effect
- The multirotor has poor attitude control and pitch/roll do not track desired pitch/roll well
- Autotune lowers PIDs and barely makes a difference compared to the starting point
- Manually changing PIDs even has limited effect (within reason)
Assuming you got past the wobbles and lowing the PIDs a bit, attitude control still looks like this even after Autotune and you cant seem to get it better
You can see small movements that the flight controller doesnāt seem to be able to compensate for. These very small movements in pitch, roll and yaw can even be visible.
Mistake
The mistake is three fold.
- Not doing enough to eliminate vibrations.
- Leaving INS_GYRO_FILTER=20 or going lower when itās not warranted (and see associated FLT* settings too), usually because we undervalued the first point - vibrations.
- Expecting all the software and settings to do the hard work of eliminating the vibrations for us -> well yes it tries to, but go back to the first point and try more to eliminate vibrations and other physical issues!
I definitely want to emphasise the importance of anything you can do to eliminate vibrations.
- On vibrations the documentation says:
- Vibration levels below 30m/s/s are normally acceptable. Levels above 30m/s/s may have problems and levels above 60m/s/s nearly always have problems with position or altitude hold
- That tends to lead us into a false sense of security, seeing our vibrations always in the 15 to 30 range.
- I think we could revise that to:
-
vibrations over 15m/s/s should be avoided at all costs.
- Time spent fixing vibrations will be rewarded by less tuning time and a better tuning result.
Also these filters can easily be set too low and it starts to affect attitude control. Probably a value of 12 should be considered a minimum. Data and thoughts welcome.
ATC_RAT_PIT_FLTD
ATC_RAT_PIT_FLTT
ATC_RAT_RLL_FLTD
ATC_RAT_RLL_FLTT
ATC_RAT_YAW_FLTT
As you increase INS_GYRO_FILTER above 20, if possible, then keep FLT* values increasing at INS_GYRO_FILTER/2 (as per the Guide)
The Fix
- Eliminate vibrations as much as possible within the first couple of test flights so you donāt waste time endlessly tuning without achieving desired results.
- Set INS_GYRO_FILTER and itās associated FLT* parameters as per the Tuning Guide/spreadsheet/MP plug-in. Set INS_GYRO_FILTER=20 or slightly lower if this value really is correct for your multirotor, but otherwise avoid going too low.
- Implement BLHeli telemetry if possible - this makes the Harmonic Notch filter so much easier to set up.
- Configure the Harmonic Notch filter (thanks @andyp1per) as soon as possible, this will aid tuning and Autotune.
Of course smaller multirotors, say prop size 10 inches or less, probably need to start tuning with the calculated value of INS_GYRO_FILTER from the outset.
Larger craft can use INS_GYRO_FILTER=20 for initial test flights - gathering logs and checking vibrations, stability and so on. If the Tuning Guide and spreadsheet suggest a different value for INS_GYRO_FILTER then use it once the aircraft is flyable.
INS_GYRO_FILTER and itās associated FLT* parameters are there to filter out noise, setting them too low filters out actual frame movement.
The Summary
- Do Not skip any configuration and tuning steps
- Eliminate vibrations
- Set INS_GYRO_FILTER and itās associated FLT* parameters as high as practical for your multirotor - dont get trapped into continually lowering them when thereās probably a physical issue to be fixed
- Aside from physical or electrical issues, you multirotor should fly reasonably without changing PIDs too much
As always, please respond with your own thoughts, data and corrections.
There could be some work to be done around defining lower limits for the filters, and I could adjust the spreadsheet formulas to match. We might need a bit more data for larger prop sizes to support that.