Stabilize mode allows you to fly your vehicle manually, but self-levels the roll and pitch axis.
While stabilize mode does not necessarily require GPS, switching to RTL in case of emergency does. Make sure you do have a reliable position estimate prior to arming, most commonly provided by 3D GPS fix with sufficient HDOP.
- Pilot’s roll and pitch input control the lean angle of the copter. When the pilot releases the roll and pitch sticks the vehicle automatically levels itself.
- Pilot will need to regularly input roll and pitch commands to keep the vehicle in place as it is pushed around by the wind.
- Pilot’s yaw input controls the rate of change of the heading. When the pilot releases the yaw stick the vehicle will maintain it’s current heading.
- Pilot’s throttle input controls the average motor speed meaning that constant adjustment of the throttle is required to maintain altitude. If the pilot puts the throttle completely down the motors will go to their minimum rate (MOT_SPIN_ARMED) and if the vehicle is flying it will lose attitude control and tumble. However, this behavior can be changed by enabling AirMode
- The throttle sent to the motors is automatically adjusted based on the tilt angle of the vehicle (i.e. increased as the vehicle tilts over more) to reduce the compensation the pilot must do as the vehicle’s attitude changes.
Always switch into a manual mode such as stabilize if the autopilot fails to control the vehicle. Maintaining control of your copter is your responsibility.
AC3.1 (and higher) includes AutoTune which may allow you to automatically determine the best Stabilize and Rate PID values. It is highly suggested running AutoTune on your vehicle rather than manually adjusting PIDs.
- ANGLE_MAX controls the maximum lean angle which by default is 4500 (i.e. 45 degrees)
- ANGLE_RATE_MAX controls the maximum requested rotation rate in the roll and pitch aixs which by default is 18000 (180deg/sec).
- ACRO_YAW_P controls how quickly copter rotates based on a pilot’s yaw input. The default of 4.5 commands a 200 deg/sec rate of rotation when the yaw stick is held fully left or right. Higher values will make it rotate more quickly.
- Stabilize Roll/Pitch P controls the responsiveness of the copter’s
roll and pitch to pilot input and errors between the desired and
actual roll and pitch angles. The default of 4.5 will command a
4.5deg/sec rotation rate for each 1 degree of error in the angle. A
higher gain such as 7 or 8 will allow you to have a more responsive
copter and resist wind gusts more quickly.
- A low stabilize P will cause the copter to rotate very slowly and may cause the copter to feel unresponsive and could cause a crash if the wind disturbs it. Try lowering the RC_Feel parameter before lowering Stability P if smoother flight is desired.
- Rate Roll/Pitch P, I and D terms
control the output to the motors based on the desired rotation rate
from the upper Stabilize (i.e. angular) controller. These terms are
generally related to the power-to-weight ratio of the copter with
more powerful copters requiring lower rate PID values. For example a
copter with high thrust might have Rate Roll/Pitch P number of 0.08
while a lower thrust copter might use 0.18 or even higher.
- Rate Roll/Pitch P is the single most important value to tune correctly for your copter.
- The higher the P the higher the motor response to achieve the desired turn rate.
- Default is P = 0.15 for standard Copter.
- Rate Roll/Pitch I is used to compensate for outside forces that would make your copter not maintain the desired rate for a longer period of time
- A high I term will ramp quickly to hold the desired rate, and will ramp down quickly to avoid overshoot.
- Rate Roll/Pitch D is used to dampen the response of the copter to accelerations toward the desired set point.
- A high D can cause very unusual vibrations and a “memory” effect where the controls feel like they are slow or unresponsive. A properly mounted controller should allow a Rate D value of .011.
- Values as low as 0.001 and as high as .02 have all been used depending upon the vehicle.
Verifying performance with dataflash logs¶
Viewing the stabilize mode performance is best done by downloading a dataflash log from your flight, then open it with the mission planner and graph the ATT message’s Roll-In or DesRoll (pilot desired roll angle) vs Roll (actual roll) and Pitch-In or DesPitch (desired pitch angle) vs Pitch (actual pitch angle). These two should track well as shown below.
- new copter flips immediately upon take-off. This is usually caused by the motor order being incorrect or spinning in the wrong direction or using an incorrect propeller (clockwise vs counter-clockwise). Check the rc connections for your apm2 or pixhawk.
- copter wobbles on roll or pitch axis. This usually means the Rate P values are incorrect. See Tuning section above for some hints as to how to adjust these gains.
- copter wobbles when descending quickly. This is caused by the copter falling through it’s own props wash and is nearly impossible to tune out although raising the Rate Roll/Pitch P values may help.
- copter yaw right or left 15degrees on take-off. Some motors may not be straight or the ESCs have not been calibrated.
- copter always tends to fly in one direction even in a windless environment. Try SaveTrim or AutoTrim to level the copter.
- copter does not maintain altitude or does not stay perfectly still in the air. As mentioned above this is a manual flight mode and requires constant control of the sticks to maintain altitude and position.
- occasional twitches in roll or pitch. Normally caused by some kind of interference on the receiver (for example FPV equipment placed too close to the receiver) or by ESC problems that may be resolved by calibrating them.
- sudden flips during flight. This is nearly always caused by mechanical failures of the motor or ESCs.