State observation and feedback control in robotic systems for therapy and surgery