This article explains what Feed-Forward is
Setpoint Weight and Transition are, and how to tune it in Betaflight. “Derivative of error and measurement” are closely related to Setpoint weight / Feedforward, and they can give you very different flight characteristics.
FeedForward Replacing SetPoint Weight
Since Betaflight 3.5, Dterm Setpoint Weight and Transition (aka relaxation ratio) have been replaced by Feed-forward (F gain), located in the PID tuning tab in the Betaflight Configurator, next to D gain.
In the past, you could change responsiveness of your quad to the stick movements by adjusting D term Setpoint Weight/Transition. Instead you now use F gain for this purpose, and you can tune pitch, roll and yaw axes all individually.
Advantages of Feed-Forward
There are advantages of Feed-Forward over Setpoint Weight.
Firstly, Setpoint Weight used to be coupled with PID. If you change PID, it affects the Setpoint Weight too. But now Feedforward is separated from PID loop, so you can adjust feedforward purely to change stick feel, and it won’t be affected by how you tune your PID.
Secondly, Feedforward setting is now available for Yaw too, we can use it to improve yaw performance hugely. Previously Setpoint Weight was only available for Pitch and Roll. Yaw is known to have slow response, and by increasing feedforward on Yaw will make it just as responsive as the pitch and roll axis!
Thirdly, weight distributions are normally different on pitch and roll axes on an FPV mini quad, thus the different intertia on these axes when the craft is rotating. The good news is that D and F gains are independent for all 3 axis (yaw, roll and pitch), so you can compensate accordingly.
Lastly, you no longer have to raise P gains to boost responsiveness, you can achieve this by just raising FeedForward. That’s because by increasing F gain it won’t introduce oscillations even when it’s “too high”. However note that F gain doesn’t help stabilize the drone like P gain does, so you still need an adequate amount of P gain.
How to Tune F Gain and D Gain?
With the new FeedForward feature you now have two things to tune, D gain and F gain.
D gain is always active and is responsible for damping any rapid changes. F gain is only active during stick movements and is responsible for the responsiveness of the craft.
To put it simply, if you want sharper response, increase F gain. If you want smoother ending of a rapid movement, increase D gain. The more D, the smoother everything will be, the more F, the more control you will have.
If you have oscillation in Yaw, you can try higher F and I values, then drop P to maintain the responsiveness while keeping oscillations caused by P gain to a minimum.
Ignore the Rest of the Article
You can ignore the rest of the article, since Setpoint Weight has become obsolete in Betaflight :) Unless you are using BF 3.4 or older version.
tltr: What’s the best Setpoint Weight and Transition setting?
If you don’t want to read, just try this values which are what I personally use:
- Setpoint Weight: 0.95-1.00
- Setpoint Transition: 0.1-0.3
But if you have time, try play with different value and see what works for you. Let me know in the comment :) Now if you want to know more, let’s dive into the technical stuff!
Derivative of “Error” vs. “Measurement”
To understand the setting “Set-point Weight”, it helps to first get a basic understanding of what “Derivative of Error” and “Derivative of Measurement” are. This article is relevant to what “derivative of error” is, where i also explain why excessive D gain causes oscillations.
During the development of Betaflight, we were once given an option to either use “Derivative of Error”, or “Derivative of Measurement”.
These are the two methods of deriving D value in the PID controller. They can hugely affect your quad’s handling and flight characteristics, specifically in terms of smoothness and responsiveness.
I will refer to these two methods as “Error” and “Measurement” in the rest of this article.
Main Differences Between Error & Measurement
D term on Error gives you sharper stick response but rougher motors, while Measurement gives you softer stick response and smoother running motors.
You may have seen RC command without interpolation in a blackbox log, it looks like a jagged trace as shown in the image below (it’s completely normal by the way). The “stepped RC command” is what we believe that cause the most noticeable difference between Error and Measurement.
The reason that Error feels so direct and twitchy could be that RC command is stepped.
Because every step is a change in Setpoint and error, and this causes what is called a “D term kick“.
Every D term kick gives the motors a sudden push, and you can get lots of “D term kicks” from moving your sticks because you are basically changing your set-point rapidly and constantly. This makes the control feel very snappy and responsive, but the motors also need to work harder and therefore sound rougher.
D term from measurement avoids “D term kick” as mentioned above, therefore it feels less snappy but smoother.
Which one is better?
You can notice the difference between the two more easily when you are moving your sticks rapidly, e.g. when you are doing acro moves or bank turns. However, there is little to no difference when you are not moving the sticks.
It’s been suggested that racers might prefer Error and freestyle pilots might prefer Measurement, but I am sure everyone has a different preference.
Later on, Betaflight developers introduced “Setpoint Weight” so we can find a balance between the two.
What is Setpoint Weight?
The downside of too much D gain
When you come to a stop after doing an acro move, a high P term can make your quad overshoot and bounce back. Here is where D term comes into play, it damps it and makes it smoother.
But too much D term can make your quad respond slower and gives you that feeling you are less connected to the sticks. The more you increase D gain, the more sluggish your quad becomes between sharp moves.
Setpoint weight can help!
By raising “Setpoint Weight” in Betaflight can counteract the negative effect caused by D term. It’s is basically a sliding scale between the two D term methods mentioned above.
This allows you to have it exactly where you want it between smoothness and responsiveness:
- Setpoint weight of 1 = error
- Setpoint weight of 0 = measurement
You can actually set Setpoint weight much higher than 1, up to 2.55 which will make your stick response ultra fast and movement ultra crispy.
The downside of extremely high Setpoint Weight is every time you move your stick, it produces a sharp movement. It’s often described as “robotic”, “twitchy” and “stiff” which is undesirable in FPV Freestyle and achieving smooth FPV flight footage.
I found Setpoint Weight can slightly affect your Rates and Expo as it goes above 1, so you might want to fine tune those settings too.
Tuning Setpoint Weight
D setpoint weight might be one of the most influential parameters in how the quad flies, and it’s often overlooked. It can also mask badly tuned PID, so my recommendation is to leave Setpoint Weight at default until you have tuned your PID.
Setpoint Weight doesn’t do anything when your sticks are idle, so make sure to do lots of acro moves when tuning Setpoint Weight.
My recommendation is to begin with value 1, and play around between 0.5 to 1.5. Remember there is no wrong value as long as you like it. I personally find a noticeable difference with an increment of 0.05, so take small step at a time :)
Setpoint Transition Explained
Setpoint Transition gives you the best of both worlds: the sharp response as well as the damping at the end of the move. It decreases the influence of Setpoint Weight when the stick is returning back to center. This results in smoother stop of a flip and roll (or any other acrobatic moves).
The Setpoint transition value basically represents a point of stick deflection:
- 0 – stick center
- 1 – stick endpoint
When the stick is above that point, Setpoint Weight is kept constant at its configured value. And when the stick is positioned below that point, Setpoint Weight is reduced proportionally, reaching 0 at the stick center position.
In simple words, transition value of 1 would feel a bit slower and mushier, but it offers the smoothest effect. Transition value of 0 keeps Setpoint Weight value consistent for the entire stick range.
I personally prefer to use a lower value like 0.1 – 0.3.
Support Me On Patreon
I hope you find this article useful. I am now on Patreon, please consider supporting me there :) I also regularly do giveaways there so don’t miss out!
- Feb 2018 – Article created;
- Aug 2018 – “Setpoint weight” replaced by “Feedforward”;