# Best or correct method for vibration review

Hello everyone

I constantly check vibrations on similar copters using this method:
Average vibrations for the entire flight based on Vibe data.
Maximum vibrations for the entire flight based on Vibe data.

I read in the vibration section on https://ardupilot.org/ that vibrations higher than 15 are undesirable.

Question 1: Does this refer to the average level or the peaks or the frequency of such peaks?

Furthermore, after collecting statistics for some time, I had vibration levels on the Z-axis ranging from 13 to 16.

Lately, these indicators have often exceeded 20 - the average level for the entire test flight. This concerns me, even though I canâ€™t find any problems in the design or assembly.

Question 2: There is a test TestVibration.py in the Mission Planner codebase. When I run it, I often get â€śGood Vibrationâ€ť even if the average value for VibeZ in my statistical table is above 20, and the maximum values are higher than 60. Another question about TestVibration.py: why are we only checking the data recorded in Loiter, and AltHold is ignored? I just want to understand the logic.

I would be immensely grateful for an explanation of which method of checking vibration levels is best for filtering out copters. Based on IMU AccXâ€¦ or based on Vibeâ€¦

Thank you very much in advance.

Hello
As far as I understood from the TestVibration.py,
the script uses standard deviation of the data as a metric to check whether the vibrations are good or abnormal.

``````# use 2x standard deviations as the metric, so if 95% of samples lie within the aim range we're good
stdDevX = abs(2 * getStdDevIMU(logdata,"AccX",startLine,endLine))
stdDevY = abs(2 * getStdDevIMU(logdata,"AccY",startLine,endLine))
stdDevZ = abs(2 * getStdDevIMU(logdata,"AccZ",startLine,endLine))
if (stdDevX > aimRangeFailXY) or (stdDevY > aimRangeFailXY) or (stdDevZ > aimRangeFailZ):
self.result.status = TestResult.StatusType.FAIL
self.result.statusMessage = "Vibration too high (X:%.2fg, Y:%.2fg, Z:%.2fg)" % (stdDevX,stdDevY,stdDevZ)
elif (stdDevX > aimRangeWarnXY) or (stdDevY > aimRangeWarnXY) or (stdDevZ > aimRangeWarnZ):
self.result.status = TestResult.StatusType.WARN
self.result.statusMessage = "Vibration slightly high (X:%.2fg, Y:%.2fg, Z:%.2fg)" % (stdDevX,stdDevY,stdDevZ)
else:
self.result.status = TestResult.StatusType.GOOD
self.result.statusMessage = "Good vibration values (X:%.2fg, Y:%.2fg, Z:%.2fg)" % (stdDevX,stdDevY
``````

This is the snippet from the script. It calculates the standard deviation of the vibrations in the 3 axis and multiplies it with 2. Now, here the standard deviation is multiplied by 2 because according to the empirical rule in statistics:

``````Around 68% of scores are within 1 standard deviation of the mean,
Around 95% of scores are within 2 standard deviations of the mean,
Around 99.7% of scores are within 3 standard deviations of the mean.
``````

Further, this value (2xSTD) is compared with the threshold range.
So, to make it simple, when your vibration values are spread over a large range, you will have a higher STD. Hence, the value 2xSTD will be higher, and if it crosses the threshold, the vibrations are abnormal.
And, if the vibration values are spread over a smaller range, the STD value will be less, making 2xSTD less, hence if 2xSTD is lower than the threshold, the vibration values are good.

This is what the TestVibration.py is doing.
However, I couldnâ€™t figure out why only loiter data is being analyzed.

Moreover, it depends on your flight controller if there is any dampening to the vibration sensors. In case of CUBE Orange, I guess the X and Y axis vibration sensors are damped while the Z axis is not damped. So in case of CUBE Orange (or maybe Pixhawk as well, not sure though), generally the vibrations in Z-axis are higher due to absent dampening.

1 Like