Singularity analysis of a spherical robot used in upper limb rehabilitation