Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba9d1ce

Browse files
khancyrHwurzburg
authored andcommitted
copter: autotune some syntax
1 parent 8a54932 commit ba9d1ce

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

copter/source/docs/autotune.rst

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ There are number of problems that can prevent AutoTune from providing a good tun
2828

2929
Setup before flying in AutoTune mode
3030
====================================
31+
3132
1. Set up one flight mode switch position to be AltHold.
32-
2. Set an RC channel :ref:`Auxiliary Function <common-auxiliary-functions>` switch to AutoTune to allow you to turn the auto tuning on/off with a switch.
33+
2. Set an RC channel :ref:`Auxiliary Function <common-auxiliary-functions>` switch to AutoTune to allow you to turn the auto tuning on/off with a switch.
3334

34-
.. note:: you can also set the AUTOTUNE flight mode as a mode on your flight mode switch to activate AutoTune
35+
.. note:: you can also set the AUTOTUNE flight mode as a mode on your flight mode switch to activate AutoTune
3536

3637
3. Remove the camera gimbal or any other parts of the frame that could wobble in flight
3738
4. Select which combination of axes (roll, pitch, yaw) you wish to tune using the :ref:`AUTOTUNE_AXES <AUTOTUNE_AXES__AC_AutoTune_Multi>` parameter
@@ -41,6 +42,7 @@ Setup before flying in AutoTune mode
4142

4243
How to invoke AutoTune
4344
======================
45+
4446
#. Wait for a calm day and go to a large open area.
4547
#. Ensure the Aux AUTOTUNE switch, if used, is in the LOW position.
4648
#. Take off and put the copter into AltHold mode at a comfortable
@@ -131,9 +133,9 @@ Additional Notes
131133
================
132134

133135
- AutoTune can be setup as a flight mode. Switching into or out of the AutoTune flight mode responds in the same way as raising or lowering the aux switch high assigned to the AutoTune function.
134-
- In Copter-4.4 (and higher) AutoTune can tune the yaw D axis.
135-
- :ref:`AUTOTUNE_AXES <AUTOTUNE_AXES__AC_AutoTune_Multi>` allows control of which axes are to be tuned. This is useful if the vehicle's battery life is not long enough to complete all 4-axis. "1" = tune roll, "2" = tune pitch, "4" = tune yaw, "8" = tune yaw D. Add these numbers together to tune multiple axes in a single session (i.e. "15" = tune all axes)
136-
- :ref:`AUTOTUNE_AGGR <AUTOTUNE_AGGR>`: Should be in the range of 0.05 to 0.10. Higher values will produce a more aggressive tune but sometimes results in gains that are too high. More specifically this parameter controls the threshold for D-term bounce back and P-term overshoot. This affects the tuning noise immunity (a higher value is more tolerant to flex in the frame or other disturbances that could trick the tuning algorithm). High values also leads to a tune that rejects external disturbances better. Lower values result in a tune that is more responsive to pilot input.
136+
- In Copter-4.4 (and higher) AutoTune can tune the yaw D axis.
137+
- :ref:`AUTOTUNE_AXES <AUTOTUNE_AXES__AC_AutoTune_Multi>` allows control of which axes are to be tuned. This is useful if the vehicle's battery life is not long enough to complete all 4-axis. "1" = tune roll, "2" = tune pitch, "4" = tune yaw, "8" = tune yaw D. Add these numbers together to tune multiple axes in a single session (i.e. "15" = tune all axes)
138+
- :ref:`AUTOTUNE_AGGR <AUTOTUNE_AGGR>`: Should be in the range of 0.05 to 0.10. Higher values will produce a more aggressive tune but sometimes results in gains that are too high. More specifically this parameter controls the threshold for D-term bounce back and P-term overshoot. This affects the tuning noise immunity (a higher value is more tolerant to flex in the frame or other disturbances that could trick the tuning algorithm). High values also leads to a tune that rejects external disturbances better. Lower values result in a tune that is more responsive to pilot input.
137139

138140
- The full list of parameters that may be updated by AutoTune
139141

