-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor uncommanded descend Quad-Chute #21598
Conversation
- use fixed altitude error threshold - compute error relative to higest altitude the vehicle has achieved since it has flown below the altitude reference (setpoint) Signed-off-by: RomanBapst <bapstroman@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no loop whole in the logic, and definitely makes it easier to understand/tune. I have two comments but otherwise good to go and get testing done with it!
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Signed-off-by: RomanBapst <bapstroman@gmail.com>
78f51f9
to
74517b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go in from my side once tested on a real vehicle.
@ThomasRigi Do you have some comments on this? |
@RomanBapst I think he's currently (next months) not around. |
Worked as expected, no false positives and correct trigger eg here when set to 10m error and a de-tuned TECS altitude loop: https://review.px4.io/plot_app?log=b749c82f-028a-4db5-9294-1592865b25ed |
@sfuhrer Thanks for testing! |
* refactored uncommanded descend quadchute - use fixed altitude error threshold - compute error relative to higest altitude the vehicle has achieved since it has flown below the altitude reference (setpoint) * disabled altitude loss quadchute by default * altitude loss quadchute: added protection against invalid local z --------- Signed-off-by: RomanBapst <bapstroman@gmail.com>
* refactored uncommanded descend quadchute - use fixed altitude error threshold - compute error relative to higest altitude the vehicle has achieved since it has flown below the altitude reference (setpoint) * disabled altitude loss quadchute by default * altitude loss quadchute: added protection against invalid local z --------- Signed-off-by: RomanBapst <bapstroman@gmail.com>
* refactored uncommanded descend quadchute - use fixed altitude error threshold - compute error relative to higest altitude the vehicle has achieved since it has flown below the altitude reference (setpoint) * disabled altitude loss quadchute by default * altitude loss quadchute: added protection against invalid local z --------- Signed-off-by: RomanBapst <bapstroman@gmail.com>
Changes reflecting this PR: PX4/PX4-Autopilot#21598
Solved Problem
The current implementation of the uncommanded descend quadchute revealed two issues:
It was possible for a vehicle to enter a limit cycle in which it would stall, lose a lot of altitude, recover, slightly climb up, stall, ...
This behavior has been observed on a vehicle that suffered an airspeed sensor failure and was flying with a too low trim throttle value. In the phases during which the vehicle climbed after recovering from the stall, the quadchute height rate error integral (current implementation) was reset to 0 and therefore quadchute never triggered, although the vehicle lost close to 100m altitude.
Users found it difficult to tune the quadchute as there was no one to one relation between the parameter value and the actual altitude error at which quadchute would trigger.
Solution
I am proposing a new solution which uses an "altitude error" criteria to trigger quadchute. This is similar to what was implemented in the past with an important difference. The altitude reference used to compute the altitude error is set to the maximum altitude the vehicle has achieved from the time since it has flown BELOW the current altitude setpoint. Additionally, the altitude reference is constrained not to be larger than the current altitude setpoint (in case the setpoint decreases). We use the value of the TECS reference model as our current altitude setpoint.
This method allows quadchute to only be triggered if the vehicle is actually losing altitude. Quadchute will not trigger if the altitude setpoint is increasing faster than what the vehicle can follow, as long as the vehicle is not descending, no quadchute will be triggered.
Changelog Entry
For release notes:
Refactor uncommanded descend quad-chute to use deterministic altitude error threshold.
Alternatives
Test coverage
Simulation tests have been done.
Context
Related links, screenshot before/after, video