You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multicopter braking BOOST causes the drone to accelerate to 2-3x its pre-braking speed instead of decelerating. After digging into the blackbox data and source, we believe this may be caused by lastAccelTargetX/Y (used by the jerk limiter) being saved after boost amplification, which could create a feedback loop that prevents the acceleration from reversing direction.
PID terms look correct. At t=230.3, all four velocity PID terms sum to +828 (braking direction), so the PID controller appears to be computing the right answer.
Something clamps the output in the wrong direction.mcVelAxisOut[1] = -257 at t=230.3, then saturates at -980 by t=230.4 — opposite to what the PID is requesting. This looks like the jerk limiter window is still centered on the previous cycle's large negative value and can't slew fast enough to reverse.
The gap between PID sum and output grows each cycle. This is what made us suspect a feedback loop — each iteration seems to push the jerk window further in the wrong direction rather than recovering.
~1.2 seconds of wrong-direction thrust. From t=230.2 to t=231.4, velOut is negative (forward acceleration) despite the stick being centered and then at full reverse. The drone accelerates from 271 to 687 cm/s during this window.
Pilot input doesn't override. At t=230.9, the pilot commands full reverse stick (rcData=989) but rcCommand[1] remains +500 (forward). We assume this is because the nav controller output takes priority during braking, but we're not 100% sure of that path.
Steps to Reproduce
Arm multicopter in POSHOLD with BRAKING mode enabled (user_control_mode = CRUISE)
Drone decelerates and stops at a position near where stick was released.
Suggested solution(s)
We traced the issue to an interaction between the jerk limiter and braking boost in navigation_multicopter.c. We could be wrong on the details, but the blackbox data seems consistent with this theory.
The jerk limiter (lines ~593-596) constrains acceleration change per cycle:
If we're reading this correctly, this could create a feedback loop:
During cruise flight, lastAccelTargetY is large in the flight direction (e.g., -500)
Pilot releases stick, braking BOOST activates
PID now wants acceleration in the opposite direction (+828)
But jerk limiter window is centered on -500 with small maxAccelChange (even 2x during braking)
PID output gets clamped to still-negative value (e.g., -257)
Boost amplifies this wrong-direction value: -257 * 2.5 = -642
-642 is saved as lastAccelTargetY for next cycle
Next cycle: jerk window centers on -642, clamping gets worse
The system converges to maximum wrong-direction acceleration instead of reversing
If this is right, the jerk limiter would effectively have (1 + boostFactor) times its intended inertia because it's tracking boosted output instead of raw PID output. With default nav_mc_braking_boost_factor = 100 (boostFactor = 1.0), that would be 2x the intended inertia.
Possible fix — moving the lastAccelTarget save to before the boost block:
The idea is that the jerk limiter would then track the raw PID output instead of the boosted output, which should break the feedback loop while still preserving both the jerk limiter's smoothing function and the boost's amplification of braking force.
We haven't tested this fix yet, so there may be side effects we're not seeing. Happy to test if this direction looks right.
Additional context
Roll-axis braking events in the same flight worked correctly at lower speeds, which seems consistent with the feedback loop being speed/magnitude-dependent
The doubled jerk limit during braking (maxAccelChange * 2, line ~589) helps but doesn't appear to be enough to overcome the boost amplification
Blackbox log attached — recorded at ~443 Hz with debug mode POS_EST (20) and all 9 BB include flags active. The critical braking failure event is at t=230.2s in the log.
Current Behavior
Multicopter braking BOOST causes the drone to accelerate to 2-3x its pre-braking speed instead of decelerating. After digging into the blackbox data and source, we believe this may be caused by
lastAccelTargetX/Y(used by the jerk limiter) being saved after boost amplification, which could create a feedback loop that prevents the acceleration from reversing direction.This appears to be the same issue reported in:
Decoded blackbox data from the failure event (Y-axis, pitch):
What we're seeing in the data:
PID terms look correct. At t=230.3, all four velocity PID terms sum to +828 (braking direction), so the PID controller appears to be computing the right answer.
Something clamps the output in the wrong direction.
mcVelAxisOut[1]= -257 at t=230.3, then saturates at -980 by t=230.4 — opposite to what the PID is requesting. This looks like the jerk limiter window is still centered on the previous cycle's large negative value and can't slew fast enough to reverse.The gap between PID sum and output grows each cycle. This is what made us suspect a feedback loop — each iteration seems to push the jerk window further in the wrong direction rather than recovering.
~1.2 seconds of wrong-direction thrust. From t=230.2 to t=231.4,
velOutis negative (forward acceleration) despite the stick being centered and then at full reverse. The drone accelerates from 271 to 687 cm/s during this window.Pilot input doesn't override. At t=230.9, the pilot commands full reverse stick (rcData=989) but
rcCommand[1]remains +500 (forward). We assume this is because the nav controller output takes priority during braking, but we're not 100% sure of that path.Steps to Reproduce
user_control_mode = CRUISE)nav_mc_braking_boost_speed_threshold(default 150 cm/s)Expected behavior
Drone decelerates and stops at a position near where stick was released.
Suggested solution(s)
We traced the issue to an interaction between the jerk limiter and braking boost in
navigation_multicopter.c. We could be wrong on the details, but the blackbox data seems consistent with this theory.The jerk limiter (lines ~593-596) constrains acceleration change per cycle:
The boost (lines ~670-671) amplifies the PID output:
The save (lines ~677-679) stores the post-boost value for the next cycle's jerk limiter:
If we're reading this correctly, this could create a feedback loop:
lastAccelTargetYis large in the flight direction (e.g., -500)maxAccelChange(even 2x during braking)lastAccelTargetYfor next cycleIf this is right, the jerk limiter would effectively have
(1 + boostFactor)times its intended inertia because it's tracking boosted output instead of raw PID output. With defaultnav_mc_braking_boost_factor = 100(boostFactor = 1.0), that would be 2x the intended inertia.Possible fix — moving the
lastAccelTargetsave to before the boost block:The idea is that the jerk limiter would then track the raw PID output instead of the boosted output, which should break the feedback loop while still preserving both the jerk limiter's smoothing function and the boost's amplification of braking force.
We haven't tested this fix yet, so there may be side effects we're not seeing. Happy to test if this direction looks right.
Additional context
maxAccelChange * 2, line ~589) helps but doesn't appear to be enough to overcome the boost amplificationBraking settings: