[WIP] adaptive hover-throttle for altitude control #12534
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe problem solved by the proposed pull request
This PR is a first draft for an altitude controller that takes into account parametric uncertainty of
MPC_THR_HOVER
by exploiting an online hover-estimator.With the current architecture, the user has to properly set
MPC_THR_HOVER
to the actual hovering throttle to get reasonable altitude tracking performances. If such parameter is not properly set, the user may experience poor altitude-tracking performaces or even worse flight instability.Further discussion about this issue is referenced in this issue.
The (draft)-solution suggested here takes inspiration from Adaptive Robust Control designs, where an adaption law is used for estimating the new operating point.
A projection-type adaption law is used to estimate the hover throttle, which replaces the static feedforward action defined by MPC_THR_HOVER.
With the adaption law in place, problems such as
should be fixed.
This is PR is a draft to test the behavior of the adaption law, further work to have a clean architecture is still required.
Open questions for discussion:
References:
Robust and Adaptive Control With Aerospace Applications
Adaptive Robust Control (ARC) for an altitude control of a quadrotor type UAV carrying an unknown payloads
Advanced Motion Control: From Classical PID to Nonlinear Adaptive Robust Control
Test data / coverage
I'm currently testing in SITL with a joystick to evaluate the effects of the hover estimator against the original implementation. Flight testing logs will be provided soon (still need to get them from the vehicle).
During the tests the hover estimator was published in
vehicle_local_position_setpoint/hover_estimation
.Hover estimator is enabled by setting
MPC_HOV_EST_EN
to 1.Tuning parameters:
MPC_HOV_ADT_RATE
MPC_HOV_EST_P
FYI @MaEtUgR @bresch