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

Heli AutoTune: fix rate and accel limiting #28911

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bnsgeyer
Copy link
Contributor

The original implementation of this relied on the attitude controller to provide the rate and accel limiting. The rate limiting worked but it can cause square wave behavior as it clips the rate at the rate limit. As for the accel limiting, the attitude controller wasn’t designed with the feedforward turned off to limit accel. It actually reduces the angle P to reduce acceleration.

So a different approach was taken. Using a sinusoidal input makes it easy to limit the acceleration and rate without causing any clipping. The attitude amplitude was modified based on the first and second derivative of the amplitude sinusoid chirp. This ensures the desired rate and acceleration are limited. However, the target values maybe smaller or larger based on the error and angle P. In most cases I have seen the target rates are lower.

This has been tested in SITL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant