Servers by jDrones

Autotune PID values

(Hosein Gh) #1

today after upgrading my copter motors from 2212 930KV to 2213 920KV i ran autotune but PIDs are very different than my last motors
now my config is :
CUAV Pixhawk with Arducopter 3.6.10 on ChibiOS
tarot S550 frame
Air Gear 350 2213 920KV
T9545-A propellers
30A HobbyWing ESCs
10A Tattu battery

my PIDs with 2212 motors :

my PIDs with 2213 motors :

is it ok or current values are way too far out ?
log file
@mboland
@Leonardthall

(Leonard Hall) #2

Looks ok.

Do a first flight in Stab with ATC_THR_MIX_MAN set to 0.1

Be careful on your first flight. If it feels too aggressive then reduce the input shaping parameters here:
http://ardupilot.org/copter/docs/tuning-process-instructions.html#setting-the-input-shaping-parameters

(Hosein Gh) #3

today i tested copter in stabilize and after changing ATC_THR_MIX_MAN many time i found that its fly better at 0.5
but problem is another thing copter is shaking a little bit on forward and backward in loiter mode
do i need reduce PID values of pitch ?

(Leonard Hall) #4

Reducing ATC_THR_MIX_MAN to 0.1 is for safety. Once you are confident your tune is not unstable you can increase it.

If it does it in loiter but not in Alt Hold then it isn’t your PID tune. I would need to see a log to tell you more.

(Hosein Gh) #5

ok i got it
it seems that tune is stable because today my copter flies great in the wind (about 20KM/h) with both stabilize and loiter
also i think shaking could because of wind

ok tomorrow wind will stop and after tuning yaw i will send log for a better analysis

thanks so much

(Hosein Gh) #6

ok now tuning all axis has been finished and i did a fly in loiter and stabilize in a clam day
first i want to say thank you for a great tuning instruction my hexacopter fly well in stabilize without any problem
but i still have shaking problem in loiter
here is log file
what is your idea ?

(Leonard Hall) #7

Could you please repeat the flight with these logging settings.

(Hosein Gh) #8

here is the log with requested bitmask
log file
sorry for late response

(Leonard Hall) #9

Ok, start with dropping these paramters:
ATC_RAT_YAW_P 0.5
ATC_RAT_YAW_I 0.05
ATC_ANG_RLL_P 8
ATC_ANG_PIT_P 8
ATC_ACCEL_R_MAX 50000
ATC_ACCEL_P_MAX 50000
ATC_ACCEL_Y_MAX 10000

See how that goes.

Basically I have backed your tune off a little to see if it is the angle loop or the rate loop causing the problems.

1 Like
(Hosein Gh) #10

@Leonardthall
ok with these setting shaking reduced by 80%

this flight is much longer and there is data of loiter and stabilize in the log file
log file

now i have to reduce suggested parameters to get the best result ?

(Hosein Gh) #11

Hi @Leonardthall
still i need your help
reduce these values ?

or problem is sorting else

(Leonard Hall) #12

ATC_ANG_PIT_P 5
ATC_ANG_RLL_P 5
ATC_ANG_YAW_P 3
ATC_INPUT_TC 0.25
ATC_RAT_PIT_D 0.007
ATC_RAT_PIT_I 0.21
ATC_RAT_PIT_P 0.21
ATC_RAT_RLL_D 0.0055
ATC_RAT_RLL_I 0.165
ATC_RAT_RLL_P 0.165
ATC_RAT_YAW_FILT 2
ATC_RAT_YAW_I 0.05
ATC_RAT_YAW_IMAX 0.5
ATC_RAT_YAW_P 0.5

Try this. I have backed off the rate parameters to see if this settles things down. I am looking for the loaded gun.

(Hosein Gh) #13

hi @Leonardthall
with these values copter now is very sluggish and little bit hard to control
log file
what is the next step
thanks

(Leonard Hall) #14

do you see the shaking problem?

(Hosein Gh) #15

@Leonardthall
No shaking was solved

(Leonard Hall) #16

I just realised that you have not set your MOT parameters.

You need to do a proper tune to start out with.

I even linked you to the instructions here.

http://ardupilot.org/copter/docs/tuning-process-instructions.html#setting-the-input-shaping-parameters

I am disappointed that I wasted so much time trying to work out what was wrong when you had not taken the time to listen to my advice and read the instructions in the first place.

(Hosein Gh) #17

hi @Leonardthall
really sorry about wasting your time but i was seted these values

Battery setting

Parameters used to linearise your motor thrust curve.

  • MOT_BAT_VOLT_MAX - 4.2v x No. Cells
  • MOT_BAT_VOLT_MIN - 3.3v x No. Cells
  • MOT_THST_EXPO - 0.55 for 5 inch props, 0.65 for 10 inch props, 0.75 for 20 inch props. This parameter should be derived by thrust stand measurements for best results (don’t trust manufacturer data).

Motors setup

Parameters used to define the output range sent to the ESC.

i was left MOT_PWM_MAX and MOT_PWM_MIN to zero because i mixed 2 different ESC and calibrated theme to my ch3 input

and completely forgot these values :

PID Controller Initial Setup

now i changed them

(Hosein Gh) #18

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

(Hosein Gh) #19

@Leonardthall
ok now i finished tuning and auto tune
copter is flying well at stabilize and i have no any shaking problem at all in this mode so i didnt change input shaping parameters
but it seems that still i have shaking problem on forward move with loiter when i apply small (5 to 10 degrees) control input into roll , with bigger degrees i have no problem

log file with loiter

log file with stabilize

(Leonard Hall) #20

Can you please provide photos of your aircraft and close ups of the autopilot mount.

Have you autotuned it again with these settings?