Motor oscillations during Alt Hold, how to choose PID

Dear all,

i have the problem, that the quad oscillates slightly in height during alt hold. One can hear the motor speed oscillate with 1-2Hz and the vehicle oscillate with the same frequency a few centimeter in height.
Its a very powerful 7" quad.

PSC_ACCZ_I = 1, PSC_ACCZ_P = 0.5

According documentation: I/P=2 and 0.5<= P <= 1.5

How to chose PSC_ACCZ_I/P? The documentation says i should lower P & I - but I am already at the lower limit…

I think you’ll find the wiki on tuning to be very helpful on this. The parameters you’re asking in the alt hold tuning section., but I suggest going through the whole thing.

Also, mot_thst_hover of .125 is almost certainly incorrect and way too low. I suggest setting mot_hover_learn to a value of 2 so it will learn and save the actual thrust required to hover.

I followed the tuning section several times before asking.

mot_hover_learn always ends up with mot_thst_hover = .125
mot_hover_learn seems to converge, i tried several times. it keeps altitude nicely - beside the oscillations. Roll,pitch and yaw tuning is very good.

Here, is suggested to lower P&I to 0.5 and 1.

The wiki would suggest P=0.125 and I=0.25 which are far outside the limits suggested (in Qgroundcontrol you even can not set an I below 0.5). I will try lower P&I values tomorrow.

The parameter values seeming to be way out of acceptable range is because the hover thrust is way too low, and that’s where these numbers are being calculated from. Is this a severely overpowered copter? Maybe a heavy lift copter without any payload? Hover throttle of 12% is way too low for proper flight control and handling. I think you’re going to have a very hard time getting anything to work properly when it is almost idling in a hover.

If this is a heavy lift copter with no payload, I suggest adding some weight. If this just generally overpowered even with a payload, then I think you have a design problem to overcome.

Its a light 7" fpv racer with a 4s lipo.

Beside these small vertical oscillations it flies quite perfect.

I will try with lower PSC_ACCZ_I/P values tomorrow and report. Otherwise i will try a 3s.

It would be interesting where the limit of 0.5 for PSC_ACCZ_P comes from.

It is common for FPV racers and micro quads to be heavily overpowered, especially freestyle quads that are doing tricks and flips.

Have you tried running an FFT to see if the oscillations you are talking about are observable?

Small, overpowered copters will likely benefit from andyp1per’s static and harmonic filters. See here for details:

…and there is also a monster of a thread where people are discussing their settings and tuning:

Right, i have several copters that hover at about .12, and have no problems with them… Manual or auto modes. It did take some tuning and learning over the years to get it right, but it’s pretty well figured out these days. A lot of us are using little powerful racer copters now. I’m not racing or anything, but would simply rather fly a light, quiet copter for FPV, than a big loud beast that everyone can see.

I did have to tune my alt_hold parameters for the very powerful copters… the defaults oscillated. I think I halved the defaults. It looks like you’ve done that. You can go below the lower limit in the full parameter list.
And be sure your barometer is well protected with plenty of foam. Be sure your vibrations are low. I have never had success w/ hard mounting the FC. Vibrations and/or not enough protection on the barometer can cause oscillations in alt_hold.

1 Like

Generally it is the what the developer at the time felt the range of acceptable values could be. There is often not an actual programmatic limit, it’s just text in the description and you can put in whatever you want. Sometimes you have a vehicle that is just outside the typical limits. Or sometimes the parameter description needs to be updated to be more realistic. The latter is probably the case here if having such overpowered vehicles is actually a regular thing.

I remembered another setting that might help…


Let me know if that helps… We’re planning a default set of parameters for small or overpowered racer type copters, and might need to add this one to the list.

Thanks for your answers. The problem is solved.

-PSC_ACCZ_FILTD was already set to the same value as the other filter params
-Baro well covered, but this would likely not lead to 1-2Hz oscillations. FC damped, motors also damped (a must for 7" racers)

The solution, were the PID params for z control. The lower limit of 0.5 for PSC_ACCZ_P is arbitrary. It is much smaller, 2 x hover throttle is a reasonable starting point but in my case to low.

Thus, i would edit the docs and add a remark. I would also like to share the build and document it. How? As a blog entry?

What i have learned: a 7" race copter is definitely not comparable to the 5" and smaller racers i fly with arducopter. And of course also not comparable to 9" and bigger ones. It flies well but i still do not know if i like the beast.

1 Like

Blog entry is probably most appropriate for posting the specifics of your build.
I’d love to see your copter and parameter list.
I think it would be quite helpful if more people would share the details of their builds.

This one would be an especially helpful blog post given your experience with tuning parameters out of the typical ranges. I’m sure you won’t be the last to struggle with that.

Also if someone volunteers to maintain the page we could create another reference frame wiki page.

I personally fly the Hexsoon EDU450 so I maintain that vehicle’s parameter list. @Pedals2Paddles is our OpenSolo maintainer… always looking for more maintainers!

I also have a 7" quad that I am starting to tune. Like you I am hovering around .1

Do you have your params file? I am also hearing the oscillations you are referring to, slightly but I can hear them

I will document the build and publish it as a blog entry - it is interesting for diy builders…

In your case you have to set MOT_THST_HOVER to 0.095 and disable MOT_HOVER_LEARN by setting to 0.
Afterwards you can set the PID values for the z-axis as described in the documents equal/two times the value of MOT_THST_HOVER in the full param list

There seems to be a hard coded limit in the learning of MOT_THST_HOVER. It is always reset to 0.125 after reboot, leading to these oscillations.

For my quad MOT_THST_HOVER=0.065 for a 4s lipo. Thus, the difference and the oscillations were much stronger in my case.