Filter Tuning Fast Lane

Filter Tuning Fast Lane Step by Step Procedure

This filter tuning fast lane article is for you, who just want to know to set the filters right, fast. However, it requires some knowledge about Betaflight and the terms used. If you want to know more background information just check out the extensive Filter Tuning article.

Creating the Data

  • Set the blackbox to a 2khz log rate and set the debug mode to gyro scaled
    set blackbox_p_ratio = 64
    set debug_mode = GYRO_SCALED
  • Go out in the field and create a log with several throttle sweeps (three are recommended)

Analyzing the Data

  • Use Brian White’s PID Toolbox spectral analyzer to visualize the noise pattern of your copter
  • Look for lines, blobs and shadows in the pre-filtered signal („Gyro prefilt“, Template 7 or 8)
PID Toolbox Spectral Analyzer Prefiltered Noise Pattern marked

PID Toolbox Spectral Analyzer Prefiltered Noise Pattern marked

Tune the Filters

The target is a balance between filter latency and a clean noise profile. An estimated filter latency of <1.5ms Gyro and <2.5ms D Term should be targeted. (We are talking the numbers in the Spectral Analyzer, not the actual latency).

  • Use bidirectional DShot and RPM filters to take care of motor noise (1) and motor harmonics (2). Set starting frequency to where the motor noise starts.
  • Set the dynamic notch filters to cover the range between 100 and 350hz (3), depending on the noise pattern. Use narrower notches by increasing Q.
  • Completely deactivate Gyro Lowpass filters. But only if your rig can handle it (4).
  • Use D-Term Lowpass Filters starting at 100hz. Use either a single BQ filter or a PT1 plus a dynamic LP. You may increase LP cutoff up to 150hz, if your rig can handle it.
    Do not deactivate D Term filtering completely.
  • If you see a lot of noise below 100hz (5), further decrease filter latency by weakening filters (e.g. higher cutoff frequency) and/or reduce PD Gain, to lower D.
  • If you have too much noise in a high frequency range, reposition your filters and/or increase filtering strength.
Betaflight Filter Setup

Betaflight Filter Setup

If you have something like this example spectral analyzer graph at the end, you have won. More noise for an even lower filter delay is possible in this example of a superclean Prätoria Frame.

PID Toolbox Spectral Analyzer Throttle Sweep

PID Toolbox Spectral Analyzer Throttle Sweep (Prätoria Frame)

Now you are set for PID Tuning! Try the Brian White Basement Tuning.