# 多旋翼的转换速率型轨迹

## 定点模式

#### MPC_ACC_HOR and MPC_DEC_HOR_SLOW

During transition from velocity-control to position-control, there is a hard switch from from MPC_ACC_HOR to MPC_ACC_HOR_MAX and a reset of the velocity setpoint to the current vehicle velocity. The reset and the hard switch can both introduce a jerky flight performance during stopping. Nonetheless, the reset is required because the smoothing parameters introduce a delay to the setpoint, which can lead to unexpected flight maneuvers.

A simple example explaining why the reset is needed is given below.

During full stick input, the velocity setpoint will not change directly from 0 m/s to 4 m/s (aka step input) - instead the velocity setpoint follows a ramp with slope MPC_ACC_HOR. The actual velocity of the vehicle, however, will not track the setpoint perfectly, but rather will lag behind. The lag will be more significant the larger the value of MPC_ACC_HOR.

Without the reset (the top graph), at the moment of the stop demand (stick equal 0) the velocity setpoint will ramp down with the maximum rate given by MPC_ACC_HOR_MAX. Due to the lag the vehicle will first continue to accelerate in the direction previous to the stop demand followed by slowly decelerating towards zero. With the reset of the velocity setpoint to the current velocity, the delay due to the lag during stop demand can be overcome.

#### MPC_ACC_UP_MAX 和 MPC_ACC_DOWN_MAX

MPC_ACC_UP_MAX >= MPC_ACC_DOWN_MAX, otherwise the firmware will overwrite the given values.

• 位置-控制：速度设定值在 z 方向的变化上限由参数 MPC_ACC_UP_MAX 给出。
• 速度-控制：摇杆输入导致的速度设定值的变化极限由两个参数给出， MPC_ACC_UP_MAX 为上限， MPC_ACC_DOWN_MAX 为下限。

#### MPC_JERK_MAX 和 MPC_JERK_MIN

The jerk-parameter controls the rate limit with which the acceleration limit can change to MPC_ACC_HOR_MAX. The actual jerk-value is a linear map from velocity speed to jerk where full speed maps to MPC_JERK_MAX and zero speed to MPC_JERK_MIN. The smoothing can be turned off by setting MPC_JERK_MAX to a value smaller than MPC_JERK_MIN.

© PX4 Dev Team. License: CC BY 4.0            Updated: 2020-10-23 00:56:02