Alt Hold: Small roll oscillations

I have kept my quad on altitude hold for few seconds and landed it. I get that my PIDR Act has small oscillations while the the PIDR Target is stable.

Here is my bin file

https://drive.google.com/file/d/1cEbgk9Yott0bzmhPZZF3IlNPLZFX-zoP/view?usp=drive_link

Thanks a lot in advance.

Remove the link access requirement for help.

And DON’T double post.

First, I apologize, I am just new to this community and learning to use the the community feature. I wont double post in the future. The restriction has been removed and I think, now anyone can access the file in the link. Thanks bro.

Try setting a harmonic notch filter before you get too much further with the tuning.

These settings might not be perfect but they should be a good start.

1 Like

Thanks a lot for the help. I see that you are viewing the frequency vs amplitude in linear scale. However, when I plot the amplitude in log scale, the result of filters is not significant / or not more pronounced as compared to linear scale. What do you suggest?

We suggest you use the settings suggested by @Allister and post a bin file with the results of a short flight in ALT_HOLD mode.

2 Likes

Ideally if you’re looking at the graph in log scale you are trying to get the estimated values below -50db. With this log I was not able to get there without over filtering. I don’t think that is needed. Try the values I gave you and then post the log of the flight. Hover it for a minute in Alt hold is all that’s needed.

1 Like

Thanks for the help. I will do a hover test with filter settings and get back with the results.

Here is another flight after the notch filter settings are guided by @Allister .

Here i see small oscillations in target as well.

What size is this craft? The Rate tuning is not great so perhaps the Rate Pitch/Roll P&I are too low. But, there isn’t much to see in this log in that regard. Make another flight with some more aggressive attitude changes.

It is a quad having 400 KV motor and 17 inch props. I took off and did altitude hold (while the thrust learning is set to learn and save) and then landed. I will do a flight with some aggressive maneuvers and get back to you. Thank you again.

Set INS_LOG_BAT_OPT,4 You don’t need logging to 4kHz to set the notch filter.

And for that size craft I would generally say the rate PID’s (P&I) are way too low. But, let’s see after the next flight.

Re-do the Initial Tune Parameters. Your Rate filters are too low also.

@dkemxr @Akh_ILY If the users start using the AMC and then post a .zip file with the AMC files, we can help them better because the files tell us which components they used, and how those components are attached to the FC. And if the user does his job well, he will also attach a vehicle.jpg file allowing us to see a photo of the vehicle.

Everybody wins:

  • The users get faster feedback and answer all the questions we need to help them
  • The forum moderators get the big picture without having to poke the users for answers.
  • I get more motivation to continue to improve the software and add more automation to it.

Those filter settings I gave him didn’t seem to do anything. They targeted the spots I expected but pre and post look the same. Can you see if I missed something?

Yes, I agree that makes the most sense. For me sometimes it’s like an engineering challenge at work. I enjoy figuring it out :slight_smile: But, yea…

Yes, I noticed that too but saw the data rate and thought perhaps he should take another run at it. What you suggested looked good to me.

1 Like

This is the quad. But it had a little crash before and one of the props is like this, little worn out on one edge. I hope that is not making an issue?

This vehicle is very similar to the “Holybro_X500 v1” template that I tuned to exhaustion.
Use AMC select that template as a starting point (not the v2 template, that one was not tuned by me) and do any changes required to fix your vehicle.

But that would be a great starting point for you.

I will try it, I am not conversant with the AMC and it would be a new start for me. I have done settings using the ardupilot mission player software. It is my first quad. :smile:
I have seen your vide on youtube about AMC. Trying to learn it as well in parallel. Thanks alot

This is another flight with some aggressive maneuvers.

Filter plot shows the notch filter is working. The PID plot shows the magnitude of oscillations has decreased as well. However, the small oscillations are still there in in the Actual PIDR.