An Analytical Motion Filter For Humanoid Robots