Softivation

Drone shakes in the air (motors are balanced)

The answer to why the drone vibrates is in the log: VIBE values and clipping counters. We walk through the thresholds, the measurement path and the mechanical order step by step.

Furkan IŞIKAY 6 min read

The drone takes off and hovers, but it can't hold still. The body keeps shaking a little, the camera image jitters, and sometimes it drifts sideways on its own. You listen to the motors one by one and they all sound the same. You replaced the propellers and it didn't help.

In this situation most people dive into PID tuning. But if the acceleration data the autopilot sees is corrupt, PID won't work properly no matter what you do. You need to measure first.

Vibration or tuning

The two give different symptoms. A tuning problem usually shows up on a specific axis in a specific maneuver and is repeatable. Vibration is there even when hovering, grows as throttle increases, and usually spreads across all three axes at once.

The only reliable way to tell them apart is not guessing but the log. The autopilot already measures vibration on every flight and records it in a separate log message.

What to look at in the log

The VibeX, VibeY and VibeZ fields of the VIBE message give the standard deviation of the primary accelerometer's output in m/s/s. The thresholds in the official documentation are: below 30 m/s/s is normally acceptable, above 30 can cause problems, and above 60 almost always causes problems in altitude and position hold.

Read the log in this order:

  1. Open the log and plot the VibeX, VibeY and VibeZ fields of the VIBE message.
  2. If VibeZ is below 30 m/s/s, vibration isn't the main suspect.
  3. Check whether the Clip0, Clip1 and Clip2 counters are increasing. An increasing counter shows the accelerometer is saturated, and the filter can't save that.
  4. Mechanics first, then the filter: don't set up the notch until balance and mounting are fixed.

Don't skip the order. Vibration is a mechanical event. Filter tuning tries to suppress it on the measurement side; it doesn't remove its source.

Clipping isn't the same as high vibration

The VIBE message also has Clip0, Clip1 and Clip2 counters. They increase every time the accelerometer hits its measurement ceiling. In the source code this ceiling is defined as 15.5 g on most sensors, which is about 152 m/s/s. On some sensors, such as the ICM45686, it is 29.5 g.

If the counter is rising, the sensor isn't measuring reality at that moment; it's saturated. Tuning the filter while it's saturated doesn't fix the measurement, because the lost data was lost before the filter.

There are forum cases where VibeZ is below 30 yet the Clip2 counter maxes out. There, the problem was short peak impacts reaching the third accelerometer, which hadn't been isolated. The figure shows this case: each short impact that touches the ceiling raises the counter by one step, while VibeZ stays below the 30 line.

The sensor can saturate even when VibeZ is low

Short impacts in the raw accelerometer signal touch the ±15.5 g ceiling, and the Clip counter goes up by one on each impact. VibeZ stays below the 30 m/s/s line
Where to look: the yellow bands. Each short impact that touches the ceiling raises the counter by one step, while VibeZ stays below the 30 line. Schematic drawing.

How to measure on your own board

You see this picture with data collected from your own board and your own frame. The most practical way is to read the VIBRATION message live over telemetry.

The loop below connects to your board and prints the vibration values of the three axes and the three clipping counters several times per second. With the propellers on, secure the vehicle, increase the throttle gradually, and watch how the numbers change.

Pythonpymavlink
from pymavlink import mavutil

m = mavutil.mavlink_connection('/dev/ttyUSB0', baud=57600)
m.wait_heartbeat()
m.mav.request_data_stream_send(m.target_system, m.target_component,
                               mavutil.mavlink.MAV_DATA_STREAM_ALL, 10, 1)

while True:
    v = m.recv_match(type='VIBRATION', blocking=True)
    print(round(v.vibration_x, 1), round(v.vibration_y, 1),
          round(v.vibration_z, 1), v.clipping_0, v.clipping_1, v.clipping_2)

While reading, keep this in mind: the clipping counters are cumulative, meaning they never reset. What matters isn't the absolute value but the rate of increase as throttle rises. If it stays constant, there's no saturation.

If you want a more detailed look after the flight, download the dataflash log and plot the VIBE message. You need a real flight of a few minutes in which you do more than just hover. On a real vehicle the axes diverge from each other, and the Z axis is usually the worst.

Example: You mounted a payload drop rig under the body, and on the first flight with the load hanging, the image started to shake. Before touching PID, run the loop above. If the three clipping counters stay put while you raise the throttle gradually, there's no saturation. If VibeZ goes above 30, go back to how the rig sits on the body, and to balance. If the counters advance with every throttle increase, the problem is in the mounting, not the filter.

Error Messages and Their Meanings

Vibration compensation ON

The autopilot detected high vibration and changed altitude control. To trigger it, the EKF's vertical velocity and vertical position deviations must both be positive, the vertical velocity variance must exceed 1.0, and this must last 1 second. If you saw the message, the altitude estimate wasn't reliable in that flight.

Vibration compensation OFF

It comes 15 seconds after the conditions are gone. The time between these two messages gives you the window in the log where vibration really caused a problem.

PreArm: Accels inconsistent

The readings from multiple accelerometers don't agree with each other. On a board under constant vibration, the sensors are affected differently, so this message can show up on the ground too. Check the board's mounting before repeating calibration.

PreArm: Gyros inconsistent

The same logic applies to gyroscopes. If it doesn't pass even though you keep the vehicle completely still, it means the vibration reaching the board corrupts the measurement even before ARM.

EKF variance

The estimation error exceeded the threshold. Vibration isn't the only cause, but if it shows up together with a high VibeZ, vibration needs to be solved first. Fiddling with the compass or GPS here is a waste of time.

What changes in the field

The path vibration takes to reach the autopilot is this: the motor and propeller generate the source, the arm and body transmit it, the mounting layer absorbs some of it, and the rest reaches the accelerometer. Trying to improve the last link without fixing the first links of the chain gives limited benefit.

The order that works best in practice: propeller and motor balance, concentricity of the hub adapter, the motor mount seating fully on the body, then the board's isolation. In one case on record on the forum, adding mass to the isolated plate the board sits on brought all axes below 10 m/s/s, and clipping ended completely.

The harmonic notch filter is the last step of this job and is applied on the gyroscope side; it doesn't fix accelerometer saturation. Turning on the notch without measuring the frequency doesn't work either: in the source code the INS_HNTCH_REF default is zero, and as long as it stays zero, dynamic tracking doesn't work.

For readers of this article

We have a course that covers vibration diagnosis, calibration and first-flight preparation from start to finish. Flying while knowing what the sensors on the board measure, and what they can't measure, gets results much faster than trial and error.

See the course: Drone Basics: From Sensors to Flight

Was this article helpful?

Free resourcePixhawk and ArduPilot error message glossaryThe 4 messages in this article and similar ones are in the glossary: what they mean, why they appear, what to check first.