A closed-loop brain–machine interface framework design for motor rehabilitation. (April 2020)