24-Feb-2016, 04:33 AM (This post was last modified: 24-Feb-2016, 04:46 AM by nineninties.)
I was wondering if i could get some help on PID tuning. Ive been reading up on it and I am still lost. I was trying to use Gtune but it wont save the settings after flights. I followed the directions according to clean flight. Any help would be great . Thank you
(24-Feb-2016, 04:33 AM)nineninties Wrote: I was wondering if i could get some help on PID tuning. Ive been reading up on it and I am still lost. I was trying to use Gtune but it wont save the settings after flights. I followed the directions according to clean flight. Any help would be great . Thank you
I did the disarm save after each flight. I have some movement but the file was to big to post . I had cut some of it out . I can try to post another recording
(24-Feb-2016, 09:13 PM)BigglesFPV Wrote: I could be wrong, but I thought G-Tune only works in Rate mode and only adjusts the P's anyways.
Your right ! "The implementation you have here is quite different and just for adjusting the P values of ROLL/PITCH/YAW in Acro mode. When flying in Acro mode (yaw tune in other modes possible as well - see below) you can activate G-Tune with an AUX box (switch) while the copter is armed." https://github.com/cleanflight/cleanflig...s/Gtune.md
I just read this so ill i might try again when I can get more props. They dont sell any in the Omaha area.
(25-Feb-2016, 01:46 PM)Oscar Wrote: Actually in the new betaflight they have removed G rune because it doesn't work consistently.. Still best to tune manually
I defaulted all the PIDS to start over. I LOS for a while until my charger broke. If its not one thing its another .. Here is the recording from earlier
01-Mar-2016, 10:25 PM (This post was last modified: 01-Mar-2016, 10:34 PM by orejass.)
Manual tunning is still (and i think always be) the best ay to go.
its not so hard, just concentrate on one value at a time. use a simple switch and a POT to tune the value to something that you cen see and feel is flyable. dont even worry on the number its at, just how the quad is reacting and how you feel it flying.
It takes time and practice. I used to spend pkenty of hours trying to tune my stuff, now i can do it in 2-3 batteries (15 miuntes)
Check these links out, they might help (some are not specific to cleanflight):
There you go, its nerve racking at first, and nothing much makes sense until you get and recognize what each value does. I can see your D value is quite high, to begin manual tuning you should bring down all values concerning I and D, that way P can do its job and you can see how the copter is reacting.
Bring your I for Pitch and Roll down to 20, set D down to 5. P can stay at 4. For yaw, bring down the I a bit, maybe to 35. I have found that tunning yaw once in flight with the goggles on is much easier. As long as you copter is not drifting in yaw, leave it be for now.
# serial serial 0 1 115200 57600 0 115200 serial 1 0 115200 57600 0 115200 serial 2 0 115200 57600 0 115200
# led led 0 0,0:::0 led 1 0,0:::0 led 2 0,0:::0 led 3 0,0:::0 led 4 0,0:::0 led 5 0,0:::0 led 6 0,0:::0 led 7 0,0:::0 led 8 0,0:::0 led 9 0,0:::0 led 10 0,0:::0 led 11 0,0:::0 led 12 0,0:::0 led 13 0,0:::0 led 14 0,0:::0 led 15 0,0:::0 led 16 0,0:::0 led 17 0,0:::0 led 18 0,0:::0 led 19 0,0:::0 led 20 0,0:::0 led 21 0,0:::0 led 22 0,0:::0 led 23 0,0:::0 led 24 0,0:::0 led 25 0,0:::0 led 26 0,0:::0 led 27 0,0:::0 led 28 0,0:::0 led 29 0,0:::0 led 30 0,0:::0 led 31 0,0:::0
# color color 0 0,0,0 color 1 0,255,255 color 2 0,0,255 color 3 30,0,255 color 4 60,0,255 color 5 90,0,255 color 6 120,0,255 color 7 150,0,255 color 8 180,0,255 color 9 210,0,255 color 10 240,0,255 color 11 270,0,255 color 12 300,0,255 color 13 330,0,255 color 14 0,0,0 color 15 0,0,0
set looptime = 2000 set emf_avoidance = OFF set i2c_highspeed = ON set gyro_sync = ON set gyro_sync_denom = 1 set mid_rc = 1500 set min_check = 1100 set max_check = 1900 set rssi_channel = 0 set rssi_scale = 30 set rssi_ppm_invert = OFF set rc_smoothing = OFF set input_filtering_mode = OFF set min_throttle = 1150 set max_throttle = 1850 set min_command = 1000 set servo_center_pulse = 1500 set 3d_deadband_low = 1406 set 3d_deadband_high = 1514 set 3d_neutral = 1460 set 3d_deadband_throttle = 50 set motor_pwm_rate = 400 set servo_pwm_rate = 50 set retarded_arm = OFF set disarm_kill_switch = OFF set auto_disarm_delay = 3 set small_angle = 25 set fixedwing_althold_dir = 1 set reboot_character = 82 set gps_provider = NMEA set gps_sbas_mode = AUTO set gps_auto_config = ON set gps_auto_baud = OFF set serialrx_provider = SPEK1024 set sbus_inversion = ON set spektrum_sat_bind = 0 set telemetry_switch = OFF set telemetry_inversion = ON set frsky_default_lattitude = 0.000 set frsky_default_longitude = 0.000 set frsky_coordinates_format = 0 set frsky_unit = IMPERIAL set frsky_vfas_precision = 0 set hott_alarm_sound_interval = 5 set battery_capacity = 0 set vbat_scale = 110 set vbat_max_cell_voltage = 43 set vbat_min_cell_voltage = 33 set vbat_warning_cell_voltage = 35 set current_meter_scale = 400 set current_meter_offset = 0 set multiwii_current_meter_output = OFF set current_meter_type = ADC set align_gyro = DEFAULT set align_acc = DEFAULT set align_mag = DEFAULT set align_board_roll = 0 set align_board_pitch = 0 set align_board_yaw = 0 set max_angle_inclination = 500 set gyro_lpf = 188HZ set gyro_soft_lpf = 60.000 set moron_threshold = 32 set imu_dcm_kp = 2500 set imu_dcm_ki = 0 set yaw_control_direction = 1 set pid_at_min_throttle = ON set airmode_saturation_limit = 50 set yaw_motor_direction = 1 set yaw_jump_prevention_limit = 200 set tri_unarmed_servo = ON set servo_lowpass_freq = 400.000 set servo_lowpass_enable = OFF set failsafe_delay = 10 set failsafe_off_delay = 150 set failsafe_throttle = 1060 set failsafe_kill_switch = OFF set failsafe_throttle_low_delay = 100 set failsafe_procedure = 0 set rx_min_usec = 885 set rx_max_usec = 2115 set acc_hardware = 0 set baro_hardware = 0 set mag_hardware = 0 set blackbox_rate_num = 1 set blackbox_rate_denom = 1 set blackbox_device = SPIFLASH set magzero_x = 0 set magzero_y = 0 set magzero_z = 0
# rxfail rxfail 0 a rxfail 1 a rxfail 2 a rxfail 3 a rxfail 4 h rxfail 5 h rxfail 6 h rxfail 7 h rxfail 8 h rxfail 9 h rxfail 10 h rxfail 11 h rxfail 12 h rxfail 13 h rxfail 14 h rxfail 15 h rxfail 16 h rxfail 17 h
# dump profile
# profile profile 0
# aux aux 0 0 0 1800 2075 aux 1 2 1 900 1200 aux 2 2 1 1800 2100 aux 3 20 1 1800 2100 aux 4 0 0 900 900 aux 5 0 0 900 900 aux 6 0 0 900 900 aux 7 0 0 900 900 aux 8 0 0 900 900 aux 9 0 0 900 900 aux 10 0 0 900 900 aux 11 0 0 900 900 aux 12 0 0 900 900 aux 13 0 0 900 900 aux 14 0 0 900 900 aux 15 0 0 900 900 aux 16 0 0 900 900 aux 17 0 0 900 900 aux 18 0 0 900 900 aux 19 0 0 900 900
set gps_pos_p = 15 set gps_pos_i = 0 set gps_pos_d = 0 set gps_posr_p = 34 set gps_posr_i = 14 set gps_posr_d = 53 set gps_nav_p = 25 set gps_nav_i = 33 set gps_nav_d = 83 set gps_wp_radius = 200 set nav_controls_heading = ON set nav_speed_min = 100 set nav_speed_max = 300 set nav_slew_rate = 30 set alt_hold_deadband = 40 set alt_hold_fast_change = ON set deadband = 0 set yaw_deadband = 10 set throttle_correction_value = 0 set throttle_correction_angle = 800 set default_rate_profile = 0 set gimbal_mode = NORMAL set acc_cut_hz = 15 set accxy_deadband = 40 set accz_deadband = 40 set accz_lpf_cutoff = 5.000 set acc_unarmedcal = ON set acc_trim_pitch = 0 set acc_trim_roll = 0 set baro_tab_size = 21 set baro_noise_lpf = 0.600 set baro_cf_vel = 0.985 set baro_cf_alt = 0.965 set mag_declination = 0 set pid_delta_method = MEASUREMENT set pid_controller = MWREWRITE set p_pitch = 40 set i_pitch = 30 set d_pitch = 23 set p_roll = 40 set i_roll = 30 set d_roll = 23 set p_yaw = 85 set i_yaw = 45 set d_yaw = 0 set p_pitchf = 1.400 set i_pitchf = 0.400 set d_pitchf = 0.030 set p_rollf = 1.400 set i_rollf = 0.400 set d_rollf = 0.030 set p_yawf = 3.500 set i_yawf = 0.400 set d_yawf = 0.010 set level_horizon = 3.000 set level_angle = 5.000 set sensitivity_horizon = 75 set p_alt = 50 set i_alt = 0 set d_alt = 0 set p_level = 20 set i_level = 10 set d_level = 100 set p_vel = 120 set i_vel = 45 set d_vel = 1 set yaw_p_limit = 500 set dterm_cut_hz = 0.000 set gtune_loP_rll = 10 set gtune_loP_ptch = 10 set gtune_loP_yw = 10 set gtune_hiP_rll = 100 set gtune_hiP_ptch = 100 set gtune_hiP_yw = 100 set gtune_pwr = 0 set gtune_settle_time = 450 set gtune_average_cycles = 16
# dump rates
# rateprofile rateprofile 0
set rc_rate = 90 set rc_expo = 65 set rc_yaw_expo = 0 set thr_mid = 50 set thr_expo = 0 set roll_rate = 77 set pitch_rate = 77 set yaw_rate = 100 set tpa_rate = 45 set tpa_breakpoint = 1500
#
(01-Mar-2016, 10:25 PM)orejass Wrote: Manual tunning is still (and i think always be) the best ay to go.
its not so hard, just concentrate on one value at a time. use a simple switch and a POT to tune the value to something that you cen see and feel is flyable. dont even worry on the number its at, just how the quad is reacting and how you feel it flying.
It takes time and practice. I used to spend pkenty of hours trying to tune my stuff, now i can do it in 2-3 batteries (15 miuntes)
Check these links out, they might help (some are not specific to cleanflight):
Videos Showing Each setting effect: youtube.com/watch?v=YNzqTGEl2xQ youtube.com/watch?v=aq1jXHMiJgg
There you go, its nerve racking at first, and nothing much makes sense until you get and recognize what each value does. I can see your D value is quite high, to begin manual tuning you should bring down all values concerning I and D, that way P can do its job and you can see how the copter is reacting.
Bring your I for Pitch and Roll down to 20, set D down to 5. P can stay at 4. For yaw, bring down the I a bit, maybe to 35. I have found that tunning yaw once in flight with the goggles on is much easier. As long as you copter is not drifting in yaw, leave it be for now.
Try that out, let us know.
Thank you so much !! Ill try it out once i get a new charger.. I Just bought it and got everything set up and it broke ..
# serial serial 0 1 115200 57600 0 115200 serial 1 0 115200 57600 0 115200 serial 2 0 115200 57600 0 115200
# led led 0 0,0:::0 led 1 0,0:::0 led 2 0,0:::0 led 3 0,0:::0 led 4 0,0:::0 led 5 0,0:::0 led 6 0,0:::0 led 7 0,0:::0 led 8 0,0:::0 led 9 0,0:::0 led 10 0,0:::0 led 11 0,0:::0 led 12 0,0:::0 led 13 0,0:::0 led 14 0,0:::0 led 15 0,0:::0 led 16 0,0:::0 led 17 0,0:::0 led 18 0,0:::0 led 19 0,0:::0 led 20 0,0:::0 led 21 0,0:::0 led 22 0,0:::0 led 23 0,0:::0 led 24 0,0:::0 led 25 0,0:::0 led 26 0,0:::0 led 27 0,0:::0 led 28 0,0:::0 led 29 0,0:::0 led 30 0,0:::0 led 31 0,0:::0
# color color 0 0,0,0 color 1 0,255,255 color 2 0,0,255 color 3 30,0,255 color 4 60,0,255 color 5 90,0,255 color 6 120,0,255 color 7 150,0,255 color 8 180,0,255 color 9 210,0,255 color 10 240,0,255 color 11 270,0,255 color 12 300,0,255 color 13 330,0,255 color 14 0,0,0 color 15 0,0,0
set looptime = 2000 set emf_avoidance = OFF set i2c_highspeed = ON set gyro_sync = ON set gyro_sync_denom = 1 set mid_rc = 1500 set min_check = 1100 set max_check = 1900 set rssi_channel = 0 set rssi_scale = 30 set rssi_ppm_invert = OFF set rc_smoothing = OFF set input_filtering_mode = OFF set min_throttle = 1150 set max_throttle = 1850 set min_command = 1000 set servo_center_pulse = 1500 set 3d_deadband_low = 1406 set 3d_deadband_high = 1514 set 3d_neutral = 1460 set 3d_deadband_throttle = 50 set motor_pwm_rate = 400 set servo_pwm_rate = 50 set retarded_arm = OFF set disarm_kill_switch = OFF set auto_disarm_delay = 3 set small_angle = 25 set fixedwing_althold_dir = 1 set reboot_character = 82 set gps_provider = NMEA set gps_sbas_mode = AUTO set gps_auto_config = ON set gps_auto_baud = OFF set serialrx_provider = SPEK1024 set sbus_inversion = ON set spektrum_sat_bind = 0 set telemetry_switch = OFF set telemetry_inversion = ON set frsky_default_lattitude = 0.000 set frsky_default_longitude = 0.000 set frsky_coordinates_format = 0 set frsky_unit = IMPERIAL set frsky_vfas_precision = 0 set hott_alarm_sound_interval = 5 set battery_capacity = 0 set vbat_scale = 110 set vbat_max_cell_voltage = 43 set vbat_min_cell_voltage = 33 set vbat_warning_cell_voltage = 35 set current_meter_scale = 400 set current_meter_offset = 0 set multiwii_current_meter_output = OFF set current_meter_type = ADC set align_gyro = DEFAULT set align_acc = DEFAULT set align_mag = DEFAULT set align_board_roll = 0 set align_board_pitch = 0 set align_board_yaw = 0 set max_angle_inclination = 500 set gyro_lpf = 188HZ set gyro_soft_lpf = 60.000 set moron_threshold = 32 set imu_dcm_kp = 2500 set imu_dcm_ki = 0 set yaw_control_direction = 1 set pid_at_min_throttle = ON set airmode_saturation_limit = 50 set yaw_motor_direction = 1 set yaw_jump_prevention_limit = 200 set tri_unarmed_servo = ON set servo_lowpass_freq = 400.000 set servo_lowpass_enable = OFF set failsafe_delay = 10 set failsafe_off_delay = 150 set failsafe_throttle = 1060 set failsafe_kill_switch = OFF set failsafe_throttle_low_delay = 100 set failsafe_procedure = 0 set rx_min_usec = 885 set rx_max_usec = 2115 set acc_hardware = 0 set baro_hardware = 0 set mag_hardware = 0 set blackbox_rate_num = 1 set blackbox_rate_denom = 1 set blackbox_device = SPIFLASH set magzero_x = 0 set magzero_y = 0 set magzero_z = 0
# rxfail rxfail 0 a rxfail 1 a rxfail 2 a rxfail 3 a rxfail 4 h rxfail 5 h rxfail 6 h rxfail 7 h rxfail 8 h rxfail 9 h rxfail 10 h rxfail 11 h rxfail 12 h rxfail 13 h rxfail 14 h rxfail 15 h rxfail 16 h rxfail 17 h
# dump profile
# profile profile 0
# aux aux 0 0 0 1800 2075 aux 1 2 1 900 1200 aux 2 2 1 1800 2100 aux 3 20 1 1800 2100 aux 4 0 0 900 900 aux 5 0 0 900 900 aux 6 0 0 900 900 aux 7 0 0 900 900 aux 8 0 0 900 900 aux 9 0 0 900 900 aux 10 0 0 900 900 aux 11 0 0 900 900 aux 12 0 0 900 900 aux 13 0 0 900 900 aux 14 0 0 900 900 aux 15 0 0 900 900 aux 16 0 0 900 900 aux 17 0 0 900 900 aux 18 0 0 900 900 aux 19 0 0 900 900
set gps_pos_p = 15 set gps_pos_i = 0 set gps_pos_d = 0 set gps_posr_p = 34 set gps_posr_i = 14 set gps_posr_d = 53 set gps_nav_p = 25 set gps_nav_i = 33 set gps_nav_d = 83 set gps_wp_radius = 200 set nav_controls_heading = ON set nav_speed_min = 100 set nav_speed_max = 300 set nav_slew_rate = 30 set alt_hold_deadband = 40 set alt_hold_fast_change = ON set deadband = 0 set yaw_deadband = 10 set throttle_correction_value = 0 set throttle_correction_angle = 800 set default_rate_profile = 0 set gimbal_mode = NORMAL set acc_cut_hz = 15 set accxy_deadband = 40 set accz_deadband = 40 set accz_lpf_cutoff = 5.000 set acc_unarmedcal = ON set acc_trim_pitch = 0 set acc_trim_roll = 0 set baro_tab_size = 21 set baro_noise_lpf = 0.600 set baro_cf_vel = 0.985 set baro_cf_alt = 0.965 set mag_declination = 0 set pid_delta_method = MEASUREMENT set pid_controller = MWREWRITE set p_pitch = 40 set i_pitch = 30 set d_pitch = 23 set p_roll = 40 set i_roll = 30 set d_roll = 23 set p_yaw = 85 set i_yaw = 45 set d_yaw = 0 set p_pitchf = 1.400 set i_pitchf = 0.400 set d_pitchf = 0.030 set p_rollf = 1.400 set i_rollf = 0.400 set d_rollf = 0.030 set p_yawf = 3.500 set i_yawf = 0.400 set d_yawf = 0.010 set level_horizon = 3.000 set level_angle = 5.000 set sensitivity_horizon = 75 set p_alt = 50 set i_alt = 0 set d_alt = 0 set p_level = 20 set i_level = 10 set d_level = 100 set p_vel = 120 set i_vel = 45 set d_vel = 1 set yaw_p_limit = 500 set dterm_cut_hz = 0.000 set gtune_loP_rll = 10 set gtune_loP_ptch = 10 set gtune_loP_yw = 10 set gtune_hiP_rll = 100 set gtune_hiP_ptch = 100 set gtune_hiP_yw = 100 set gtune_pwr = 0 set gtune_settle_time = 450 set gtune_average_cycles = 16
# dump rates
# rateprofile rateprofile 0
set rc_rate = 90 set rc_expo = 65 set rc_yaw_expo = 0 set thr_mid = 50 set thr_expo = 0 set roll_rate = 77 set pitch_rate = 77 set yaw_rate = 100 set tpa_rate = 45 set tpa_breakpoint = 1500
#
Thank you so much !! Ill try it out once i get a new charger.. I Just bought it and got everything set up and it broke ..
Try this:
set looptime = 1000 set rc_smoothing = ON set dterm_cut_hz = 40 set p_pitch = 45 set i_pitch = 45 set d_pitch = 20 set p_roll = 36 set i_roll = 35 set d_roll = 16 set p_yaw = 90 set i_yaw = 55 set d_yaw = 4
you should feel the difference right away... but PID might still need tuning, you can upload another BB log with your PID values if you need a hand with that
I loaded up your recommendations and finally got everything going I made a video with the logs embedded and also included the files HERE Im having to correct the yaw with some left stick. It also feels like it doesn't auto correct and i have to level it out alot. any suggestions?
Also here are some more flights from today.. the wind pick up on some of these flights but it was manageable.
(10-Mar-2016, 04:06 PM)nineninties Wrote: I loaded up your recommendations and finally got everything going I made a video with the logs embedded and also included the files HERE Im having to correct the yaw with some left stick. It also feels like it doesn't auto correct and i have to level it out alot. any suggestions?
Also here are some more flights from today.. the wind pick up on some of these flights but it was manageable.