Well, detecting vibrations isnt too hard. As node density is a key feature here. Even if its a straight line upward, the middle nodes cause stutter, and therefor are vibration.
But if we exclude that nuance, i would say that a vibration has a direction change involved. This change doesnt always mean the values increase and decrease in order. but the change oscilates instead. +0,+10, +0,+10, +0,+10, +0,+10, +0,+10, +0,+10 is a valid vibration. Even +2,+8,+2,+8,+2,+8,+2,+8,+2,+8 is.
This oscilation is what you can use. As once you know enough points in the oscilation, you can average it out, and figure out what the amplitude was, and compensate.
My make vibrations plugin already uses a similar method to apply fades.
The real trick is to also remove middle nodes on an action. As that will truly remove vibrations. So in the +2,+8,etc example, it should figure out that only the start and end of the entire movement are needed. Its obviously easier when doing a double pass here though, as then you can perform that check afterward. But this doesnt have to happen as 2 complete passes. You can always look back at corrected nodes in the first pass upon detecting an actual direction change*, and then remove all the nodes up to the previous detected change…
- note that change here just means a point where it detects that the vibration pattern cannot be held, this can include just a speed change in the same direction.