Muscle contractions in cyclic movements: optimization of CIMAP algorithm