Displacement prediction and optimization of a non-circular planetary gear hydraulic motor