Standard experimental tasks started with a 3 min of rest sitting and a 3 min of rest standing recording. During rest sitting and standing, patients were asked to keep relaxed and look at the cross sign hanging on the wall ∼2 m away. After that, patients were equipped with 22 sensors in both lower limbs (one in the foot, one in the heel, four in the shank, four in the thigh, and one in the waist, both sides), and completed a 5 m back-and-forth (10 m in total) timed up-and-go task (Fig. 1C). All walkings were captured using an optoelectronic system (CODA, Charnwood Dynamics Ltd), which computed the 3D coordinates of the 22 lower limb sensors in real-time with a sampling rate of 100 or 200 Hz. Each back-and-forth walking was counted as one walking trial. In each stimulation condition, patients completed at least four trials of normal walking. As opposed to the ‘normal walking,’ patients also completed at least four trials of ‘dual-tasking walking,’ during which patients were asked to perform extra cognitive tasks while walking. Cognitive tasks were