mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-26 01:00:36 +08:00
fix(vtol_att_control): blend standard VTOL airspeed-less front transition like with airspeed
Without airspeed, the multicopter weight reached zero at half of VT_TRANS_MIN_TM, while the transition only ends at VT_F_TR_OL_TM. In between, the vehicle flew at transition throttle with the lift motors off and without speed feedback, which stalls when VT_TRANS_MIN_TM is tuned short for the case with airspeed. Without airspeed feedback, use the airspeed expected at constant acceleration that reaches VT_ARSP_TRANS at VT_F_TR_OL_TM, and blend with it exactly as with a measured airspeed. Assisted-by: Claude:claude-opus-5-5
This commit is contained in:
1 parent
528a266ff1
commit
c4e7635653
4 files changed
+17
-13
No files matched your search
@@ -89,6 +89,8 @@ Parameter: [VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_
|
||||
|
||||
This specifies the duration of the front transition in seconds when no airspeed feedback is available (e.g. no airspeed sensor present).
|
||||
It should be set to a value which ensures that the vehicle reaches a high enough airspeed to complete the transition, e.g. airspeed should exceed [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS).
|
||||
Without airspeed feedback, multirotor control is blended out linearly over the part of this time in which the airspeed would be between [VT_ARSP_BLEND](../advanced_config/parameter_reference.md#VT_ARSP_BLEND) and [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS) at constant acceleration.
|
||||
For example, with `VT_ARSP_BLEND` = 8 m/s, `VT_ARSP_TRANS` = 10 m/s and this time set to 10 s, blending runs from 8 s to 10 s.
|
||||
|
||||
#### Transition Timeout
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Examine the throttle level (thrust) when the vehicle is level (no or little pitc
|
||||
The initial value to use as cruise speed should be the highest thrust applied during a roll or ascend, the thrust during level flight should be considered the minimum value if you decide to further tune down your speed.
|
||||
|
||||
Also take note of the time it took for a front transition to complete.
|
||||
This will be used to set the minimum transition time.
|
||||
This will be used to set the open-loop transition time.
|
||||
For safety reasons you should add +- 30% to this time.
|
||||
|
||||
Finally take note of the groundspeed during cruise flight.
|
||||
@@ -60,7 +60,8 @@ Note that QGC scales this from `1..100` and the thrust value from the log is sca
|
||||
So a thrust of 0.65 should be entered as 65.
|
||||
For safety reasons it is recommended to add +- 10% throttle to the determined value for testing a first flight.
|
||||
|
||||
Set the minimum front transition time ([VT_TRANS_MIN_TM](../advanced_config/parameter_reference.md#VT_TRANS_MIN_TM)) to the number of seconds determined from the reference flight and add +- 30% for safety.
|
||||
Set the open-loop front transition time ([VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_TM)) to the number of seconds determined from the reference flight and add +- 30% for safety.
|
||||
The multicopter motors are ramped down during the last part of this time, starting at the fraction [VT_ARSP_BLEND](../advanced_config/parameter_reference.md#VT_ARSP_BLEND) divided by [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS) of it (e.g. after 8 s of 10 s with 8 m/s and 10 m/s).
|
||||
|
||||
### Optional Recommended Parameters
|
||||
|
||||
@@ -100,5 +101,5 @@ The relevant parameters are:
|
||||
- [SYS_HAS_NUM_ASPD](../advanced_config/parameter_reference.md#SYS_HAS_NUM_ASPD)
|
||||
- [EKF2_EN](../advanced_config/parameter_reference.md#EKF2_EN) (1), [ATT_EN](../advanced_config/parameter_reference.md#ATT_EN) (0), [LPE_EN](../advanced_config/parameter_reference.md#LPE_EN) (0)
|
||||
- [FW_THR_TRIM](../advanced_config/parameter_reference.md#FW_THR_TRIM): determined (e.g. 70%)
|
||||
- [VT_TRANS_MIN_TM](../advanced_config/parameter_reference.md#VT_TRANS_MIN_TM): determined (e.g. 10 seconds)
|
||||
- [VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_TM): determined (e.g. 10 seconds)
|
||||
- [VT_FW_MIN_ALT](../advanced_config/parameter_reference.md#VT_FW_MIN_ALT): 15
|
||||
@@ -157,20 +157,20 @@ void Standard::update_transition_state()
|
||||
|
||||
_airspeed_trans_blend_margin = getTransitionAirspeed() - getBlendAirspeed();
|
||||
|
||||
float airspeed = _attc->get_calibrated_airspeed();
|
||||
|
||||
if (!PX4_ISFINITE(airspeed)) {
|
||||
// without airspeed feedback assume constant acceleration, reaching the transition airspeed at the open-loop time
|
||||
airspeed = getTransitionAirspeed() * _time_since_trans_start / getOpenLoopFrontTransitionTime();
|
||||
}
|
||||
|
||||
// do blending of mc and fw controls if a blending airspeed has been provided and the minimum transition time has passed
|
||||
if (_airspeed_trans_blend_margin > 0.0f &&
|
||||
PX4_ISFINITE(_attc->get_calibrated_airspeed()) &&
|
||||
_attc->get_calibrated_airspeed() > 0.0f &&
|
||||
_attc->get_calibrated_airspeed() >= getBlendAirspeed() &&
|
||||
airspeed > 0.0f &&
|
||||
airspeed >= getBlendAirspeed() &&
|
||||
_time_since_trans_start > getMinimumFrontTransitionTime()) {
|
||||
|
||||
mc_weight = 1.0f - fabsf(_attc->get_calibrated_airspeed() - getBlendAirspeed()) /
|
||||
_airspeed_trans_blend_margin;
|
||||
// time based blending when no airspeed sensor is set
|
||||
|
||||
} else if (!PX4_ISFINITE(_attc->get_calibrated_airspeed())) {
|
||||
mc_weight = 1.0f - _time_since_trans_start / getMinimumFrontTransitionTime();
|
||||
mc_weight = math::constrain(2.0f * mc_weight, 0.0f, 1.0f);
|
||||
mc_weight = 1.0f - fabsf(airspeed - getBlendAirspeed()) / _airspeed_trans_blend_margin;
|
||||
}
|
||||
|
||||
// ramp up FW_PSP_OFF
|
||||
|
||||
@@ -202,6 +202,7 @@ parameters:
|
||||
short: Airspeed-less front transition time (open loop)
|
||||
long: |-
|
||||
The duration of the front transition when there is no airspeed feedback available.
|
||||
Multicopter control is blended out over the part of this time in which the airspeed would be between VT_ARSP_BLEND and VT_ARSP_TRANS at constant acceleration.
|
||||
When airspeed is used, transition timeout is declared if airspeed does not
|
||||
reach VT_ARSP_BLEND after this time.
|
||||
type: float
|
||||
|
||||
Reference in new issue
Block a user