How to measure gyro noise frequency with Blackbox

Cleanflight / Betaflight / INAV lowpass filter tuning can be a hard thing to do if you have not idea what is noise frequency you want to cancel. Sure, you can blind test or read tutorials. But what if I tell you, you can measure it quite precisely using only Blackbox logs? Or measure rotation speed of motors? That would be nice, isn’t it? The only requirement are few seconds of Blackbox log with visible gyro (it can be also motor output or Pterm or even ACC reading) noise.

blackbox measure frequency 1

Open Blackbox Explorer (I’m using INAV version) and display Graph setup

blackbox measure frequency 2

We will need only one gyro axis and to make thing easier, let’s remove smoothing, expo and increase scaling.

Set zoom to 1000% and scroll to a section with nicely visible noise

blackbox measure frequency 5

What we want to do, is to measure time difference between apexes. Usually 6 is enough for pretty precise result.

blackbox measure frequency 4

Write down timestamps of a few apexes. In my case those were following values: 12.273 12.285 12.301 12.313 12.325 12.337.

Now, let’s compute differences between them

12.285 - 12.273 = 0.012
12.301 - 12.285 = 0.016
12.313 - 12.301 = 0.012
12.325 - 12.313 = 0.012
12.337 - 12.325 = 0.012

Out average equals 0.0128. This is a period of gyro noise. Probably induced by unbalanced propeller. To compute frequency, divide 1 by it.

1 / 0.0128 = 78Hz

To compute motors rotation speed in PRM, multiply frequency by 60.

78Hz * 60 = 4680RPM


Range of frequencies that can be measured using this method is limited by something called “Nyquist frequency”. Long story short: we can measure only frequencies that are smaller than half of a sampling frequency. In my case, Nyquist frequency was 125Hz. Why? Because sampling frequency was 250Hz (looptime 2000 = 500Hz and blackbox_rate_denom = 2 cuts it in half, so 250Hz)

Leave a Reply

Your email address will not be published.