wind-estimator: learn airspeed scale faster at beginning of flight #26000
+27
−1
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.
Solved Problem
Airspeed scale estimation can take 10+ minutes to converge during initial flights, especially when starting from inaccurate initial values. This long convergence time is problematic for:
Slow convergence can lead to degraded controller performance, false airspeed validation failures and stalling/overspeeding
Solution
Introduce accelerated learning for the first 5 minutes of flight by temporarily increasing the airspeed scale process noise by 10x (100x on the psd). This allows the wind estimator's EKF to adjust the scale estimate much more rapidly.
The feature is controlled by a new boolean parameter
ASPD_SCALE_FAST(default: disabled) and automatically reverts to normal estimation after 5 minutes.TO DO:
Changelog Entry
For release notes:
Alternatives
Rather than using a fixed 10x multiplier for 5 minutes, we could expose both the multiplier value and duration as tunable parameters. However, I don't love the idea of adding more parameters.
Current hard-coded values:
Test coverage
SITL TEST 1 :
ASPD_SCALE_FAST = 1,ASPD_SCALE_1 = 0.8(should be around 1) (log)SITL TEST 2:
ASPD_SCALE_FAST = 0,ASPD_SCALE_1 = 0.8(should be around 1)SITL TEST 3:
ASPD_SCALE_FAST = 1,ASPD_SCALE_1 = 0.95(should be around 1) (log)