-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
MC position control - Add acceleration/thrust feedforward to velocity PID controller #12052
Conversation
Nice! Good idea. I was looking into a similar approach but by switching the velocity controller to output a desired acceleration that has a proper unit and then mapping this output and the feed-forward term to the attitude setpoint with a slightly different strategy. But this is a nice first step. Did you test on a real vehicle yet? I can test my draft acceleration stick input flight task with this pr. |
I quickly tried and controlling the drone with that task works but it loses altitude and does weir twitches so I have to check where that's coming from. |
baa0025
to
48ebbf5
Compare
48ebbf5
to
81366da
Compare
Just rebased to do further tests. |
81366da
to
a57ddc2
Compare
The acceleration setpoint had no effect so far and was only logged. Now that we start to execute it in the controller we need to take care about the interface working properly to handle NAN setpoints that have no effect and to get the acceleration setpoint output.
remove the noise on the sticks while not adding any delay during fast changes.
message. This contains the desired velocity after stick scaling
a57ddc2
to
3f0065c
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@bresch this looks like a good improvement, what is missing to merge? |
replaced by #12072 |
Describe problem solved by the proposed pull request
Current state:
The model controlled by the velocity PID controller is contains one integrator which removes steady-state error when a constant setpoint is applied. To track a ramp setpoint, an integrator (I term of the PID controller) increases the order of the closed-loop system and remove the steady-state error.
Problems:
Solution proposed by this PR
A feedforward on the controller is commonly used in industry to improve tracking. Since some flight tasks already produce acceleration setpoints, they can easily be fed as feedforwards. With a feedforward, the feedback controller is then only needed to remove the steady-state error and reject disturbances.
Describe possible alternatives
Tests
SITL tests:
Without feedforward (now):
With feedforward (this PR):
FYI @RomanBapst @MaEtUgR