Well, I’d like to make some conclusion to this thread - maybe it will helpful to someone else.
Actually, I did many iterations (APM config change -> test -> results analysis) and I think that finally I made it work - it’s definitely not perfect, but it works. Most important things I’ve learned in this process IMHO are:
- You have to tune modes in order
Stabilise -> AltHold -> Loiter or Poshold and you can’t skip any of these steps
My hints for Stabilise mode tuning:
-set your logs bitmask to see useful data in flashlogs of APM, I’m using value
-if you have CPPM 450 size Heli and APM is approx. leveled with heli body, you can start tuning with AHRS values
AHRS_TRIM_X,0.08
AHRS_TRIM_Y,-0.05
to make heli fly close to level flight
-my final list of parameters for Stabilise mode tuning:
H_COL_MAX,1680
H_COL_MID,1520
H_COL_MIN,1330
RATE_PIT_D,0.0005
RATE_PIT_FF,0.02
RATE_PIT_I,0.1
RATE_PIT_IMAX,500
RATE_PIT_P,0.04
RATE_RLL_D,0.0005
RATE_RLL_FF,0.02
RATE_RLL_I,0.15
RATE_RLL_IMAX,500
RATE_RLL_P,0.03
RATE_YAW_D,0.001
RATE_YAW_FF,0.01
RATE_YAW_I,0.1
RATE_YAW_IMAX,4500
RATE_YAW_P,0.2
-please note, that there are many factors, that affect those values, so they will be most probably not the same at you
AltHold mode tuning:
-analyse dataflash logs from stabilize mode and find the throttle required to hover your heli - CTUN -> ThrOut & Alt
-set this throttle value to
THR_MID
parameter
-if the value reuqired for hovering differs too much, your heli will drop down (or jump up) when AltHold mode is activated
-set parameter
PILOT_VELZ_MAX
to value not too high for beginning (e.g. 170 cm/s), because if your heli is going down too fast, it can get to “vortex ring effect”
-if you are testing max. speed of descent (throttle/collective pitch stick down), make sure, that will not cut-off throttle (and turn off governor like in my case )
-my final list of parameters for AltHold mode tuning:
THR_MID,700
TRIM_THROTTLE,440
PILOT_VELZ_MAX,170
THR_ACCEL_D,0
THR_ACCEL_I,0.85
THR_ACCEL_IMAX,800
THR_ACCEL_P,0.425
THR_ALT_P,1
THR_DZ,100
THR_MAX,1000
THR_MIN,0
THR_RATE_P,4
Loiter & PosHold mode tuning:
-actually not finished yet, my parameters are probably far away from perfect values:
LOITER_LAT_D,0.3
LOITER_LAT_I,0.05
LOITER_LAT_IMAX,2000
LOITER_LAT_P,3
LOITER_LON_D,0.3
LOITER_LON_I,0.05
LOITER_LON_IMAX,2000
LOITER_LON_P,3
-
Try to make vibrations of heli as low as possible. Anyway, the values shown by Rob in other thread are extremely low (and really hard to achieve). Example of vibrations levels that work for me fine are attached.
-
Avoid usage of helping landing gear with balls on carbon rods - they can start to oscillate and make your heli unstable in flight. You can rather use landing gear from one-size-bigger heli (e.g. 500 landing gear for 450 size heli)
-
Use external compass placed on tailboom if you are getting bad magfield values from GPS with integrated compass (or compass integrated in flight controller).
-
Make sure that you configure position of compass correctly, otherwise you’ll get toilet-bowl effect for Loiter mode - definitely… Compare the heading with real compass heading before you test Loiter mode
This is my video of PosHold mode in a bit windy conditions - quality is quite bad, because of frame vibrations (and low light conditions)
[youtube]https://www.youtube.com/watch?v=oO13RAuLjcw[/youtube]
And last but not least - thanks to Rob and whole APM team for your effort in this Open Source project.