Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Update D_CUT to D_MIN, add setpoint input, change nomenclature #7538
This is an incremental improvement to the original D_Cut proposal, based on user feedback.
Lots of thanks and full credit to JoeLucid for the original boost ideas and his ongoing support and encouragement.
Disabling / rendering ineffective
A note about defaults...
Propwash should not be so negatively impacted by this code, but with the proposed defaults, which are a bit 'soft', it may be.Users can, and probably should, use a bit more P and a bit more D than 'normal'.
During propwash events, D will be boosted by about ⅓. With defaults, D on roll is 35 and d_min is 20. D would be about 25 during propwash, a bit less than usual default D of 30.
A D of 40 with d_min of 25 would make D closer to default during propwash, and would make suitable alternative values. However for the more modern powerful quads, those values may be a bit higher than ideal, hence the 'softer' defaults.
I suppose that the wiki will be updated after merged ;) https://github.com/betaflight/betaflight/wiki/d_cut
etracer65 left a comment
I think it probably short-sighted to exclude yaw D from this. We fully support D on yaw so it doesn't make sense to exclude. The code can take into account cases where D gain == 0 for an axis and avoid initialization and calculation for these cases.