-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Plane: Pitch stick mixing doesn't conserve energy #29778
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
Comments
Hi Ruben! In general, we consider it important that each flight mode flies as expected. It's not clear to me to which mode this style of mixing that you describe would/should apply? |
It would apply to all modes that provide stick mixing support, such as Auto, Guided, Loiter, etc... The only difference between it and the current "FBWMixing" default stick mixing mode would be that the pitch stick would nudge the TECS rate instead of the pitch demand like it currently does. |
Ah, I got confused with servo mixers, my apologies. I must admit I haven't used stick mixing much. But indeed currently I would expect them to act upon angle, not climb rate. I agree that an 'FBWBMixer" would be the safer option. |
I've taken a shot at a safe, FBW-B style pitch stick nudge, and it turns out it is not trivial like I thought. The idea was to implement it as a rate nudge (a given pitch stick position commands a rate that is added or subtracted to the current rate), but since the setpoint of the system is an altitude and the rate is its derivative, that's not really possible. Here's a diagram of the possible behaviours of this approach: In this example, a 3 m/s rate nudge is added and held, which of course means the aircraft should climb at 3 m/s. But the problems arise when the nudge is changed (in the example, increased to 5 m/s):
Furthermore, in practice, the stick inputs would be continuous and noisy, which makes pink and blue even less viable. So the only somewhat viable option is nudging the altitude instead of the rate, which would of course have limits and probably feel quite unintuitive to control. Because the existing pitch stick mixing is very likely to cause stalls/overspeeds if overused (and a stall in an autonomous mode is very bad news, as the attitude control tends to make the aircraft spin), maybe a way to disable pitch stick mixing would be a good idea? By the way, the current pitch mixing has a bug in it: it doubles the stick input on max deflection in an attempt to ensure full override of any pitch setpoint, but since pitch limits are typically asymmetric, this can result in cases where the override is not fully achievable. Edit: At least some sort of warning text in the documentation and/or STICK_MIXING param. description should be added IMO. |
PS modern RC systems aren't that noisy. |
I agree with point 1 but I a simpler and more immediate solution should probably be implemented in the meantime, no? As for point 2, I like the idea in general (although maybe it's a bit too complex to be immediately intuitive? Not sure), but there's currently no non-hacky way to command a specific climb/sink rate, and the hacky ones can't be cleanly integrated with the standard altitude control without introducing height demand discontinuities which I think introduce too much potential for bugs/unpredictable behavior. As for the noisy input, I was mostly referring to the jitter in user input, not to RC noise. |
The current "damn the controllers, full speed [up]" approach is there quite on purpose. We don't involve the controllers as if auto or loiter or whatnot isn't doing what you expect and you need to control the vehicle - you really shouldn't be involving the controllers in responding to those inputs. This is how we get ridiculous i-term buildups and whatnot when doing stick-mixing. It's known and expected :-) We in fact balance things so that the operator can always override the controllers. Do you think that reasoning is sound? It's not neat, it's very messy, but it is also extremely reliable. |
I completely agree that the current FBWMixing mode is useful for what you say, i.e., emergency situations where there's an immediate obstacle, the aircraft has lost control, etc. In those situations, the energy control is of course a secondary issue. I also agree that its very reliable because its behaviour (aside from the stick mapping bug) is simple and predictable, whereas a safer version probably wouldn't. My main issue is that, as it is right now, you'd want to disable it for well tuned, production aircraft, because its an inherently unsafe feature. Since the roll part is fully safe and also nice to have for reasons other than emergency situations/obstacle avoidance, IMO at least that should be possible to keep enabled. |
Bug report
Issue details
Stick mixing operates by changing the attitude demand, which is fine for roll but can have really bad consequences for pitch, as the system is decoupled from the TECS. If a stick nudge is held long enough, an overspeed or a stall WILL occur. This could be worked around by weighting the mix with the flight energy, but ideally the pitch mixing logic should live in the TECS itself and operate by nudging the altitude rate instead of the pitch directly.
Since there's a removed "DIRECT" stick mixing mode that falls back to the FBW logic, this could become the way to use the current stick mixing logic with FBWA-style pitch control, and a new "FBWBMixing" mode that uses the TECS-based pitch mixing could replace the "FBWMixing" mode, and be the new default. The "DIRECT" mode would be renamed to "FBWAMixing".
Platform
[ ] All
[ ] AntennaTracker
[ ] Copter
[X] Plane
[ ] Rover
[ ] Submarine
The text was updated successfully, but these errors were encountered: