-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
leaky iTerm on yaw #13574
base: master
Are you sure you want to change the base?
leaky iTerm on yaw #13574
Conversation
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
@ctzsnooze : Leaky iterm is in fact lowpass filter. Above filter cutoff, it behaves as integrator. So it may be better to express leak factor in term of cutoff frequency, or, in this case, filter time constant. (edited) |
@ledvinap - yes, I agree, if this goes ahead, it would be best to implement it with a time constant or cutoff frequency. I am hoping that the feedforward changes will make it unnecessary. |
dfd899c
to
4cafc38
Compare
4cafc38
to
38dbc04
Compare
This PR adds a small re-centering factor to yaw iTerm. The rate of re-centring is proportional to the amount if iTerm on yaw, and can be adjusted using the
iterm_leak
CLI value.A value 10-15 can be useful for very small but persistent bounce-backs, with little or no apparent change in overall flight behaviour. A value much over 60 causes quite substantial pull back towards zero, with more obvious loss of bounce-back, and perhaps some decrease in heading stability when attempting to fly straight ahead or on very gentle arcs.
The leak helps to attenuated bounce-back after fast yaw moves, which tend to accumulate a lot of iTerm.
If set too high, it may have negative effects on the ability of the quad to accurately maintain heading, since iTerm will continually be recentered, rather than accumulating to control small persistent errors.
I am not 100 sure that this is needed, but it definitely can help with some yaw iTerm bounce back behaviours.
A much better proposal is in the companion PR which modifies feedforward on yaw. This minimises the root cause of the excessive iTerm growth during fast yaw inputs, making a 'leak' in yaw iTerm less important than otherwise.