[FPV Knowledge Sharing] Vernacular Betaflight 4.2 - Part 1 - Dynamic Voltage Drop Compensation

ChineseBilibiliFPV knowledge5:13
Watch on Bilibili
← Return to Simplified Chinese tutorials and video guides

This tutorial explains Betaflight 4.2’s Dynamic Battery Sag Compensation. It adjusts the available motor output according to the battery voltage measured by the flight controller: a certain margin is reserved when the battery is fully charged, and the compensation is gradually increased when the voltage drops, making the power feel of a battery more consistent from the front to the rear. It cannot restore LiPo capacity or be a reason to fly to depletion; individual cell voltages must be monitored and drop margin maintained.

What problem is voltage sag compensation intended to solve?

As a battery moves from fully charged toward the end of a flight, voltage falls with remaining capacity and load. The same throttle command may produce less power at a lower voltage, making response feel inconsistent from lap to lap. The vbat_sag_compensation feature in 4.2 attempts to correct motor output using voltage measurements, making changes in control authority smoother over the battery’s discharge.

The video explains the concept as proportionally increasing output when voltage falls from 4.2 to 3.0. This is a simplified model: it does not mean the system can exceed the limits of the motors, ESCs, battery, or 100% output. When high-throttle output is already saturated, no additional headroom remains. Software also cannot repair an aged or overdischarged battery.

The flight controller needs an accurate VBAT reading

Compensation relies on the flight controller’s own voltage measurement. If voltage is connected only to the camera or a separate OSD, the flight controller does not know the actual VBAT and cannot calculate compensation correctly. Even if voltage is displayed, calibrate the voltage scale first so that the Configurator/OSD agrees with a reliable multimeter.

An incorrect voltage reading produces incorrect compensation. Before testing, check the cell count, sensor scale, grounding, and logged vbat curve, and confirm that low-voltage warnings work. Do not lower the low-voltage threshold to maintain consistent feel.

Avoid double compensation with the old VBAT PID gain

The video reminds viewers to disable the old vbat_pid_gain in the recorded version when enabling dynamic voltage sag compensation in 4.2. The old feature increases PID gains as voltage falls; the new feature changes the motor-output scale. Using both may compensate twice, making the response and its relationship to tuning difficult to predict.

This migration requirement belongs to the Betaflight 4.2 era. Modern versions may have removed, renamed, or reimplemented the related options. When upgrading, read the release notes and migration instructions for the relevant version rather than trying to force obsolete fields into the CLI.

LPF period controls how quickly compensation responds to voltage sag

In the recorded version, vbat_sag_lpf_period smooths voltage over a time window. The video explains that its value is in units of 100 ms. A larger window follows a slow, long-term decline and does not immediately change compensation for a brief throttle punch. A smaller window follows instantaneous sag during racing more quickly, but also follows noise more readily.

The author uses 200 (about 20 seconds) and 2 (about 200 ms) to illustrate the two ends of the concept, not as current presets. Racing may favor a faster response, while cruising or cinematic flying may favor smoother behavior. In practice, start with the defaults in the current version and validate gradually using vbat, motor output, saturation, and flight feel.

Use a safe A/B test to assess the benefit

Use healthy batteries of the same model to compare compensation off and on with the same aircraft, propellers, route, and throttle movements. Log voltage, throttle, motor output, lap times, and temperature for the entire flight. Focus on whether the latter part is more consistent and whether full-throttle output saturates earlier. Monitor per-cell voltage both under load and after resting, and always retain enough margin for a safe landing. Compensation is not a reason to fly a LiPo until it is exhausted.

Operation steps

  1. Calibrate the flight controller’s VBAT reading

    Use a reliable meter to check the Configurator/OSD voltage and confirm that the flight controller, not only the camera, can read the battery voltage.

  2. Save a baseline of the 4.2-era configuration

    Record vbat_sag_compensation, LPF period, the old vbat_pid_gain, and the firmware version.

  3. Avoid double VBAT compensation

    Disable the old vbat_pid_gain as required by the recorded version’s migration instructions. For modern versions, read the release notes first.

  4. Start with the current default LPF period

    Understand that a longer window is smoother and a shorter window responds faster. Do not copy 200 or 2 directly.

  5. Compare compensation off and on under matched conditions

    Compare power consistency, vbat, motor saturation, temperature, and lap times over an entire battery.

  6. Keep low-voltage protection and land in time

    Compensation cannot restore capacity or exceed full output. End the flight when the safe lower limit is reached.

FAQ

Can voltage sag compensation restore power to an empty battery?

No. It only uses reserved output headroom to improve consistency. It cannot create energy or exceed the maximum output of the motors and ESCs.

Is seeing voltage on the camera OSD enough?

No. The flight controller must receive and calibrate a VBAT reading before the feature can use it to calculate compensation.

Why must the old vbat_pid_gain be disabled?

In the video’s 4.2 migration context, the two mechanisms would both change control strength. Consult the official migration instructions for the current version.

Is a shorter LPF period always better?

No. A short window responds quickly but follows transient noise more readily. A long window is smoother but does not track fast sag. Choose based on the intended use and logs.

Can I copy the video’s values of 2 and 200 directly?

No. They illustrate time windows in Betaflight 4.2 in 2020; they are not recommended values for modern firmware or every aircraft.

Full timeline transcript

Transcripts are arranged according to video time, making it easy to quickly locate the explanation content. Transcript language: Simplified Chinese.

Today I will explain some new Betaflight 4.2 features in plain language. Betaflight 4.2 has been out for a while, and I believe many of you may already be using this new version. I will use my limited middle-school mathematics and physics knowledge to explain some interesting Betaflight 4.2 features. Let us begin. The first feature—

[Speech cannot be reliably recognized here]

—does not pull the aircraft up; instead, it falls to the ground. This is very common for a pilot on a tight budget like me, because I often use a battery until it cannot fly anymore. The dynamic battery compensation feature added in Betaflight 4.2 solves this problem very well. How exactly does it work?

Once you enable it—for example, set VBAT SAG COMPENSATION here to 100%—when the battery is full, say 4.2, fully charged at 4.2, it slightly reduces motor output. When it detects that battery voltage has fallen, it proportionally increases the motor output—

—a little. For example, suppose battery voltage has reached three volts. It multiplies the original motor output by four point two divided by three, increasing output to compensate for the inconsistency caused by falling voltage. This feature is very useful for people who race.

For freestyle and cinematic flying, its effect is less noticeable. There are a few things to note. First, your flight controller must be able to detect voltage. If, for example, you use the voltage sensing on a camera such as RUNCAM or Foxeer, the flight controller does not know the current voltage at all, so this feature cannot be used.

Also, when enabling this feature, turn off the old VBAT PID gain—the feature that increased PID as voltage fell—because the two conflict. Why? Motor output has increased, right? The same PID therefore corresponds to the same output strength, in terms of the resulting power.

Another thing to note is a parameter you can adjust, called VBAT SAG LPF Period. What does it mean? There are different ways voltage can fall. For example, if I am cruising very slowly, voltage falls gradually, possibly following a very straight downward-sloping line from 4.2.

Voltage sag during racing

This parameter is set in units of 100 milliseconds and specifies the time interval over which a voltage drop is detected. If you set it here to 200, that means 20 seconds. Only a change within those 20 seconds—that 20-second interval—is considered. It takes an average: a 20-second average of the voltage over 20 seconds. If it changes, it then—

—changes motor output. When you set it to two, meaning 200 milliseconds, it samples voltage changes within 200 milliseconds, then averages them. After averaging, if voltage has changed, it immediately adjusts motor output accordingly.

This is very useful for racing, so set this somewhat lower for racing and higher for cinematic flying.

English