[OSYouTube] Alledia framework not found


0. Introdution

In this article I’m going to explain how to tune your PIDs in your racing quad.


1. Before starting

  • The aim of this PID adjusting method is to get your quad dialed in so that it is highly responsive. The PIDs are adjusted at the maximum values with the setup that we have at the moment (motors, battery, props, GoPro...). If we remove or change anything in the quad’s gear we’ll have to adjust the PIDs over again. A great way of having multiple PID configurations in the board at the same time is using different profiles in Cleanflight. This allows you to have multiple PID configs without having to connect the quad to the PC to change between them.
  • To dial in your PIDs we’ll have to use brand new props, as old ones might cause unwanted vibrations, which can lead to a bad set of values.
  • All the PID adjustments have to be done in Acro/Rate mode.
  • If your quad isn’t perfectly X shaped, your P values for pitch and roll shouldn’t be the same. You could also add an mmix command to match the quad’s specific shape.
  • There’s some oscillations that are normal and others that aren’t. It’s like driving a sports car that’s equipped with hard suspension that grips onto the asphalt under all circumstances. If we want a quad that reacts as fast as possible to our transmitter inputs, we’ll have very small oscillations in very sharp turns.
  • You can change your PID settings through your transmitter if you have enough free channels. You can set this up in the Adjustments tab in Cleanflight. If we do it this way the values won’t be saved onto the board if you don’t do a certain stick command, or you can connect it to Cleanflight and hit the Save button. If you do it this way, each time you want to change a value you’ll have to disarm the quad, change the desired value and then arm again. If you don’t disarm your quad, the settings won’t be applied onto the board.


2. "Non-scientifical" definition of PIDs

Before you start touching anything, you have to know what each value does. This way you’ll know what to look for and avoid you the trouble of changing things you’re not supposed to change.

  • P - Is the strength at which the corrections are done.
  • I - Is the amount of time that the strength of P will be applied onto the quad.
  • D – Is “the accelerometer parameter”. It can increase the reaction speed of the quad, and it’s normally linked to the P value.


3. Inital PID values

To begin with, you have to modify the PID values.

    P I D
ROLL   40  5 0
PITCH   40  5 0
YAW   5 0


We’ll put high values in P for pitch and roll, and low for yaw (around 2). We’ll drop the I value in all axes (around 5) and we’ll keep the D value at 0, as it’s the last thing we’ll touch upon.


4. Finding P for PITCH and ROLL

At this point, when we take off, you’ll see (and hear) the quad does very fast oscillations, and is nearly impossible to fly.

We have to decrease the values of P for pitch and roll slowly (subtracting between 1 and 2 at a time from the value you had).

We’ll take off again. If it still oscillates we’ll keep decreasing the P value for pitch and roll. It will get to a point where the quad will oscillate so little. It will be hard to fly, but it will be controllable (as long as you know how to fly in acro/rate mode).


5. Dialing in P for PITCH

Now, the process of modifying P is different. We’ll bang the transmitter stick backward and forward (to test pitch) to see how the quad behaves.

We let it pick up some speed and then we make the sharp move in the opposite direction. What we’re looking for is an oscillation when the direction is changing.

If we have a lot of oscillation we’ll decrease the P value slowly until it gets to the point where’s only 2 or 3 small oscillations. At that point we’re done with the P value for Pitch.



6. Tuning P for ROLL

The process we’ll have to follow is the same as we did for Pitch, but instead of making the quad go backwards and forwards, we’ll make it go left and right, lowering the P value for Roll, until we see only 2 or 3 small oscillations.

At this stage, the quad should be flyable, only doing some oscillations when changing directions sharply.

Note: It’s important that when you do these sharp movements with the transmitter, we don’t let go off the stick, as the internal springs in the gimbal of your transmitter could add certain vibrations when going back to the central position (the stick, not the quad).



7. Tuning P for YAW

To dial in the P for Yaw, we first have to increase the value in Cleanflight, and once the quad is in the air, you have to move the yaw stick. The quad has to do a full turn of 360º on its own vertical axis. If the quad loses height or changes its position, we’ll have to progressively decrease the value until it can do the same turn a few times without losing its starting point.



8. Shortcut for I

At this point you can take a shortcut, which consists in putting the default I values that came in Cleanflight, as those alredy work well. If we change these values, we’re only going to change the amount of time that each loop of P lasts. In a practical way, you’re defining how long the quad holds the last position you told it to stay at.


9. I for PITCH

Starting with a low value, we make the quad go forward. Once it’s going forward, we have to see if it holds its position. If we see a tendency to stabilize itself we have to increase the I value for Pitch. This procedure cannot be applied making the quad go backwards, as for some strange reason it stabilizes itself (it might be because we never tend to fly backwards).



10. I for ROLL

In this step we have to observe if the quad holds its position when making it go left and right. If it tends to stabilize itself we’ll have to increase the I value.



11. I for YAW

For Yaw, we’ll have to make the quad go diagonally (forward/left and forward/right, respectively). If we see that it doesn’t hold its position we’ll have to bump up the I value.



And finally, D

D is a value that modifies the “feel” of the quad in the hands of the pilot. It helps smoothing out little oscillations in forward flight (after dialling in P and I values). Start off by a low value and increase it progressively, to the point where you feel comfortable with how the quad handles.

It’s frequently told that the value of D is inversally proportional to the P value. If you increase the P value, you’ll have to decrease the D, and the other way around.