Hi all,
I’m working from few days on my pid, it’s better but when I looked my lof I’m not totally satisfied, I’ve tried lot of tune but this is always the same.
In CTUN if I graph DAlt and Alt I’m not statisfied. The Alt graph it’s not linear enough for me
I’ve tried to change P&I for pitch/roll rate but (I lowered the values) but I always have oscillations as you can see above (this screenshot is the best tune I have). I’ve always leave the same value for P&I in ATC_RAT_PIT_I and ATC_RAT_PIT_PATC_RAT_RLL_IATC_RAT_RLL_P as it was recommended to me on the forum.
I’am not satisfed also with ATT.DesRoll and ATT.Roll.
Here is my bin file : here
I have an Hexacopter 7inches props, 3 batteries 4s Lipo, Orange Cube and the weight approximately 2,3Kg. I want to have a better setting before to run an AutoTune
You vibrations are very low, which is usually a good thing. Just be sure that you haven’t over-dampened the flight controller, since then it wont pick up all movements it needs to know about. Most often the Cubes are mounted with some 3M double sided foam tape.
Everything else looks reasonable so far. Just set these:
BATT_ARM_VOLT,14.70
BATT_CRT_VOLT,14.00
BATT_LOW_VOLT,14.40
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2
INS_LOG_BAT_MASK,7
INS_LOG_BAT_OPT,0
INS_HNTCH_ENABLE,1
As far as PIDs and tuning goes there can be a few steps:
1st try these: and check for oscillations, also check motor temperatures
ATC_ANG_RLL_P,6.5
ATC_ANG_PIT_P,6.5
ATC_RAT_RLL_P,0.11
ATC_RAT_RLL_I,0.11
ATC_RAT_RLL_D,0.006
ATC_RAT_PIT_P,0.11
ATC_RAT_PIT_I,0.11
ATC_RAT_PIT_D,0.006
If oscillations are worse, lower ATC_ANG_RLL_P and ATC_ANG_PIT_P to about 5 or 5.5
Then hover in AltHold for a while and maybe just do some gentle movements, nothing radical.
After that we can check the .bin log file for attitude control and set the rest of the Harmonic Notch Filter params.
EDIT
You can set these too:
PSC_ACCZ_P,0.2
PSC_ACCZ_I,0.4
ATC_THR_MIX_MAN,0.5
If you have to reduce the amount of damping for the flight controller and then vibrations are a bit worse you could try these filter settings, but dont put them in yet - wait till after we see the effects of the other changes and tests.
first off all thanks @xfacta for your help. I’ve tried this morning your setup. With basi setup (give above) I had more vibrations.
So first oof all I’ve reduced , lower ATC_ANG_RLL_P and ATC_ANG_PIT_P to 5 and finnaly I lower to 4.5.
The best fly I have was the last in the log (roll and pitch seems to be good for me and my low experience). I just find my throttle control a bit soft and I think this is why in AltHold I have some time between throttle commande and drone reaction
I’ve tried to change the frequency off gyro filter but it’s worst with your tune My bin
That is some of the weirdest data I’ve seen. Motors are oscillating badly in both those logs.
Vibrations are unnaturally low - are you sure the flight controller is not over-damped?
Have you got a photo of the flight controller and mounting.
INS_ACCEL_FILTER,10 is way too low, this needs to be 20.
In the second log D term was too low compared to P and I, but that’s not the only issue of course.
You could probably set these, but they might need adjusting later when everything is better tuned
INS_HNTCH_REF,0.19
INS_HNTCH_FREQ,140
INS_HNTCH_BW,70
With those small props I would be tempted to try:
ATC_RAT_PIT_FLTD,30
ATC_RAT_PIT_FLTT,30
ATC_RAT_RLL_FLTD,30
ATC_RAT_RLL_FLTT,30
ATC_RAT_YAW_FLTT,30
INS_GYRO_FILTER,60
(yes I know, opposite way to what I said before )
and go back to the Tuning guide and start systematically doing the manual tune.
If that’s not helping reset all to defaults and start over - because there is something strange in all your parameters causing oscillation (or the flight controller mount and frame interactions)
ah bad news, I thought it was better . Yes i’m sure the flight controller isn’t over-damped, he’s only mount on my pcb and tight with 4 screw, I don’t have any foam between the pcb and the Cube. Just a question how do you see motors oscillating badly in the log? Which params should I graph ? This is the oscillations we can see in DesRoll and Roll for example?
I’ll try to change accel filter and for the gyro filter, I’ve already set these parameters and I’ll increase D term for pitch and roll(is there a good ratio to maintain between P/I and D?)
I’m going over these logs again
but I’ve noticed these should be changed to what I have here, as a starting point, since the P was too low and the I was too high
ATC_RAT_YAW_I,0.075
ATC_RAT_YAW_P,0.75
and BATT_LOW_VOLT,14.40 , although almost mandatory it’s not related to your tuning. Then you can utilise these settings:
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2
Also set this to check how well the Harmonic Notch Filter is working, but I think the settings are all correct
INS_LOG_BAT_OPT,2
What I haven’t yet figured out is this oscillation before and after arming, seen it before in SITL but not the phsyical world. Is there any visible effects while motors are starting or stopping? Shaking or vibrations?
The drone is mount in rooling he’s not fix in the cage (the cage can move in all axis), so the drone can rool in all axis yaw pitch, so this is why I have oscillation before take off (time to the drone for stabilize) and after landing when motor are stops.