Gait optimization with a real-time closed-loop artificial sensory feedback