This article explains what Feed-Forward is (previously “Setpoint Weight and Transition”), 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.
Take a look at my PID explained tutorial if you haven’t already, where I will also show you how I tune my quadcopter PID. See this tutorial for Betaflight specific tuning.
Feed-Forward 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 and 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 then it’s still worth a read.
tltr: What’s the best Setpoint Weight and Transition setting?
It’s a long article, If you don’t want to read, just try this values which are what I personally use on my freestyle quad:
- Setpoint Weight: 0.95-1.00
- Setpoint Transition: 0.1-0.3
But if you have time, try play with different values 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.
Table of Contents
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!
Edit History
- Feb 2018 – Article created;
- Aug 2018 – “Setpoint weight” replaced by “Feedforward”;
8 comments
So if you set your weight to below 1, eg. 0.8, then what does transition do now?
Oscar, did you ever find out if you have the slider directions backwards? does the explanation still stand? because it makes sense to me if it does.. i havent done anything with it yet. but i planned to mess with it after work today.
I have corrected the description about Setpoint Transition, there was some mistake in the tooltip description before in Betaflight.
The description of setpoint transition is utterly wrong. Here are the details: https://github.com/betaflight/betaflight-configurator/issues/719
ST is basically a simple linear correction of SW based on stick deflection. It has nothing to do with transitions between different moves or the like.
For the D set point transition. I read the explanation on the Betaflight PID setting page, when you move your mouse over the ‘question mark’ and understand opposite to your explanation. It say value of 1 = smoother, 0 = more response according to set point weight. So?
I’ve got the same as Oran – is it possible you have it backwards Oscar?
Yea I notice that too, not sure if that’s a mistake in the GUI description, or they have recently changed something, i will look into that.
Hi Oscar,
Firstly thanks for all the effort you put into all these awesome articles you’ve freely provided over the years, which have just been a treasure trove of helpful guides & info for me ever since I got into FPV quads about a year and a half ago. Undoubtedly my path here would have been far more difficult and fraught with frustration without your help mate.
However I just had to comment and echo what others have said regarding the explanation of this new “feed forward” setting (previously D setpoint weight) because this is the first time reading an article hear has actually left me more confused. Everything that I’ve read in the Betaflight tuning guide seems to indicate that the D Setpoint weight is actually a weighting between D term of Error (Weight = 0) and D term of Setpoint (Weight = 1) and not the D term of (gyro) Measurement as suggested here in this article. The added responsiveness comes from “feeding forward” the Setpoint (which is derived from the RC input) so that the PID loop responds to the rate of change of input rather than the rate of change of error, since Error, which comes from feedback of the gyro measure and therefore lags behind the input change by at least the PID loop interval. D term of Error actually dampens response, it does not make the system more responsive and while D term kick (due to RC input aliasing) is indeed a concern as you explained, the filtering BF alleviates most of these concerns. Please have a read of the BF 3.5 release notes here which helped me tremendously: https://github.com/betaflight/betaflight/wiki/3.5-tuning-notes#hello-feed-forward