How to methodically tune (almost) any multicopter using ArduCopter 4.4.x

Unfortunately only 5 Minutes :frowning: Martin.

1 Like

I may try and make a 4s x 4500 li on batt aout 35 amp and see how it goes but 1st need to get it flying in Ardupilot

We tried 5000mAh and got warmer motors with only 7 Minutes flight. Not worth the extra 2 Minutes IMHO.

1 Like

I have been looking forward to this so called “pause and resume” autotune for sometime.

Autotune with Position hold, interesting, was this added recently? Is it also only available under 4.4.x and above?

AUTOTUNE_AXES,8, I do not see it in 4.4.4 full parameter list, I think is a new function in 4.5.x and above. What improvement will Yaw and YawD be different from the past autotune?

AFAIK that is available since 4.1.x

That was introduced in 4.3.x. It improves yaw response-time, but requires special tuning care.

1 Like
Message Description Log rate LOG_BITMASK field name bit value
ACC IMU accelerometer data SCHED_LOOP_RATE IMU_RAW 19 524288
AHR2 Backup AHRS data 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
ATSC Scale factors for attitude controller SCHED_LOOP_RATE / 1 ATTITUDE_FAST and ATTITUDE_MED 1 and 0 3
ATSC Scale factors for attitude controller SCHED_LOOP_RATE / 2 ATTITUDE_FAST 0 2
ATSC Scale factors for attitude controller SCHED_LOOP_RATE / 4 ATTITUDE_MED 0 1
ATSC Scale factors for attitude controller SCHED_LOOP_RATE / 8 - - 0
ATT Canonical vehicle attitude SCHED_LOOP_RATE ATTITUDE_FAST 0 1
ATT Canonical vehicle attitude 10 Hz ATTITUDE_MED 1 2
BAT Gathered battery data ?? CURRENT 9 512
BCL Battery cell voltage information ?? CURRENT 9 512
BCN Beacon information 10Hz CTUN 4 16
CAM Camera shutter information on event CAMERA 15 32768
CMD Executed mission command information on event CMD 8 256
CTRL Attitude Control oscillation monitor diagnostics 10Hz CTUN 4 16
FTN Filter Tuning Message - per motor SCHED_LOOP_RATE FTN_FAST 21 2097152
FTN1 FFT Filter Tuning 25 Hz FTN_FAST 21 2097152
FTNS Filter Tuning Message SCHED_LOOP_RATE FTN_FAST 21 2097152
GPA GPS accuracy information ~ 5 Hz GPS 2 4
GPS Information received from GNSS systems attached to the autopilot ~ 5 Hz GPS 2 4
GRAW Raw uBlox datas ~ 5 Hz GPS 2 4
GRXH Raw uBlox data - header ~ 5 Hz GPS 2 4
GRXS Raw uBlox data - space-vehicle data ~ 5 Hz GPS 2 4
GYR IMU gyroscope data SCHED_LOOP_RATE IMU_RAW 19 524288
IMU Inertial Measurement Unit data SCHED_LOOP_RATE IMU_FAST and ATTITUDE_FAST 18 and 0 262145
IMU Inertial Measurement Unit data 25 Hz IMU 7 128
MAG Information received from compasses ?? COMPASS 13 8192
MAVC MAVLink command we have just executed on event CMD 8 256
MCU MCU voltage and temperature monitoring ?? CURRENT 9 512
MOTB Motor mixer information 10Hz MOTBAT 17 131072
OF Optical flow sensor data ?? OPTFLOW 11 2048
PIDA Proportional/Integral/Derivative gain values for Altitude SCHED_LOOP_RATE if ATTITUDE_FAST is set else 10Hz PID 12 4096
PIDE Proportional/Integral/Derivative gain values for East SCHED_LOOP_RATE if ATTITUDE_FAST is set else 10Hz NTUN and PID 12 and 5 4128
PIDN Proportional/Integral/Derivative gain values for North SCHED_LOOP_RATE if ATTITUDE_FAST is set else 10Hz NTUN and PID 12 and 5 4128
PIDP Proportional/Integral/Derivative gain values for Pitch SCHED_LOOP_RATE if ATTITUDE_FAST is set else 10Hz PID 12 4096
PIDR Proportional/Integral/Derivative gain values for Roll SCHED_LOOP_RATE if ATTITUDE_FAST is set else 10Hz PID 12 4096
PIDY Proportional/Integral/Derivative gain values for Yaw SCHED_LOOP_RATE if ATTITUDE_FAST is set else 10Hz PID 12 4096
PM autopilot system performance and general data dumping ground 1 Hz PM 3 8
POS Canonical vehicle position 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
POWR System power information ?? CURRENT 9 512
PRX Proximity Filtered sensor data 10Hz CTUN 4 16
PRXR Proximity Raw sensor data 10Hz CTUN 4 16
PSCD Position Control Down 10Hz NTUN 5 32
PSCE Position Control East 10Hz NTUN 5 32
PSCN Position Control North 10Hz NTUN 5 32
RATE Desired and achieved vehicle attitude rates SCHED_LOOP_RATE / 1 ATTITUDE_FAST and ATTITUDE_MED 1 and 0 3
RATE Desired and achieved vehicle attitude rates SCHED_LOOP_RATE / 2 ATTITUDE_FAST 0 2
RATE Desired and achieved vehicle attitude rates SCHED_LOOP_RATE / 4 ATTITUDE_MED 0 1
RATE Desired and achieved vehicle attitude rates SCHED_LOOP_RATE / 8 - - 0
RCIN RC input channels to vehicle 10Hz RCIN 6 64
RCI2 (More) RC input channels to vehicle 10Hz RCIN 6 64
RCO2 Servo channel output values 15 to 18 10Hz RCOUT 10 1024
RCO3 Servo channel output values 19 to 32 10Hz RCOUT 10 1024
RCOU Servo channel output values 1 to 14 10Hz RCOUT 10 1024
RFND Rangefinder sensor information 10Hz CTUN 4 16
RSSI Received Signal Strength Indicator for RC receiver 10Hz RCIN 6 64
SIDD System ID data SCHED_LOOP_RATE / 1 ATTITUDE_FAST and ATTITUDE_MED 1 and 0 3
SIDD System ID data SCHED_LOOP_RATE / 2 ATTITUDE_FAST 0 2
SIDD System ID data SCHED_LOOP_RATE / 4 ATTITUDE_MED 0 1
SIDD System ID data SCHED_LOOP_RATE / 8 - - 0
SIDS System ID settings SCHED_LOOP_RATE / 1 ATTITUDE_FAST and ATTITUDE_MED 1 and 0 3
SIDS System ID settings SCHED_LOOP_RATE / 2 ATTITUDE_FAST 0 2
SIDS System ID settings SCHED_LOOP_RATE / 4 ATTITUDE_MED 0 1
SIDS System ID settings SCHED_LOOP_RATE / 8 - - 0
TERR Terrain database information ~ 5 Hz GPS 2 4
TRIG Camera shutter information on event CAMERA 15 32768
UBX1 uBlox-specific GPS information (part 1) ~ 5 Hz GPS 2 4
UBX2 uBlox-specific GPS information (part 2) ~ 5 Hz GPS 2 4
VIBE Processed (acceleration) vibration information 10Hz IMU or IMU_FAST or IMU_RAW 19 or 18 or 7 -
VSTB Motor mixer information SCHED_LOOP_RATE VIDEO_STABILISATION 20 1048576
WINC Winch 10Hz Any any any
XKF0 EKF3 beacon sensor diagnostics 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKF1 EKF3 estimator outputs 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKF2 EKF3 estimator secondary outputs 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKF3 EKF3 innovations 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKF4 EKF3 variances 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKF5 EKF3 Sensor innovations (primary core) and general dumping ground 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKFS EKF3 sensor selection 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKQ EKF3 quaternion defining the rotation from NED to XYZ (autopilot) axes 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKT EKF3 timing information 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKV1 EKF3 State variances (primary core) 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
XKV2 more EKF3 State Variances (primary core) 25Hz if ATTITUDE_FAST is set, else 10Hz - - -
3 Likes

