Collaborative Robotics for Rehabilitation: A Multibody Model for Kinematic and Dynamic Analysis