Internal representation of external patient dynamics in locomotor rehabilitation