@@ -150,11 +152,11 @@ Additional Notes
150152
- Yaw max acceleration :ref:`ATC_ACC_Y_MAX<ATC_ACC_Y_MAX>`
151153
- Roll and pitch axis rate feed-forward is enabled (:ref:`ATC_RATE_FF_ENAB <ATC_RATE_FF_ENAB>`)
152154
- The AUTOTUNE algorithm tries to tune until instability is noted and then backs off the final PID values to provide a margin of stability. This back-off percentage can be manipulated with the :ref:`AUTOTUNE_GMBK <AUTOTUNE_GMBK>` parameter and changed from its default value of 25% reduction in gains, in order to get a tune with more, or less, stability margin.
153-
- After you have a good tune, you may wish to increase :ref:`ATC_THR_MIX_MAX <ATC_THR_MIX_MAX>` to 0.9 (default is 0.5) to increase prioritization of attitude control over throttle. This can reduce the pitch overshoot sometimes seen (especially on copters with large propellers) in AltHold if the vehicle suddenly slows after performing a fast forward flight. In this situation, wind catches under the propellers providing lift but also disturbs the vehicle's attitude leading to a conflict between throttle and attitude control. The danger in increasing this parameter's value is that if the rate gains are later raised so high that the vehicle oscillates badly it may be difficult for the vehicle to descend (because it will prioritize trying to correct the attitude oscillations and never reduce throttle sufficiently).
154-
- AutoTune can **request very large and fast changes in output**\ s to the motors which can cause ESC sync issues especially when using SimonK firmware and/or low KV motors (under 500KV). See this `video showing a test <https://www.youtube.com/watch?v=hBUBbeyLe0Q>`__ which recreates a sync problem.
155-
- For best results, the copter shouldn't be allowed to build up too much horizontal speed. This can be prevented by applying a quick correction between tests (twitches) to stop the vehicle from flying too fast.
156-
- Be advised that AutoTune will engage from Stabilize, so don't accidentally flip your AutoTune switch until you are in AltHold and ready to begin the procedure.
157-
- As a general rule, for Pitch and Roll, P and I should be equal, and D should be 1/10th P. For Yaw, I should be 1/10th P and D = 0, in most cases.
155+
- After you have a good tune, you may wish to increase :ref:`ATC_THR_MIX_MAX <ATC_THR_MIX_MAX>` to 0.9 (default is 0.5) to increase prioritization of attitude control over throttle. This can reduce the pitch overshoot sometimes seen (especially on copters with large propellers) in AltHold if the vehicle suddenly slows after performing a fast forward flight. In this situation, wind catches under the propellers providing lift but also disturbs the vehicle's attitude leading to a conflict between throttle and attitude control. The danger in increasing this parameter's value is that if the rate gains are later raised so high that the vehicle oscillates badly it may be difficult for the vehicle to descend (because it will prioritize trying to correct the attitude oscillations and never reduce throttle sufficiently).
156+
- AutoTune can **request very large and fast changes in output**\ s to the motors which can cause ESC sync issues especially when using SimonK firmware and/or low KV motors (under 500KV). See this `video showing a test <https://www.youtube.com/watch?v=hBUBbeyLe0Q>`__ which recreates a sync problem.
157+
- For best results, the copter shouldn't be allowed to build up too much horizontal speed. This can be prevented by applying a quick correction between tests (twitches) to stop the vehicle from flying too fast.
158+
- Be advised that AutoTune will engage from Stabilize, so don't accidentally flip your AutoTune switch until you are in AltHold and ready to begin the procedure.
159+
- As a general rule, for Pitch and Roll, P and I should be equal, and D should be 1/10th P. For Yaw, I should be 1/10th P and D = 0, in most cases.
158160

159161
Common Problems
160162
===============
@@ -194,13 +196,15 @@ This is during Pitch Rate P adjustment, indicating a twitch is about to happen a
194196
.. note:: During the YAW rate phase of tuning, the messages will show a value for "d" that is not ATC_RAT_YAW_D, which is usually 0, but rather it's the value of ATC_RAT_YAW_FLTE, that is being changed.
195197

196198
Anytime the process is interrupted by pilot stick movements, the
199+
197200
::
198201

199202
09:09:38 AUTOTUNE: pilot overrides active
200203

201204
message appears.
202205

203206
If you stopped the tune and dis-armed while still in AUTOTUNE, and an axis tune has been completed, you will get a message showing that the new gains have been saved for that axis. If there is not a message to this effect, but think you finished at least one axis, then you probably dis-armed while not in AUTOTUNE mode, and did not actually save them.
207+
204208
::
205209

206210
09:19:48 AutoTune: Saved gains for Pitch

0 commit comments

Comments
 (0)