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

Retune Typhoon H480 PID #16519

Merged
merged 1 commit into from
Jan 16, 2021
Merged

Retune Typhoon H480 PID #16519

merged 1 commit into from
Jan 16, 2021

Conversation

canberkdurmus
Copy link
Contributor

Describe the bug
Hi, I am having stability issues with Gazebo SITL Typhoon h480. In the hover it gets worse with time, descending and ascending with no major problems.

To Reproduce
Steps to reproduce the behavior:

  1. Build the repository with make px4_sitl gazebo_typhoon_h480
  2. Open QGroundControl and Takeoff to any height
  3. Oscillation can be observed. While waiting oscillation gets amplified.

Expected behavior
Expected behavior is of course a hover without major oscillations but small tuning errors are always acceptable for simulating the real world conditions.

Screenshots

unstable.mp4

Drone:

  • Typhoon H480 SITL

Proposed Solution

I have made a rough tuning with PX4 Multicopter PID Tuning Guide below you can see the values and flight video. I am going to open a pull request as soon as possible.

stable.mp4

The tuning is not very good I am aware of it but it can fly fine now.
Pitch:
pitch

Roll:
roll

Yaw (Not changed I think):
yaw

This should solve the issues #16517 and #14953

Thank you

@LorenzMeier
Copy link
Member

Awesome, thanks!

@canberkdurmus
Copy link
Contributor Author

Sorry accidentally closed before merge 😄

Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@canberkdurmus I just tried this with gazebo11, and results in high frequency oscillations on the vehicle

log: flightreview

Can you confirm that the vehicle is still oscillating?

@canberkdurmus
Copy link
Contributor Author

Hi, the first posts were with the Gazebo 9 I am sorry for this. I checked out your log and it looks like there is a serious oscillation, I don't understand why drone is this much unstable on your setup. Is it flying normally with the original PID Gain values?

I upgraded it to Gazebo 11 and it still looks like roll is fine and pitch is a little bit twitchy in the simulation. See video:

gazebo11-.mp4

See Log

Rates are not very good but angle stabilities are sufficient for flight:

Roll:
Screen Shot 2021-01-08 at 23 27 24

Pitch:
Screen Shot 2021-01-08 at 23 27 31

I will try to make a refined rate tuning later.

@dagar dagar marked this pull request as draft January 10, 2021 23:07
@Jaeyoung-Lim Jaeyoung-Lim added the Sim: SITL software in the loop simulation label Jan 16, 2021
@Jaeyoung-Lim Jaeyoung-Lim marked this pull request as ready for review January 16, 2021 08:31
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@canberkdurmus Sorry, it seems like I had some cached parameters that were making it stay out of tune.

Thank you for the contribution!

@Jaeyoung-Lim Jaeyoung-Lim merged commit ba96116 into PX4:master Jan 16, 2021
@canberkdurmus
Copy link
Contributor Author

Thank you so much, it is always a pleasure for me to contribute PX4!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sim: SITL software in the loop simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants