mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 14:24:21 +08:00
fix(tecs): base STE_rate_min on max_sink_rate not min_sink_rate
The altitude outer loop constrains its output to [-max_sink_rate, +max_climb_rate]. STE_rate_max correctly mirrors this with max_climb_rate, but STE_rate_min used min_sink_rate (sink at trim speed, min throttle). When descent rate exceeds min_sink_rate the STE rate setpoint was saturated at -min_sink_rate*g while the estimate reflected the actual (more negative) energy rate. The resulting positive control error caused the throttle controller to add thrust during steep commanded descents. Use max_sink_rate for STE_rate_min so the representable energy rate range is consistent with what the altitude controller can command. Signed-off-by: Balduin <balduin@auterion.com>
This commit is contained in:
@@ -313,7 +313,7 @@ TECSControl::STERateLimit TECSControl::_calculateTotalEnergyRateLimit(const Para
|
||||
TECSControl::STERateLimit limit;
|
||||
// Calculate the specific total energy rate limits from the max throttle limits
|
||||
limit.STE_rate_max = math::max(param.max_climb_rate, FLT_EPSILON) * CONSTANTS_ONE_G;
|
||||
limit.STE_rate_min = - math::max(param.min_sink_rate, FLT_EPSILON) * CONSTANTS_ONE_G;
|
||||
limit.STE_rate_min = - math::max(param.max_sink_rate, FLT_EPSILON) * CONSTANTS_ONE_G;
|
||||
|
||||
return limit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user