This short tutorial uses curves to intuitively explain why Betaflight’s D-term is particularly afraid of high-frequency gyroscope noise. D calculates the rate of change of the gyro signal and negates it: when the amplitude is constant, the higher the frequency, the steeper the slope of the curve, the greater the D output; P mainly changes with the error amplitude, while I allows rapid positive and negative fluctuations to cancel each other within the integration window, so it will not amplify with frequency like D.
D-term focuses on the speed of change
The video draws the gyroscope signal as a purple-blue curve and the D output as a yellow curve. When the curve is flat, the slope is close to zero, and D is small; when the curve rises or falls rapidly, the slope becomes larger, and D also increases, providing damping in the opposite direction. This is the intuitive reason why D suppresses overshoot and rapid motion.
The same property also makes it easy to interpret noise as a quick action that requires braking. In real flight, bad propellers, motor bearings, frame resonance, wire knocking and electrical interference may cause high-frequency fluctuations in the gyro; D will order the motor to rapidly increase or decrease after derivation of these fluctuations, causing heat, abnormal noise and oscillation.
Why does increasing frequency amplify D
Assume the gyro is a sine wave with fixed amplitude. When the frequency is increased, the height between the wave peak and the wave trough remains unchanged, but the time required to complete the same change is shorter, and the curve is naturally steeper. The magnitude of the derivative is proportional to frequency, so when the frequency doubles, the idealized D response increases accordingly.
This does not mean that the diagram in the video can accurately predict the D output of a certain aircraft. Actual Betaflight is also affected by sample rate, digital filtering, D min, dynamic filtering and discrete calculations; the graph is used to understand trends rather than directly calculating safe D values from vibration frequencies.
Why do P and I not have the same frequency gain?
P generates output based on the current error margin. In the simplified example of the same amplitude, increasing the frequency will not automatically make the single peak larger, so there is no D-like effect of "the faster the slope, the greater the slope". P will still respond to gyro noise, it just won't be extra frequency amplified by derivation.
I integrates the error over time. The positive and negative areas of fast noise cancel each other in a window. The higher the frequency, the shorter the duration of each half cycle, and the smaller the area that can be accumulated. So I am more concerned with sustained deviations rather than rapid back and forth vibrations.
How to use this intuition when adjusting parameters
When you see high D-term noise or motor heating, check the mechanical source and gyro spectrum first, then evaluate D-term filtering and D gain. Don't just rely on adding filtering to cover up bad or loose propellers, as filtering will also increase latency; similarly, don't continue to increase D when high-frequency noise is uncontrolled.
After each adjustment, do a short test flight, check the Blackbox, and land to check the motor temperature. Only change one variable by a small amount and record the firmware, filtering and PID baselines; if there is sustained high-frequency oscillation, squealing or abnormal temperature rise, the aircraft should be grounded immediately.
Operation steps
- Observe the slope of the gyro curve
Compare the gentle and steep sections to the D output to understand that the D responds to the rate of change.
- Keep amplitude constant and increase frequency
Compare the slopes of the curves and see how D increases for the same amplitude change over a shorter period of time.
- Relate P to amplitude
In the simplified model, the amplitude is fixed so that the P peak is not amplified by the frequency itself.
- Use area to understand the cancellation of I
Observe that rapid positive and negative fluctuations cancel out within the integration window and understand that I focus more on persistent deviations.
- Back to Blackbox and Motor Temperature Verification
First check the mechanical noise, then adjust D and filtering slightly, and check the temperature after each test flight.
FAQ
Why does high-frequency noise of the same amplitude produce a larger D?
Because it completes the same amplitude change in a shorter time, the slope is steeper; D differentiates the rate of change, so the output increases with frequency.
Is P completely immune to high frequency gyro noise?
No. P will still respond to the error magnitude, just without the additional frequency amplification caused by derivation.
I Why let fast noise cancel?
I accumulates the area over a period of time; rapid positive and negative fluctuations tend to cancel each other out in the window, and the accumulating area for each half-cycle is also smaller.
D Is it enough to just add filtering when the noise is high?
Not necessarily. Mechanical sources such as propellers, motors, racks, and wires should be checked first; too much filtering will increase latency.
Full timeline transcript
Transcripts are arranged according to video time, making it easy to quickly locate the explanation content. Transcript language: Simplified Chinese.
Hello everyone, I am Quarank. Today, on Friday, we are going to talk about a relatively relaxed topic, which is the relationship between D in this PID and the noise of the gyroscope/D-term. After the previous videos, we know that when adjusting the PID parameters, how high our P and D can be is mainly determined by the noise of the gyroscope D. Is it correct? If your gyroscope/D-term If the noise is very high, then your P and D cannot be raised very high. But if your system has low noise, then my P and D can be raised very high.
Then why is this? We know from previous videos that D differentiates the gyroscope signal, that is, takes its slope and then takes the negative. For example, in the example in our picture, the purple-blue line is the signal line of the gyroscope, and the yellow line is the D signal line. We can see that when its slope is equal to the slope, it will be flat. When D is relatively small, and when the slope is relatively large, D is relatively large and the relationship is negative, right?
Then why is this thing so sensitive to high-frequency noise? Let's take a look at an imaginary gyroscope curve. This is an example I found on the Internet. Suppose the red line in the picture is the signal line of our gyroscope. It means that it rotates in one direction, right? Then we can verify that it rotates in the other direction. Then we can see that it rotates to the left for a while, then faster and faster, then to the left and slower, and now it changes to the right, faster and faster, and then slower and slower.
We can see that the ground line is the slope of this line, take the slope of this line and then get it, right? This is what it is now. The slope of this line represents the size of our D value. Now let's increase the frequency of this line to see what happens. You see, if I only increase the frequency while the shaking government remains unchanged, does the line become much steeper? That means our D value will become larger and then we increase the frequency.
Why are PID and i so uneven?
When the government remains unchanged, this difference is the maximum and can only be so large, so it remains unchanged. Let's assume it's on the zero line here. Why does I feel unclear about this? We know that I integrates the gyro-1 curve, which is the area. If we look back at time, since the government remains unchanged, the largest area difference will be that big. When the area difference is the largest, we assume that this
He uses 1/2 of the period as the window, and the largest area is the area that can reach this small area. And when the frequency increases, the area is difficult and may cancel each other out, right? In a window, this area will be partially offset, so after the high frequency is caused, our suppression will be reduced. OK, let’s share such a little knowledge today. If you like the content of this issue, please like and collect. I am Quarank. See you in the next issue.



