Active orthosis for rehabilitation and passive exercise