EEG-controlled functional electrical stimulation rehabilitation for chronic stroke: system design and clinical application