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

Attitude glitches in velocity control #11551

Closed
bresch opened this issue Feb 27, 2019 · 3 comments
Closed

Attitude glitches in velocity control #11551

bresch opened this issue Feb 27, 2019 · 3 comments

Comments

@bresch
Copy link
Member

bresch commented Feb 27, 2019

Describe the bug
After flying with tightly tuned multicopters in position control mode (basically a racer with a GPS), I realized some attitude twitches that I don't see in stabilized mode. I'm now able to see that those twitches are created by the velocity controller.
In the log below, you can see that the velocity setpoint and estimate is perfectly smooth and that the thrust/pitch/pitchrate setpoint have glitches. Pitch and pitchrate setpoint glitches are a consequence of the thrust glitch and the thrust setpoint should have the shape of the error between the velocity estimate and setpoint (for my tests, I removed the integral and derivative gains to simplify the problem).

Reproduction in SITL with fullrate logging of the relevant topics:
velocity_control_attitude_glitch

To Reproduce

  • jMAVSim test in position control mode (default smoothing or velocity smoothing).
  • log vehicle_attitude_setpoint, vehicle_local_position and vehicle_local_positon_setpoint at full speed
  • set MPC_VEL_MANUAL to a small value to be able to give constant full stick and stay far from any saturation (3 m\s for example)
  • takeoff and fly full stick straight to the North

Expected behavior
A smoooooooth flight

Log Files and Screenshots
https://logs.px4.io/plot_app?log=a63b076d-b174-40d0-80f3-a57bc4f6a87b

@bkueng @MaEtUgR @Stifael Can you also reproduce the issue?

@bresch
Copy link
Member Author

bresch commented Feb 27, 2019

It looks that the glitches in SITL are just due to jitter in the execution of the control loop. When the setpoint is generated later than the estimate, it has time to move and this results in a glitch.
jitter_attitude_glitch

Now I'm not sure if this is what I see on the real vehicle and will fly with high logging rate to confirm that.

@stale
Copy link

stale bot commented Jun 24, 2019

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
Copy link
Member Author

bresch commented Jun 25, 2019

I've not seen that problem anymore.

@bresch bresch closed this as completed Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant