FPV Flight-Control Lab

Technical Note

INAV D-term pre-diff LPF: what changed, why it is disabled by default, and what logs are useful.

A focused note for pilots and reviewers who want to validate `dterm_lpf2_hz` with comparable Blackbox data instead of guesswork.

INAV D-term pre-diff LPF technical banner

Short Version

The PR adds an optional low-pass filter before the derivative step used by D-term. The goal is to reduce high-frequency gyro noise before differentiation amplifies it. The feature currently defaults to disabled, so existing tunes keep their current behavior unless a pilot explicitly tests the new setting.

Why The Filter Is Before Differentiation

D-term reacts to rate of change. That makes it useful for damping fast motion, but it also makes high-frequency gyro noise more expensive: noise changes quickly, and a derivative operation can make that noise look larger. Filtering the input before the derivative step is a conservative way to reduce the noise that reaches D-term.

Current Implementation State

  • The active upstream PR is iNavFlight/inav#11464.
  • The setting is `dterm_lpf2_hz`.
  • The default is `0`, so the feature is disabled unless the pilot enables it.
  • The pre-diff PT1 filter state is initialized from the current gyro rate on filter re-init to avoid a one-cycle D-term spike.
  • The generated settings documentation has been updated.

Test Values

The useful comparison is not just enabled versus disabled. The most useful logs use the same frame, propellers, battery class, PID profile, weather, and flight style while changing only `dterm_lpf2_hz`.

  • `set dterm_lpf2_hz = 0` for baseline behavior.
  • `set dterm_lpf2_hz = 200` for a conservative enabled pass.
  • `set dterm_lpf2_hz = 250` for a less aggressive filter pass.

What To Measure

  • D-term noise in the Blackbox log.
  • Gyro noise before and after the comparison change.
  • Motor temperature after hover and active flight.
  • Propwash recovery or bounce-back behavior if visible in the log.
  • Any change when switching PID or filter profiles.

Useful Comment Format

Attach logs or screenshots to the flight-test issue and include enough context for another pilot to compare the result.

  • INAV version or PR build commit.
  • Target board and aircraft type.
  • Prop size, battery class, and motor class.
  • Filter settings before the test.
  • Three logs: disabled, 200Hz, and 250Hz when possible.