@hwurzburg can you add the table above to the wiki?
Or can you tell me where you want me to add it?

Is the entire guide in the Wiki now?

2 Likes

Wow, awesome job! these little guys have been an enigma when it came to ArduCopter. @amilcarlucas, what is the reasoning behind the two switch flight mode setup in lieu of the 6P switch? thanks.

Simply pilot preference. The 6 flight mode buttons in the middle of the TX16S are not easily reached

I agree with you there.

Updated Section 9: wind estimation

1 Like

Besides flashing a firmware of each vehicle type to the board to get the full complete initial default parameters that come with each version of the firmware, is there another way to get it?

You can use the extract_param_defaults.py python script provided in the diatone_taycan_mxc.zip file above to extract default.parm files from a .bin dataflash log

./extract_param_defaults.py bin_filename -s missionplanner > defaults.param

I added documentation links to all .bin log file messages in the posts above.

3 Likes

Re-ordered the steps to support both smaller and bigger vehicles.

4 Likes

Here is an overview of the tuned PID controllers:

PID controller Intermediate parameter file(s) used to configure and tune it
Position Z acceleration 18_throttle_controller.param
Roll rate 24_autotune_roll_results.param, 32_autotune_roll_pitch_retune_results.param
Pitch rate 26_autotune_pitch_results.param, 32_autotune_roll_pitch_retune_results.param
Yaw rate 28_autotune_yaw_results.param, 30_autotune_yawd_results.param
Roll 24_autotune_roll_results.param, 32_autotune_roll_pitch_retune_results.param
Pitch 26_autotune_pitch_results.param, 32_autotune_roll_pitch_retune_results.param
Yaw 28_autotune_yaw_results.param, 30_autotune_yawd_results.param
Position XY velocity 41_position_controller.param

And we added a remote ID configuration step.

1 Like

Thank you.

I like to suggest adding the followings to line 60 and 61. Most compare software are sensitive to floating numbers ending with .0 (1.0, 2.0, 3.0) and MP parameter saving for floating number with ending 0, becomes integer number (5.0 → 5).

if int(default_value) == default_value and isinstance(default_value, float):
default_value = int(default_value)

for param_name, default_value in defaults.items():
    if int(default_value) == default_value and isinstance(default_value, float):
        default_value = int(default_value)
    print(f"{param_name},{default_value}")
1 Like

Hello @Jai.GAY you are probably not using the latest version included in the diatone_taycan_mxc.zip file.
That version already includes the changes you propose.

Thanks for the heads up, I will remove the older version now.

1 Like

Where can I download the diatone_taycan_mxc.zip?

1 Like