Skip to content
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

Tailsitter: remove thrust spikes around entering/leaving transition modes #23033

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Apr 19, 2024

Solved Problem

Various throttle spikes and jumps during tailsitter transitions, see screenshot:
image

The spikes are caused by the VTOL module selecting the FW rate controller output even when it doesn't have anything published yet, resulting in a publication of 0. The same happens during the initial phase of the back transition, as there the MC rate controller hasn't published yet.

The jumps are coming form different thrust level outputs of the MC vs FW controllers.

Solution

  • Fix the spikes by waiting 50ms until the new controller output is used.
  • Add ramps similar to what we already do for tiltrotor and standard VTOL.
  • also wait for differential throttle in FW until 50ms have passed

Changelog Entry

For release notes:

Improvement: Tailsitter: remove thrust spikes around entering/leaving transition modes. 

Alternatives

The transition logic between the VTOL types should be synced and simplified.

Test coverage

SITL tested. The spikes are gone and there are no jumps of the throttle.
image

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
…transition

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer sfuhrer requested a review from RomanBapst April 19, 2024 18:13
@sfuhrer sfuhrer added the Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! label Apr 19, 2024
@RomanBapst
Copy link
Contributor

@sfuhrer Looks like it will do the job. I would also verify what happens in the case of a quadchute, as there we technically don't transition but go straight to MC mode.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer
Copy link
Contributor Author

sfuhrer commented Apr 21, 2024

@sfuhrer Looks like it will do the job. I would also verify what happens in the case of a quadchute, as there we technically don't transition but go straight to MC mode.

Right, good point, I added the most basic anti-spike protection also in quad-chute now, and handle back-transitions aborts smoothly. See last two commits.

@@ -294,12 +301,27 @@ void Tailsitter::fill_actuator_outputs()
_torque_setpoint_0->xyz[2] = _vehicle_torque_setpoint_virtual_fw->xyz[2] * _param_vt_fw_difthr_s_r.get();
}

// for the short period after switching to FW where there is no thrust published yet from the FW controller,
// keep publishing the last MC thrust to keep the motors running
if (hrt_elapsed_time(&_trans_finished_ts) < 50_ms) {
Copy link
Member

@dagar dagar Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of hard coding these little magic timeouts everywhere what about checking against the actual FW controller publication (_fw_virtual_att_sp)?

@sfuhrer sfuhrer marked this pull request as draft April 26, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing!
Projects
Status: 👀 In review/test
Development

Successfully merging this pull request may close these issues.

None yet

3 participants