A system for facilitating standing and walking functions by restoring voluntary control of locomotion in a subject suffering from neuromotor impairment that is caused by a spinal cord injury, Parkinson's disease, an ischemic injury resulting from a stroke, or multiple sclerosis and stroke the system including a closed-loop system comprising means for neuromodulation with adjustable stimulation parameters operatively connected with a real-time monitoring component, and a signal processing device operatively connected with the real-time monitoring component and the means for neuromodulation, said means for neuromodulation comprising an epidural and/or subdural electrical stimulation device including one or more electrodes (S1, L2) configured to apply electrical stimulation along a spinal cord of a subject, said real-time monitoring component comprising sensors configured to acquire feedback signals from said subject, wherein said signals are neural signals and signals providing features of motion of said subject, said neural signals being cortical signals recorded from the sensory, motor, sensory motor or pre-motor cortex, and said signal processing device being configured to acquire said feedback signals, to operate a real-time automatic control algorithm and to provide said means for neuromodulation with new stimulation parameters, with minimum delay; the closed-loop system being configured to perform the steps of: providing to said subject a first epidural and/or subdural electrical stimulation with said adjustable stimulation parameters; acquiring said feedback signals from said subject; transmitting said feedback signals to said signal processing device; calculating by means of said signal processing device operating said real-time automatic control algorithm new electrical stimulation parameters; and providing to said subject a second electrical stimulation with said calculated new electrical stimulation parameters. the system including a closed-loop system comprising means for neuromodulation with adjustable stimulation parameters operatively connected with a real-time monitoring component, and a signal processing device operatively connected with the real-time monitoring component and the means for neuromodulation, said means for neuromodulation comprising an epidural and/or subdural electrical stimulation device including one or more electrodes (S1, L2) configured to apply electrical stimulation along a spinal cord of a subject, said real-time monitoring component comprising sensors configured to acquire feedback signals from said subject, wherein said signals are neural signals and signals providing features of motion of said subject, said neural signals being cortical signals recorded from the sensory, motor, sensory motor or pre-motor cortex, and said signal processing device being configured to acquire said feedback signals, to operate a real-time automatic control algorithm and to provide said means for neuromodulation with new stimulation parameters, with minimum delay; the closed-loop system being configured to perform the steps of: providing to said subject a first epidural and/or subdural electrical stimulation with said adjustable stimulation parameters; acquiring said feedback signals from said subject; transmitting said feedback signals to said signal processing device; calculating by means of said signal processing device operating said real-time automatic control algorithm new electrical stimulation parameters; and providing to said subject a second electrical stimulation with said calculated new electrical stimulation parameters. providing to said subject a first epidural and/or subdural electrical stimulation with said adjustable stimulation parameters; acquiring said feedback signals from said subject; transmitting said feedback signals to said signal processing device; calculating by means of said signal processing device operating said real-time automatic control algorithm new electrical stimulation parameters; and providing to said subject a second electrical stimulation with said calculated new electrical stimulation parameters.