Design and development of a hand exoskeleton robot for active and passive rehabilitation